From f6ffd6199e62de8d781e0d9008d32ad5d8dfb1dc Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 28 Jun 2024 09:46:43 +0000 Subject: [PATCH 01/36] Update dependency net.sourceforge.pmd:pmd-core to v7.3.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e41a6a22..3b54bab5 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ net.sourceforge.pmd pmd-core - 7.2.0 + 7.3.0 net.sourceforge.pmd diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a81bb5e9..bd8396f7 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -284,7 +284,7 @@ net.sourceforge.pmd pmd-core - 7.2.0 + 7.3.0 net.sourceforge.pmd From 62aed9a5a487ed1a105b50d3db92e234f57eb247 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 28 Jun 2024 09:46:45 +0000 Subject: [PATCH 02/36] Update dependency net.sourceforge.pmd:pmd-java to v7.3.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e41a6a22..a69d93ad 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ net.sourceforge.pmd pmd-java - 7.2.0 + 7.3.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a81bb5e9..afe5def3 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -289,7 +289,7 @@ net.sourceforge.pmd pmd-java - 7.2.0 + 7.3.0 From 5944fa1c7a20aab0ef1e1a7e2848c0495fb41def Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:53:49 +0200 Subject: [PATCH 03/36] Link to updated demo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e653149..42718a3c 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ To get started it's recommended to have a look at the [demo](./vaadin-maps-leafl > [!NOTE] > **The API only supports sending instructions to the client**
> Due to data integrity retrieving client-side data (that can be modified by users) is not supported. -> * Event listeners can still be registered but this needs to be done manually.
[An example is available in the demo](https://github.com/xdev-software/vaadin-maps-leaflet-flow/blob/5a008511935105ea977187112cd0053c7de33e19/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java#L223). +> * Event listeners can still be registered but this needs to be done manually.
[An example is available in the demo](./vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/EventDemo.java). ## Installation [Installation guide of the latest release](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest#Installation) From 35437967bbc243b045bd8f8a7aee87ce3057130d Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 1 Jul 2024 16:43:02 +0200 Subject: [PATCH 04/36] Group pmd --- renovate.json5 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/renovate.json5 b/renovate.json5 index 11024f46..2874d457 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -9,6 +9,16 @@ "maven" ], "enabled": false + }, + { + "description": "Group net.sourceforge.pmd", + "matchPackagePatterns": [ + "^net.sourceforge.pmd" + ], + "datasources": [ + "maven" + ], + "groupName": "net.sourceforge.pmd" } ] } From 501c04d9a11974b61ebe187ba302f007c6e90e1e Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 4 Jul 2024 11:21:54 +0200 Subject: [PATCH 05/36] Fix site failing to find deps --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0510bc0..0bf3805c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,7 +157,7 @@ jobs: cache: 'maven' - name: Build site - run: ../mvnw -B site -DskipTests + run: ../mvnw -B compile site -DskipTests -T2C working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} - name: Deploy to Github pages From bbe5f90b40f484f5e9d2bae047cab11e7c060803 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 6 Jul 2024 14:14:15 +0000 Subject: [PATCH 06/36] Add "draggable" Property to LMarkerOptions --- .../maps/leaflet/flow/demo/ComplexDemo.java | 2 +- .../maps/leaflet/layer/ui/LMarkerOptions.java | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java index 586993af..a72dcd5f 100644 --- a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java +++ b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java @@ -105,7 +105,7 @@ public ComplexDemo() final LMarker markerInfo = new LMarker( this.reg, new LLatLng(this.reg, 49.674662, 12.162869), - new LMarkerOptions().withIcon(divIconInfo)); + new LMarkerOptions().withIcon(divIconInfo).withDraggable(true)); @SuppressWarnings("checkstyle:LineLength") final LIcon iconXDEV = new LIcon(this.reg, new LIconOptions() diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/ui/LMarkerOptions.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/ui/LMarkerOptions.java index b3ece837..bb50accf 100644 --- a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/ui/LMarkerOptions.java +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/ui/LMarkerOptions.java @@ -35,6 +35,7 @@ public class LMarkerOptions extends LInteractiveLayerOptions private Double riseOffset; private String shadowPane; private Boolean autoPanFocus; + private Boolean draggable; public LIcon getIcon() { @@ -195,4 +196,20 @@ public LMarkerOptions withAutoPanFocus(final Boolean autoPanFocus) this.setAutoPanFocus(autoPanFocus); return this.self(); } + + public Boolean getDraggable() + { + return this.draggable; + } + + public void setDraggable(final Boolean draggable) + { + this.draggable = draggable; + } + + public LMarkerOptions withDraggable(final Boolean draggable) + { + this.setDraggable(draggable); + return this.self(); + } } From 4619bd34e928d8e958cc29380e55451b114c69a3 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Wed, 10 Jul 2024 02:25:02 +0000 Subject: [PATCH 07/36] Update vaadin.version to v24.4.6 --- template-placeholder-demo/pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index 524f1f75..d709d9a0 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -29,7 +29,7 @@ software.xdev.vaadin.Application - 24.4.4 + 24.4.6 3.3.1 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index ce74ddf8..9d9c6b1c 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -49,7 +49,7 @@ UTF-8 - 24.4.4 + 24.4.6 From dc7774e109f62b25cc2cd6a752e3e50e0ea863fa Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 14 Jul 2024 02:27:31 +0000 Subject: [PATCH 08/36] Update dependency org.apache.maven.plugins:maven-pmd-plugin to v3.24.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 676c2389..d15d6dce 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.23.0 + 3.24.0 true true diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index c5877da3..9a50c244 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -272,7 +272,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.23.0 + 3.24.0 true true From 33122d407e2ab6bd85ef86b3d413f9b5c46e29e0 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 15 Jul 2024 02:26:55 +0000 Subject: [PATCH 09/36] Update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.6.2 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index c5877da3..43eb0b22 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.6.1 + 3.6.2 From aca0e6496acd2366eb255c0d9bc7b2944b6c0ec2 Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 18 Jul 2024 14:31:58 +0200 Subject: [PATCH 10/36] Also skip tests on test deploy --- .github/workflows/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 9c07de25..e3ed038b 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -24,7 +24,7 @@ jobs: gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - name: Publish to OSSRH - run: ../mvnw -B deploy -Possrh + run: ../mvnw -B deploy -Possrh -DskipTests working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} env: MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }} From 99f469ba138ababef51e12af56bd5d11c7ac3ab4 Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 18 Jul 2024 15:23:59 +0200 Subject: [PATCH 11/36] Add release failure docs --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f1156e6..be2a1863 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,3 +44,31 @@ If the ``develop`` is ready for release, create a pull request to the ``master`` When the release is finished do the following: * Merge the auto-generated PR (with the incremented version number) back into the ``develop`` + +### Release failures + +There are 2 modes of release failure: +1. The remote server was e.g. down and non of the artifacts got published +2. There was a build failure during release and only parts of the artifacts got released + +In case 1 we can re-release the existing version,
in case 2 we have to release a new version when we can't get the artifacts deleted (as is the case with Maven Central) + +#### How-to: Re-Releasing an existing version + +1. Delete the release on GitHub +2. Delete the release Git tag from the repo (locally and remote!) +3. Delete the ``master``-Branch and re-create it from the ``develop`` branch (or reset it to the state before the release-workflow commits have been done) + * This requires __temporarily__ removing the branch protection + * Once this was done a new release is triggered immediately! + +#### How-to: Releasing a new version + +1. Merge the ``master`` branch back into ``develop`` (or another temporary branch) +2. Make sure all master branch versions are prepared for a new release
e.g. if the broken release was ``1.0.0`` the version should now be at ``1.0.1-SNAPSHOT`` - the ``SNAPSHOT`` is important for the workflow! +3. Mark the broken release as broken e.g. inside the Changelog, GitHub Release page, etc.
+You can use something like this: + ``` + > [!WARNING] + > This release is broken as my cat accidentally clicked the abort button during the process + ``` +4. Merge the changes back into the ``master`` branch to trigger a new release From 58525537a3f394c65cc2ee5e385e11342bb9ec2f Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 19 Jul 2024 02:26:29 +0000 Subject: [PATCH 12/36] Update org.springframework.boot.version to v3.3.2 --- template-placeholder-demo/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index d709d9a0..0fb2cb01 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -31,7 +31,7 @@ 24.4.6 - 3.3.1 + 3.3.2 From 24d9ce186aea2221fcedb91a9d26c49ddf2c4539 Mon Sep 17 00:00:00 2001 From: AB Date: Fri, 19 Jul 2024 12:27:31 +0200 Subject: [PATCH 13/36] Ignore Ncss Count as it does the same as Checkstyle --- .config/pmd/ruleset.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/pmd/ruleset.xml b/.config/pmd/ruleset.xml index 5f881567..667f74e5 100644 --- a/.config/pmd/ruleset.xml +++ b/.config/pmd/ruleset.xml @@ -59,6 +59,9 @@ + + + From 9aeed0769e4376c8d032fc06102f9242b8e5e1fd Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 21 Jul 2024 02:28:38 +0000 Subject: [PATCH 14/36] Update dependency org.apache.maven.plugins:maven-site-plugin to v4.0.0-M16 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index c98fc9d6..896862dd 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -90,7 +90,7 @@ org.apache.maven.plugins maven-site-plugin - 4.0.0-M15 + 4.0.0-M16 org.apache.maven.plugins From b9f8a597518c1525c87cee20158bbf082124cf97 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 21 Jul 2024 02:28:39 +0000 Subject: [PATCH 15/36] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.8.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index c98fc9d6..bbdc318d 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -143,7 +143,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.7.0 + 3.8.0 attach-javadocs From 0635abd78ba95d5ca77d5192f5330e5b8598818f Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sat, 27 Jul 2024 02:24:46 +0000 Subject: [PATCH 16/36] Update net.sourceforge.pmd to v7.4.0 --- pom.xml | 4 ++-- template-placeholder/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index d15d6dce..cea11b45 100644 --- a/pom.xml +++ b/pom.xml @@ -82,12 +82,12 @@ net.sourceforge.pmd pmd-core - 7.3.0 + 7.4.0 net.sourceforge.pmd pmd-java - 7.3.0 + 7.4.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 3c968887..a6011a30 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -284,12 +284,12 @@ net.sourceforge.pmd pmd-core - 7.3.0 + 7.4.0 net.sourceforge.pmd pmd-java - 7.3.0 + 7.4.0 From 1052b62eb26a6f9bc55310665fa3bc459bf1d316 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Tue, 30 Jul 2024 02:27:12 +0000 Subject: [PATCH 17/36] Update vaadin.version to v24.4.7 --- template-placeholder-demo/pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index 0fb2cb01..f9b5e763 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -29,7 +29,7 @@ software.xdev.vaadin.Application - 24.4.6 + 24.4.7 3.3.2 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 52ef11e3..4e5e63f1 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -49,7 +49,7 @@ UTF-8 - 24.4.6 + 24.4.7 From d88dcfb3eed121f05d095afa3a2ad42c00555920 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 12 Aug 2024 15:01:43 +0000 Subject: [PATCH 18/36] Update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.5 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a30..e603ab0d 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -199,7 +199,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.4 + 3.2.5 sign-artifacts From ae41533919a32ed17ac22c629d0576d1f9bbe175 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 18 Aug 2024 02:26:34 +0000 Subject: [PATCH 19/36] Update dependency maven to v3.9.9 --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index e56bc180..4d624fa9 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip From f247c9acbad11e1b6d7ed9f3c0d913ac631d60f9 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Thu, 22 Aug 2024 02:26:24 +0000 Subject: [PATCH 20/36] Update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.7.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a30..54006949 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.6.2 + 3.7.0 From 2f8e6e26ae33d11a0597a5f2878423f5761a71c1 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 23 Aug 2024 02:26:15 +0000 Subject: [PATCH 21/36] Update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.5.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cea11b45..7311976c 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.4.0 + 3.5.0 com.puppycrawl.tools diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a30..1e7c935e 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -242,7 +242,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.4.0 + 3.5.0 com.puppycrawl.tools From 5cf7f3f1c0b5567e7f5797f8f1a16c4ca54ab1d0 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 23 Aug 2024 02:26:16 +0000 Subject: [PATCH 22/36] Update dependency org.apache.maven.plugins:maven-jxr-plugin to v3.5.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cea11b45..d5f11c8b 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ org.apache.maven.plugins maven-jxr-plugin - 3.4.0 + 3.5.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a30..4e1a3ccb 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -301,7 +301,7 @@ org.apache.maven.plugins maven-jxr-plugin - 3.4.0 + 3.5.0 From fdd3d611a02fe75d6eb0d03573dc862437b378ea Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 26 Aug 2024 02:27:01 +0000 Subject: [PATCH 23/36] Update dependency com.puppycrawl.tools:checkstyle to v10.18.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cea11b45..559e3c09 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ com.puppycrawl.tools checkstyle - 10.17.0 + 10.18.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a30..989286a6 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -247,7 +247,7 @@ com.puppycrawl.tools checkstyle - 10.17.0 + 10.18.0 From ca025085f1b5302d0251ff6386ebacea52dc0850 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Wed, 28 Aug 2024 02:27:15 +0000 Subject: [PATCH 24/36] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.10.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 9f9e0347..0abe26e8 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -143,7 +143,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 + 3.10.0 attach-javadocs From 409f50d453be93f747e55b02f3d100452f335a50 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Wed, 28 Aug 2024 02:27:16 +0000 Subject: [PATCH 25/36] Update dependency org.apache.maven.plugins:maven-pmd-plugin to v3.25.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f13d4f47..421afd41 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.24.0 + 3.25.0 true true diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 9f9e0347..8f3bbba6 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -272,7 +272,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.24.0 + 3.25.0 true true From b57b0ded1e56a521b8ed235fd90fb318b56d35ac Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Wed, 28 Aug 2024 10:58:02 +0000 Subject: [PATCH 26/36] Update org.springframework.boot.version to v3.3.3 --- template-placeholder-demo/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index f9b5e763..54fce3da 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -31,7 +31,7 @@ 24.4.7 - 3.3.2 + 3.3.3 From c1f8c94accf7e82eabd43c7a61964077d0264774 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Wed, 28 Aug 2024 10:58:04 +0000 Subject: [PATCH 27/36] Update vaadin.version to v24.4.10 --- template-placeholder-demo/pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index f9b5e763..1a345e7f 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -29,7 +29,7 @@ software.xdev.vaadin.Application - 24.4.7 + 24.4.10 3.3.2 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 8fcc9518..e64dcfb2 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -49,7 +49,7 @@ UTF-8 - 24.4.7 + 24.4.10 From dd91ca2102ee0672e6b8e3393ff4a772f8052545 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Wed, 28 Aug 2024 10:58:28 +0000 Subject: [PATCH 28/36] Update dependency com.fasterxml.jackson.core:jackson-databind to v2.17.2 --- vaadin-maps-leaflet-flow/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaadin-maps-leaflet-flow/pom.xml b/vaadin-maps-leaflet-flow/pom.xml index c265b1fd..6fdf0c89 100644 --- a/vaadin-maps-leaflet-flow/pom.xml +++ b/vaadin-maps-leaflet-flow/pom.xml @@ -108,7 +108,7 @@ com.fasterxml.jackson.core jackson-databind - 2.17.1 + 2.17.2 From fadf0e747ce54061fde1fb9cd39c95bb88c6fc37 Mon Sep 17 00:00:00 2001 From: AB Date: Wed, 28 Aug 2024 13:08:10 +0200 Subject: [PATCH 29/36] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c676766e..214ede66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 4.3.1 +* Add "draggable" property to LMarkerOptions #413 (thanks to @ChristianHoesel) + ## 4.3.0 * Updated to Vaadin 24.4 * Deduplicated ``tLMapZoomPanOptions`` From c5b4ec657738f772d1f7d72c00094e87e368cf04 Mon Sep 17 00:00:00 2001 From: AB Date: Wed, 28 Aug 2024 13:08:46 +0200 Subject: [PATCH 30/36] Format --- .../xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java index a72dcd5f..cc1f6ec4 100644 --- a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java +++ b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java @@ -105,7 +105,9 @@ public ComplexDemo() final LMarker markerInfo = new LMarker( this.reg, new LLatLng(this.reg, 49.674662, 12.162869), - new LMarkerOptions().withIcon(divIconInfo).withDraggable(true)); + new LMarkerOptions() + .withIcon(divIconInfo) + .withDraggable(true)); @SuppressWarnings("checkstyle:LineLength") final LIcon iconXDEV = new LIcon(this.reg, new LIconOptions() From e88198c483ec4863ea349829acbdc89d10eb49bb Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sat, 31 Aug 2024 02:27:43 +0000 Subject: [PATCH 31/36] Update dependency com.puppycrawl.tools:checkstyle to v10.18.1 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 421afd41..f58e4f69 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ com.puppycrawl.tools checkstyle - 10.18.0 + 10.18.1 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index e9e06ad4..1dbf7b07 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -247,7 +247,7 @@ com.puppycrawl.tools checkstyle - 10.18.0 + 10.18.1 From 221053a1c1b6d8adc94e58e04ebdab04c77561ee Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sat, 31 Aug 2024 02:27:44 +0000 Subject: [PATCH 32/36] Update net.sourceforge.pmd to v7.5.0 --- pom.xml | 4 ++-- template-placeholder/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 421afd41..3fe9409a 100644 --- a/pom.xml +++ b/pom.xml @@ -82,12 +82,12 @@ net.sourceforge.pmd pmd-core - 7.4.0 + 7.5.0 net.sourceforge.pmd pmd-java - 7.4.0 + 7.5.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index e9e06ad4..a7e69a67 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -284,12 +284,12 @@ net.sourceforge.pmd pmd-core - 7.4.0 + 7.5.0 net.sourceforge.pmd pmd-java - 7.4.0 + 7.5.0 From 75f839e8d25a3dc3079102aa79f7e073a8bcde6b Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Mon, 2 Sep 2024 09:37:58 +0200 Subject: [PATCH 33/36] Fix sonar PR detection --- .github/workflows/sonar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 7824917b..b38f0d82 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -11,7 +11,7 @@ on: - '.idea/**' - 'assets/**' pull_request: - types: [opened, synchronize, reopened] + branches: [ develop ] paths-ignore: - '**.md' - '.config/**' From 10a03a56f8a802aecf6f0198e85f5fe2bd92fa6c Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Tue, 3 Sep 2024 02:27:24 +0000 Subject: [PATCH 34/36] Update vaadin.version to v24.4.11 --- template-placeholder-demo/pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index 6adf6da0..fd6bc929 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -29,7 +29,7 @@ software.xdev.vaadin.Application - 24.4.10 + 24.4.11 3.3.3 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 735adbaa..840b1ea0 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -49,7 +49,7 @@ UTF-8 - 24.4.10 + 24.4.11 From ca4a4eadf961fcdacefe5ab2adf53bdf77adb796 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 3 Sep 2024 11:40:23 +0200 Subject: [PATCH 35/36] Added GeoJSON and FeatureGroup Fixes #438 --- CHANGELOG.md | 3 + .../vaadin/maps/leaflet/flow/DemoView.java | 6 + .../maps/leaflet/flow/demo/GeoJSONDemo.java | 75 ++++++++++++ .../leaflet/base/has/LHasSetStylePath.java | 29 +++++ .../leaflet/layer/LAbstractLayerGroup.java | 64 ++++++++++ .../maps/leaflet/layer/LLayerGroup.java | 30 +---- .../layer/other/LAbstractFeatureGroup.java | 39 ++++++ .../leaflet/layer/other/LFeatureGroup.java | 59 +++++++++ .../leaflet/layer/other/LGeoJSONLayer.java | 82 +++++++++++++ .../layer/other/LGeoJSONLayerOptions.java | 112 ++++++++++++++++++ .../maps/leaflet/layer/vector/LPath.java | 12 +- 11 files changed, 472 insertions(+), 39 deletions(-) create mode 100644 vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/GeoJSONDemo.java create mode 100644 vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/base/has/LHasSetStylePath.java create mode 100644 vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LAbstractLayerGroup.java create mode 100644 vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LAbstractFeatureGroup.java create mode 100644 vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LFeatureGroup.java create mode 100644 vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LGeoJSONLayer.java create mode 100644 vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LGeoJSONLayerOptions.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 214ede66..ea444038 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 4.4.0 +* Added support for [GeoJSON](https://leafletjs.com/reference.html#geojson) and [FeatureGroup](https://leafletjs.com/reference.html#featuregroup) #438 + ## 4.3.1 * Add "draggable" property to LMarkerOptions #413 (thanks to @ChristianHoesel) diff --git a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/DemoView.java b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/DemoView.java index 18f86330..e5fe26f6 100644 --- a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/DemoView.java +++ b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/DemoView.java @@ -16,6 +16,7 @@ import software.xdev.vaadin.maps.leaflet.flow.demo.ComplexDemo; import software.xdev.vaadin.maps.leaflet.flow.demo.EventDemo; import software.xdev.vaadin.maps.leaflet.flow.demo.FreeingUpResourceBenchmarkDemo; +import software.xdev.vaadin.maps.leaflet.flow.demo.GeoJSONDemo; import software.xdev.vaadin.maps.leaflet.flow.demo.InitialResizeDemo; import software.xdev.vaadin.maps.leaflet.flow.demo.MinimalisticDemo; import software.xdev.vaadin.maps.leaflet.flow.demo.MultiLayerWithPyramidDemo; @@ -93,6 +94,11 @@ protected void onAttach(final AttachEvent attachEvent) "using Pyramids ▲ and more...\n" + "Showcases a selection of different layers and how they can be displayed on a map" ), + new Example( + GeoJSONDemo.NAV, + "GeoJSON", + "Showcases how GeoJSON can be used" + ), new Example( FreeingUpResourceBenchmarkDemo.NAV, "Freeing up resources Benchmark", diff --git a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/GeoJSONDemo.java b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/GeoJSONDemo.java new file mode 100644 index 00000000..e7fbb38c --- /dev/null +++ b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/GeoJSONDemo.java @@ -0,0 +1,75 @@ +package software.xdev.vaadin.maps.leaflet.flow.demo; + +import com.vaadin.flow.component.html.Anchor; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.router.Route; + +import software.xdev.vaadin.maps.leaflet.MapContainer; +import software.xdev.vaadin.maps.leaflet.base.RawString; +import software.xdev.vaadin.maps.leaflet.basictypes.LLatLng; +import software.xdev.vaadin.maps.leaflet.layer.other.LGeoJSONLayer; +import software.xdev.vaadin.maps.leaflet.layer.other.LGeoJSONLayerOptions; +import software.xdev.vaadin.maps.leaflet.layer.raster.LTileLayer; +import software.xdev.vaadin.maps.leaflet.map.LMap; +import software.xdev.vaadin.maps.leaflet.registry.LComponentManagementRegistry; +import software.xdev.vaadin.maps.leaflet.registry.LDefaultComponentManagementRegistry; + + +@Route(GeoJSONDemo.NAV) +@SuppressWarnings("checkstyle:MagicNumber") +public class GeoJSONDemo extends VerticalLayout +{ + public static final String NAV = "/geojson"; + + public GeoJSONDemo() + { + // Let the view use 100% of the site + this.setSizeFull(); + + this.add(new Anchor("https://leafletjs.com/examples/geojson", "Based on this example")); + + // Create the registry which is needed so that components can be reused and their methods invoked + // Note: You normally don't need to invoke any methods of the registry and just hand it over to the components + final LComponentManagementRegistry reg = new LDefaultComponentManagementRegistry(this); + + // Create and add the MapContainer (which contains the map) to the UI + final MapContainer mapContainer = new MapContainer(reg); + mapContainer.setSizeFull(); + this.add(mapContainer); + + final LMap map = mapContainer.getlMap(); + + // Add a (default) TileLayer so that we can see something on the map + map.addLayer(LTileLayer.createDefaultForOpenStreetMapTileServer(reg)); + + // Set what part of the world should be shown + map.setView(new LLatLng(reg, 39.75621, -104.99404), 17); + + // Handle GeoJSON + final String serializedGeoJSON = """ + { + "type": "Feature", + "properties": { + "name": "Coors Field", + "amenity": "Baseball Stadium", + "popupContent": "This is where the Rockies play!" + }, + "geometry": { + "type": "Point", + "coordinates": [-104.99404, 39.75621] + } + } + """; + new LGeoJSONLayer( + reg, + serializedGeoJSON, + new LGeoJSONLayerOptions() + .withOnEachFeature(new RawString("(feature, layer) => { " + + " if (feature.properties && feature.properties.popupContent) { " + + " layer.bindPopup(feature.properties.popupContent); " + + " }" + + " }")) + ) + .addTo(map); + } +} diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/base/has/LHasSetStylePath.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/base/has/LHasSetStylePath.java new file mode 100644 index 00000000..3b0a7d95 --- /dev/null +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/base/has/LHasSetStylePath.java @@ -0,0 +1,29 @@ +/* + * Copyright © 2019 XDEV Software (https://xdev.software) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package software.xdev.vaadin.maps.leaflet.base.has; + +import software.xdev.vaadin.maps.leaflet.base.LComponent; +import software.xdev.vaadin.maps.leaflet.layer.vector.LPathOptions; + + +public interface LHasSetStylePath> extends LComponent +{ + default S setStyle(final LPathOptions options) + { + this.invokeSelf(".setStyle(" + this.componentRegistry().writeOptionsOrEmptyObject(options) + ")"); + return this.self(); + } +} diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LAbstractLayerGroup.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LAbstractLayerGroup.java new file mode 100644 index 00000000..3b7cce06 --- /dev/null +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LAbstractLayerGroup.java @@ -0,0 +1,64 @@ +/* + * Copyright © 2019 XDEV Software (https://xdev.software) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package software.xdev.vaadin.maps.leaflet.layer; + +import java.io.Serializable; + +import software.xdev.vaadin.maps.leaflet.base.has.LHasSetZIndex; +import software.xdev.vaadin.maps.leaflet.registry.LComponentManagementRegistry; + + +/** + * @see Leaflet docs + */ +public class LAbstractLayerGroup> extends LLayer + implements LHasSetZIndex +{ + protected LAbstractLayerGroup( + final LComponentManagementRegistry compReg, + final String jsConstructorCallExpression, + final Serializable... parameters) + { + super(compReg, jsConstructorCallExpression, parameters); + } + + /** + * @see Leaflet docs + */ + public S addLayer(final LLayer layer) + { + this.invokeSelf(".addLayer(" + layer.clientComponentJsAccessor() + ")"); + return this.self(); + } + + /** + * @see Leaflet docs + */ + public S removeLayer(final LLayer layer) + { + this.invokeSelf(".removeLayer(" + layer.clientComponentJsAccessor() + ")"); + return this.self(); + } + + /** + * @see Leaflet docs + */ + public S clearLayers() + { + this.invokeSelf(".clearLayers()"); + return this.self(); + } +} diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LLayerGroup.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LLayerGroup.java index f79cab75..caa41350 100644 --- a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LLayerGroup.java +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LLayerGroup.java @@ -18,14 +18,13 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import software.xdev.vaadin.maps.leaflet.base.has.LHasSetZIndex; import software.xdev.vaadin.maps.leaflet.registry.LComponentManagementRegistry; /** * @see Leaflet docs */ -public class LLayerGroup extends LLayer implements LHasSetZIndex +public class LLayerGroup extends LAbstractLayerGroup { public LLayerGroup( final LComponentManagementRegistry compReg, @@ -54,31 +53,4 @@ public LLayerGroup( { this(compReg, layers, null); } - - /** - * @see Leaflet docs - */ - public LLayerGroup addLayer(final LLayer layer) - { - this.invokeSelf(".addLayer(" + layer.clientComponentJsAccessor() + ")"); - return this.self(); - } - - /** - * @see Leaflet docs - */ - public LLayerGroup removeLayer(final LLayer layer) - { - this.invokeSelf(".removeLayer(" + layer.clientComponentJsAccessor() + ")"); - return this.self(); - } - - /** - * @see Leaflet docs - */ - public LLayerGroup clearLayers() - { - this.invokeSelf(".clearLayers()"); - return this.self(); - } } diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LAbstractFeatureGroup.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LAbstractFeatureGroup.java new file mode 100644 index 00000000..33acc8bc --- /dev/null +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LAbstractFeatureGroup.java @@ -0,0 +1,39 @@ +/* + * Copyright © 2019 XDEV Software (https://xdev.software) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package software.xdev.vaadin.maps.leaflet.layer.other; + +import java.io.Serializable; + +import software.xdev.vaadin.maps.leaflet.base.has.LHasBringTo; +import software.xdev.vaadin.maps.leaflet.base.has.LHasSetStylePath; +import software.xdev.vaadin.maps.leaflet.layer.LAbstractLayerGroup; +import software.xdev.vaadin.maps.leaflet.registry.LComponentManagementRegistry; + + +/** + * @see Leaflet docs + */ +public class LAbstractFeatureGroup> extends LAbstractLayerGroup + implements LHasBringTo, LHasSetStylePath +{ + protected LAbstractFeatureGroup( + final LComponentManagementRegistry compReg, + final String jsConstructorCallExpression, + final Serializable... parameters) + { + super(compReg, jsConstructorCallExpression, parameters); + } +} diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LFeatureGroup.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LFeatureGroup.java new file mode 100644 index 00000000..04f8e111 --- /dev/null +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LFeatureGroup.java @@ -0,0 +1,59 @@ +/* + * Copyright © 2019 XDEV Software (https://xdev.software) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package software.xdev.vaadin.maps.leaflet.layer.other; + +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import software.xdev.vaadin.maps.leaflet.layer.LAbstractLayerGroup; +import software.xdev.vaadin.maps.leaflet.layer.LLayer; +import software.xdev.vaadin.maps.leaflet.layer.LLayerOptions; +import software.xdev.vaadin.maps.leaflet.registry.LComponentManagementRegistry; + + +/** + * @see Leaflet docs + */ +public class LFeatureGroup extends LAbstractLayerGroup +{ + public LFeatureGroup( + final LComponentManagementRegistry compReg, + final LLayer[] layers, + final LLayerOptions[] options) + { + super( + compReg, + "L.featureGroup(" + + (layers != null + ? "[" + Stream.of(layers) + .map(LLayer::clientComponentJsAccessor) + .collect(Collectors.joining(",")) + "]" + : "") + + (options != null + ? ", [" + Stream.of(options) + .map(compReg::writeOptionsOrEmptyObject) + .collect(Collectors.joining(",")) + "]" + : "") + + ")"); + } + + public LFeatureGroup( + final LComponentManagementRegistry compReg, + final LLayer... layers) + { + this(compReg, layers, null); + } +} diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LGeoJSONLayer.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LGeoJSONLayer.java new file mode 100644 index 00000000..aab95c34 --- /dev/null +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LGeoJSONLayer.java @@ -0,0 +1,82 @@ +/* + * Copyright © 2019 XDEV Software (https://xdev.software) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package software.xdev.vaadin.maps.leaflet.layer.other; + +import java.io.Serializable; + +import software.xdev.vaadin.maps.leaflet.layer.LLayer; +import software.xdev.vaadin.maps.leaflet.registry.LComponentManagementRegistry; + + +/** + * @see Leaflet docs + */ +public class LGeoJSONLayer extends LAbstractFeatureGroup +{ + protected LGeoJSONLayer( + final LComponentManagementRegistry compReg, + final String jsConstructorCallExpression, + final Serializable... parameters) + { + super(compReg, jsConstructorCallExpression, parameters); + } + + public LGeoJSONLayer( + final LComponentManagementRegistry compReg, + final String serializedGeoJSON, + final LGeoJSONLayerOptions options) + { + super( + compReg, + "L.geoJSON(" + + serializedGeoJSON + + compReg.writeOptionsOptionalNextParameter(options) + ")"); + } + + public LGeoJSONLayer( + final LComponentManagementRegistry compReg, + final String serializedGeoJSON) + { + this(compReg, serializedGeoJSON, (LGeoJSONLayerOptions)null); + } + + /** + * @see Leaflet docs + */ + public LGeoJSONLayer addData(final String serializedGeoJSON) + { + this.invokeSelf(".addLayer(" + serializedGeoJSON + ")"); + return this.self(); + } + + /** + * @see Leaflet docs + */ + public LGeoJSONLayer resetStyle(final LLayer layer) + { + this.invokeSelf(".resetStyle(" + (layer != null ? layer.clientComponentJsAccessor() : "") + ")"); + return this.self(); + } + + /** + * @see Leaflet docs + */ + public LGeoJSONLayer resetStyle() + { + return this.resetStyle(null); + } + +} diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LGeoJSONLayerOptions.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LGeoJSONLayerOptions.java new file mode 100644 index 00000000..cf3ab326 --- /dev/null +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/other/LGeoJSONLayerOptions.java @@ -0,0 +1,112 @@ +/* + * Copyright © 2019 XDEV Software (https://xdev.software) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package software.xdev.vaadin.maps.leaflet.layer.other; + +import software.xdev.vaadin.maps.leaflet.base.RawString; +import software.xdev.vaadin.maps.leaflet.layer.LInteractiveLayerOptions; + + +/** + * @see Leaflet docs + */ +public class LGeoJSONLayerOptions extends LInteractiveLayerOptions +{ + private RawString pointToLayer; + private RawString style; + private RawString onEachFeature; + private RawString coordsToLatLng; + private Boolean markersInheritOptions; + + public RawString getPointToLayer() + { + return this.pointToLayer; + } + + public void setPointToLayer(final RawString pointToLayer) + { + this.pointToLayer = pointToLayer; + } + + public LGeoJSONLayerOptions withPointToLayer(final RawString pointToLayer) + { + this.setPointToLayer(pointToLayer); + return this.self(); + } + + public RawString getStyle() + { + return this.style; + } + + public void setStyle(final RawString style) + { + this.style = style; + } + + public LGeoJSONLayerOptions withStyle(final RawString style) + { + this.setStyle(style); + return this.self(); + } + + public RawString getOnEachFeature() + { + return this.onEachFeature; + } + + public void setOnEachFeature(final RawString onEachFeature) + { + this.onEachFeature = onEachFeature; + } + + public LGeoJSONLayerOptions withOnEachFeature(final RawString onEachFeature) + { + this.setOnEachFeature(onEachFeature); + return this.self(); + } + + public RawString getCoordsToLatLng() + { + return this.coordsToLatLng; + } + + public void setCoordsToLatLng(final RawString coordsToLatLng) + { + this.coordsToLatLng = coordsToLatLng; + } + + public LGeoJSONLayerOptions withCoordsToLatLng(final RawString coordsToLatLng) + { + this.setCoordsToLatLng(coordsToLatLng); + return this.self(); + } + + public Boolean getMarkersInheritOptions() + { + return this.markersInheritOptions; + } + + public void setMarkersInheritOptions(final Boolean markersInheritOptions) + { + this.markersInheritOptions = markersInheritOptions; + } + + public LGeoJSONLayerOptions withMarkersInheritOptions(final Boolean markersInheritOptions) + { + this.setMarkersInheritOptions(markersInheritOptions); + return this.self(); + } +} diff --git a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/vector/LPath.java b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/vector/LPath.java index b81a62ad..fe19e526 100644 --- a/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/vector/LPath.java +++ b/vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/vector/LPath.java @@ -19,6 +19,7 @@ import software.xdev.vaadin.maps.leaflet.base.has.LHasBringTo; import software.xdev.vaadin.maps.leaflet.base.has.LHasRedraw; +import software.xdev.vaadin.maps.leaflet.base.has.LHasSetStylePath; import software.xdev.vaadin.maps.leaflet.layer.LInteractiveLayer; import software.xdev.vaadin.maps.leaflet.registry.LComponentManagementRegistry; @@ -27,7 +28,7 @@ * @see Leaflet docs */ public abstract class LPath> extends LInteractiveLayer - implements LHasBringTo, LHasRedraw + implements LHasBringTo, LHasRedraw, LHasSetStylePath { protected LPath( final LComponentManagementRegistry compReg, @@ -36,13 +37,4 @@ protected LPath( { super(compReg, jsConstructorCallExpression, parameters); } - - /** - * @see Leaflet docs - */ - public S setStyle(final LPathOptions options) - { - this.invokeSelf(".setStyle(" + this.componentRegistry().writeOptionsOrEmptyObject(options) + ")"); - return this.self(); - } } From 0a4b1177788ff77698ac48fe14256c03756d4b66 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 3 Sep 2024 11:41:57 +0200 Subject: [PATCH 36/36] Next version is minor version --- CHANGELOG.md | 2 -- pom.xml | 2 +- vaadin-maps-leaflet-flow-demo/pom.xml | 4 ++-- vaadin-maps-leaflet-flow/pom.xml | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea444038..15f7ffd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,5 @@ ## 4.4.0 * Added support for [GeoJSON](https://leafletjs.com/reference.html#geojson) and [FeatureGroup](https://leafletjs.com/reference.html#featuregroup) #438 - -## 4.3.1 * Add "draggable" property to LMarkerOptions #413 (thanks to @ChristianHoesel) ## 4.3.0 diff --git a/pom.xml b/pom.xml index 6d24ed4c..9f6b4782 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ software.xdev vaadin-maps-leaflet-flow-root - 4.3.1-SNAPSHOT + 4.4.0-SNAPSHOT pom diff --git a/vaadin-maps-leaflet-flow-demo/pom.xml b/vaadin-maps-leaflet-flow-demo/pom.xml index d6d6be6a..e219b9bf 100644 --- a/vaadin-maps-leaflet-flow-demo/pom.xml +++ b/vaadin-maps-leaflet-flow-demo/pom.xml @@ -7,11 +7,11 @@ software.xdev vaadin-maps-leaflet-flow-root - 4.3.1-SNAPSHOT + 4.4.0-SNAPSHOT vaadin-maps-leaflet-flow-demo - 4.3.1-SNAPSHOT + 4.4.0-SNAPSHOT jar diff --git a/vaadin-maps-leaflet-flow/pom.xml b/vaadin-maps-leaflet-flow/pom.xml index fb8ac790..3d8feaac 100644 --- a/vaadin-maps-leaflet-flow/pom.xml +++ b/vaadin-maps-leaflet-flow/pom.xml @@ -6,7 +6,7 @@ software.xdev vaadin-maps-leaflet-flow - 4.3.1-SNAPSHOT + 4.4.0-SNAPSHOT jar vaadin-maps-leaflet-flow