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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ types.d.ts
/frontend/index.html
vite.generated.ts
vite.config.ts
/src/main/bundles
/src/main/bundles
/src/main/frontend/generated
/src/main/frontend/index.html
15 changes: 10 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

<groupId>com.flowingcode.vaadin.addons.chipfield</groupId>
<artifactId>chipfield-addon</artifactId>
<version>2.6.2-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
<name>ChipField Addon</name>
<description>Integration of paper-chip for Vaadin 14 as a field</description>

<properties>
<vaadin.version>14.8.11</vaadin.version>
<vaadin.version>14.11.13</vaadin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -125,6 +125,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.flowingcode.vaadin</groupId>
<artifactId>json-migration-helper</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Expand All @@ -150,7 +155,7 @@
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>4.3.1</version>
<version>6.3.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -163,7 +168,7 @@
<dependency>
<groupId>com.flowingcode.vaadin.addons.demo</groupId>
<artifactId>commons-demo</artifactId>
<version>3.5.1</version>
<version>3.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -472,7 +477,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<vaadin.version>24.4.12</vaadin.version>
<jetty.version>11.0.12</jetty.version>
<jetty.version>11.0.26</jetty.version>
</properties>
<repositories>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Stream;
import com.flowingcode.vaadin.jsonmigration.JsonMigration;
import com.vaadin.flow.component.AbstractField;
import com.vaadin.flow.component.AttachEvent;
import com.vaadin.flow.component.ComponentEvent;
Expand Down Expand Up @@ -151,7 +152,7 @@ private void configure() {
.addEventListener(
"chip-created",
e -> {
JsonObject eventData = e.getEventData();
JsonObject eventData = JsonMigration.getEventData(e);
String chipLabel = eventData.get(CHIP_LABEL).asString();
T newItem =
findItemByLabel(chipLabel)
Expand All @@ -178,7 +179,7 @@ private void configure() {
.addEventListener(
"chip-removed",
e -> {
JsonObject eventData = e.getEventData();
JsonObject eventData = JsonMigration.getEventData(e);
String chipLabel = eventData.get(CHIP_LABEL).asString();
findItemByLabel(chipLabel).ifPresent(item -> removeSelectedItem(item, true));
})
Expand All @@ -197,7 +198,7 @@ private void configureItems() {
object.put("value", itemLabelGenerator.apply(item));
array.set(index.getAndIncrement(), object);
});
getElement().setPropertyJson("source", array);
JsonMigration.setPropertyJson(getElement(), "source", array);
}

@Override
Expand Down