From 53ea54d747bf2fa1e6dd6daf065bbe09a7a8ae0a Mon Sep 17 00:00:00 2001 From: Ahmad bawaneh Date: Sun, 13 Jun 2021 13:53:40 +0300 Subject: [PATCH 1/4] Update for next development version --- domino-ui-shared/pom.xml | 2 +- domino-ui-tools/mdi-icons-processor/pom.xml | 2 +- domino-ui-tools/pom.xml | 2 +- domino-ui-tools/theme-processor/pom.xml | 2 +- domino-ui-webjar/pom.xml | 2 +- domino-ui/pom.xml | 2 +- pom.xml | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/domino-ui-shared/pom.xml b/domino-ui-shared/pom.xml index 453976854..ca5837b38 100644 --- a/domino-ui-shared/pom.xml +++ b/domino-ui-shared/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.0-RC5 + HEAD-SNAPSHOT jar 4.0.0 diff --git a/domino-ui-tools/mdi-icons-processor/pom.xml b/domino-ui-tools/mdi-icons-processor/pom.xml index d80b0a766..35de5723a 100644 --- a/domino-ui-tools/mdi-icons-processor/pom.xml +++ b/domino-ui-tools/mdi-icons-processor/pom.xml @@ -5,7 +5,7 @@ domino-ui-tools org.dominokit - 1.0.0-RC5 + HEAD-SNAPSHOT 4.0.0 diff --git a/domino-ui-tools/pom.xml b/domino-ui-tools/pom.xml index 8565b2aad..54280b893 100644 --- a/domino-ui-tools/pom.xml +++ b/domino-ui-tools/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.0-RC5 + HEAD-SNAPSHOT 4.0.0 diff --git a/domino-ui-tools/theme-processor/pom.xml b/domino-ui-tools/theme-processor/pom.xml index 9a4e9ba81..1da69b4fd 100644 --- a/domino-ui-tools/theme-processor/pom.xml +++ b/domino-ui-tools/theme-processor/pom.xml @@ -5,7 +5,7 @@ domino-ui-tools org.dominokit - 1.0.0-RC5 + HEAD-SNAPSHOT 4.0.0 diff --git a/domino-ui-webjar/pom.xml b/domino-ui-webjar/pom.xml index 0ebe080f5..3be91495e 100644 --- a/domino-ui-webjar/pom.xml +++ b/domino-ui-webjar/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.0-RC5 + HEAD-SNAPSHOT jar 4.0.0 diff --git a/domino-ui/pom.xml b/domino-ui/pom.xml index 5eca3d8a6..bafc95ebc 100644 --- a/domino-ui/pom.xml +++ b/domino-ui/pom.xml @@ -6,7 +6,7 @@ org.dominokit domino-ui-parent - 1.0.0-RC5 + HEAD-SNAPSHOT domino-ui diff --git a/pom.xml b/pom.xml index ae05d7e3e..b160588d6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.dominokit domino-ui-parent - 1.0.0-RC5 + HEAD-SNAPSHOT pom domino-ui-parent @@ -68,7 +68,7 @@ HEAD-SNAPSHOT - 1.0.0-RC5 + 1.0.0-RC6 1.8 1.8 From d48a3c72acd019ed82505dc520ba89d9b9ce9cce Mon Sep 17 00:00:00 2001 From: Ahmad bawaneh Date: Sun, 13 Jun 2021 14:16:55 +0300 Subject: [PATCH 2/4] fix maven central badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83c2aba10..f20d3a66c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Development Build Status](https://github.com/DominoKit/domino-ui/actions/workflows/deploy.yaml/badge.svg?branch=development)](https://github.com/DominoKit/domino-ui/actions/workflows/deploy.yaml/badge.svg?branch=development) -![Maven Central](https://img.shields.io/badge/Release-1.0.0--RC4-green) +![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.dominokit/domino-ui/badge.svg) ![Sonatype Nexus (Snapshots)](https://img.shields.io/badge/Snapshot-HEAD--SNAPSHOT-orange) ![GWT3/J2CL compatible](https://img.shields.io/badge/GWT3/J2CL-compatible-brightgreen.svg) From 952e2b818cdddf96d04934d1b5dae144d435813d Mon Sep 17 00:00:00 2001 From: Ahmad bawaneh Date: Sun, 20 Jun 2021 15:25:08 +0300 Subject: [PATCH 3/4] fix select none options remains selected --- .../domino/ui/forms/AbstractSelect.java | 5 ++++- .../dominokit/domino/ui/forms/MultiSelect.java | 4 ++-- .../org/dominokit/domino/ui/forms/Select.java | 16 ++++++++++------ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/AbstractSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/AbstractSelect.java index 51bd7f8ba..ad130aa28 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/AbstractSelect.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/AbstractSelect.java @@ -173,13 +173,16 @@ public void setArrowIconSupplier(Supplier> arrowIconSupplier) { @Override public S clear() { unfloatLabel(); - getOptions().forEach(selectOption -> selectOption.deselect(true)); + doClear(); valuesContainer.setTextContent(""); showPlaceholder(); if (isAutoValidation()) validate(); return (S) this; } + /** Clear the current selection based on the implementation */ + protected abstract void doClear(); + /** * Opens the select dropdown menu * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/MultiSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/MultiSelect.java index c896114ce..254e539bf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/MultiSelect.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/MultiSelect.java @@ -245,9 +245,9 @@ public String getStringValue() { /** {@inheritDoc} */ @Override - public MultiSelect clear() { + protected void doClear() { + selectedOptions.forEach(SelectOption::deselect); selectedOptions.clear(); - return super.clear(); } /** @return List of Integer indices of all select options */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Select.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Select.java index 8703fb252..359bed31d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Select.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Select.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; +import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; import java.util.List; import java.util.Objects; @@ -133,8 +134,9 @@ public DropDownMenu getOptionsMenu() { /** {@inheritDoc} */ @Override public Select select(SelectOption option, boolean silent) { - if (selectedOption != null) - if (!option.isEqualNode(selectedOption.element())) selectedOption.deselect(); + if (nonNull(selectedOption) && !option.isEqualNode(selectedOption.element())) { + selectedOption.deselect(); + } floatLabel(); this.selectedOption = option; option.select(); @@ -178,9 +180,11 @@ public String getStringValue() { /** {@inheritDoc} */ @Override - public Select clear() { - this.selectedOption = null; - return super.clear(); + protected void doClear() { + if (nonNull(selectedOption)) { + selectedOption.deselect(); + selectedOption = null; + } } /** @return int index of selected {@link SelectOption} */ @@ -205,7 +209,7 @@ public HTMLElement element(SelectOption option) { Icons.ALL .check() .styler(style1 -> style1.add(Styles.pull_right).add("select-option-check-mark")); - FlexItem checkMarkFlexItem = FlexItem.create(); + FlexItem checkMarkFlexItem = FlexItem.create(); checkMarkFlexItem.appendChild(checkMark); option.getOptionLayoutElement().appendChild(checkMarkFlexItem); From 5071fe428377692119a92546103b63f343751f5d Mon Sep 17 00:00:00 2001 From: Ahmad bawaneh Date: Sun, 20 Jun 2021 15:25:26 +0300 Subject: [PATCH 4/4] Update versions for release --- domino-ui-shared/pom.xml | 2 +- domino-ui-tools/mdi-icons-processor/pom.xml | 2 +- domino-ui-tools/pom.xml | 2 +- domino-ui-tools/theme-processor/pom.xml | 2 +- domino-ui-webjar/pom.xml | 2 +- domino-ui/pom.xml | 2 +- pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/domino-ui-shared/pom.xml b/domino-ui-shared/pom.xml index ca5837b38..3b96ad213 100644 --- a/domino-ui-shared/pom.xml +++ b/domino-ui-shared/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - HEAD-SNAPSHOT + 1.0.0-RC6 jar 4.0.0 diff --git a/domino-ui-tools/mdi-icons-processor/pom.xml b/domino-ui-tools/mdi-icons-processor/pom.xml index 35de5723a..5157a34ac 100644 --- a/domino-ui-tools/mdi-icons-processor/pom.xml +++ b/domino-ui-tools/mdi-icons-processor/pom.xml @@ -5,7 +5,7 @@ domino-ui-tools org.dominokit - HEAD-SNAPSHOT + 1.0.0-RC6 4.0.0 diff --git a/domino-ui-tools/pom.xml b/domino-ui-tools/pom.xml index 54280b893..60823caae 100644 --- a/domino-ui-tools/pom.xml +++ b/domino-ui-tools/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - HEAD-SNAPSHOT + 1.0.0-RC6 4.0.0 diff --git a/domino-ui-tools/theme-processor/pom.xml b/domino-ui-tools/theme-processor/pom.xml index 1da69b4fd..c1e2823f2 100644 --- a/domino-ui-tools/theme-processor/pom.xml +++ b/domino-ui-tools/theme-processor/pom.xml @@ -5,7 +5,7 @@ domino-ui-tools org.dominokit - HEAD-SNAPSHOT + 1.0.0-RC6 4.0.0 diff --git a/domino-ui-webjar/pom.xml b/domino-ui-webjar/pom.xml index 3be91495e..897bf4de0 100644 --- a/domino-ui-webjar/pom.xml +++ b/domino-ui-webjar/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - HEAD-SNAPSHOT + 1.0.0-RC6 jar 4.0.0 diff --git a/domino-ui/pom.xml b/domino-ui/pom.xml index bafc95ebc..e4f4eaf28 100644 --- a/domino-ui/pom.xml +++ b/domino-ui/pom.xml @@ -6,7 +6,7 @@ org.dominokit domino-ui-parent - HEAD-SNAPSHOT + 1.0.0-RC6 domino-ui diff --git a/pom.xml b/pom.xml index b160588d6..2627ed059 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.dominokit domino-ui-parent - HEAD-SNAPSHOT + 1.0.0-RC6 pom domino-ui-parent