From 7aab3b04268d6d315a14dd158a61789f73c37d42 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Thu, 14 Sep 2023 13:24:28 +0300 Subject: [PATCH 1/7] 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 | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/domino-ui-shared/pom.xml b/domino-ui-shared/pom.xml index 13c9c6227..6e5533b89 100644 --- a/domino-ui-shared/pom.xml +++ b/domino-ui-shared/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.3 + 1.0.4-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 7d051df3e..b9bf5f95e 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.3 + 1.0.4-SNAPSHOT 4.0.0 diff --git a/domino-ui-tools/pom.xml b/domino-ui-tools/pom.xml index 117ab9a2b..f3f3103e6 100644 --- a/domino-ui-tools/pom.xml +++ b/domino-ui-tools/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.3 + 1.0.4-SNAPSHOT 4.0.0 diff --git a/domino-ui-tools/theme-processor/pom.xml b/domino-ui-tools/theme-processor/pom.xml index f58339186..bdc32a3d4 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.3 + 1.0.4-SNAPSHOT 4.0.0 diff --git a/domino-ui-webjar/pom.xml b/domino-ui-webjar/pom.xml index 6388c1123..40391a6bf 100644 --- a/domino-ui-webjar/pom.xml +++ b/domino-ui-webjar/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.3 + 1.0.4-SNAPSHOT jar 4.0.0 diff --git a/domino-ui/pom.xml b/domino-ui/pom.xml index a6d9c0def..32b2707e4 100644 --- a/domino-ui/pom.xml +++ b/domino-ui/pom.xml @@ -6,7 +6,7 @@ org.dominokit domino-ui-parent - 1.0.3 + 1.0.4-SNAPSHOT domino-ui diff --git a/pom.xml b/pom.xml index a1fcf5e80..2373caeb8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.dominokit domino-ui-parent - 1.0.3 + 1.0.4-SNAPSHOT pom domino-ui-parent @@ -67,8 +67,8 @@ - 1.0.3-SNAPSHOT - 1.0.3 + 1.0.4-SNAPSHOT + 1.0.4 1.8 1.8 From 3dafd51a66373d7b5561614d203138334980c0d4 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Tue, 17 Oct 2023 10:05:11 +0300 Subject: [PATCH 2/7] fix #856 Datatble hover style does not work with stripes --- .../domino/ui/public/css/datatable/domino-ui-datatable.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/datatable/domino-ui-datatable.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/datatable/domino-ui-datatable.css index 8fbffc76c..eaa599ac2 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/datatable/domino-ui-datatable.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/datatable/domino-ui-datatable.css @@ -344,6 +344,8 @@ table th[class*="col-"] { .table-bordered { } +.table-hover.table-striped > tbody > tr:hover:nth-child(odd):not([class*="details-tr"]):not([class*="bg-"]), +.table-hover.table-striped > tbody > tr:hover:nth-child(even):not([class*="details-tr"]):not([class*="bg-"]), .table-hover > tbody > tr:hover:not([class*="details-tr"]):not([class*="bg-"]) { background-color: #f5f5f5; } From 0195d4535787898c20cc3f5bf67f3c03f68ca2fd Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Tue, 17 Oct 2023 10:15:14 +0300 Subject: [PATCH 3/7] fix #857 Upgrade guava to avoid security issues --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2373caeb8..eef582e65 100644 --- a/pom.xml +++ b/pom.xml @@ -146,7 +146,7 @@ com.google.guava guava - 31.0.1-jre + 32.0.1-jre org.dominokit From 2ddb3fd1c08cf1242a04954cb7310c1cd50c5f7d Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Thu, 26 Oct 2023 18:43:42 +0300 Subject: [PATCH 4/7] fix #862 Scroll loading does not work if the table is not displayed completely horizontally --- .../domino/ui/datatable/plugins/BodyScrollPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java index aea50e886..a29c60937 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java @@ -41,9 +41,10 @@ public void onBodyAdded(DataTable dataTable) { } int offsetHeight = new Double(scrollElement.offsetHeight).intValue(); int scrollHeight = new Double(scrollElement.scrollHeight).intValue(); + int clientHeight = new Double(scrollElement.clientHeight).intValue(); if (JsMath.abs(offsetHeight) + JsMath.abs(scrollTop) - == new Double(scrollHeight).intValue()) { + == new Double(scrollHeight + (offsetHeight - clientHeight)).intValue()) { dataTable.fireTableEvent(new BodyScrollEvent(ScrollPosition.BOTTOM)); } }); From 0a7d4bde01b4536e5a0cbe786a91a9822fb3e742 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Sun, 29 Oct 2023 20:13:51 +0300 Subject: [PATCH 5/7] fix #868 Scroll loading does not work when browser zoom is not 100% --- .../datatable/plugins/BodyScrollPlugin.java | 25 +++++++++- .../plugins/BodyScrollPluginConfig.java | 49 +++++++++++++++++++ 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPluginConfig.java diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java index a29c60937..0da1cc0ec 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java @@ -26,7 +26,10 @@ * * @param the type of the data table records */ -public class BodyScrollPlugin implements DataTablePlugin { +public class BodyScrollPlugin + implements DataTablePlugin, HasPluginConfig, BodyScrollPluginConfig> { + + private BodyScrollPluginConfig config = new BodyScrollPluginConfig(0); /** {@inheritDoc} */ @Override @@ -44,12 +47,30 @@ public void onBodyAdded(DataTable dataTable) { int clientHeight = new Double(scrollElement.clientHeight).intValue(); if (JsMath.abs(offsetHeight) + JsMath.abs(scrollTop) - == new Double(scrollHeight + (offsetHeight - clientHeight)).intValue()) { + >= new Double(scrollHeight + (offsetHeight - clientHeight)).intValue() + - config.getOffset()) { dataTable.fireTableEvent(new BodyScrollEvent(ScrollPosition.BOTTOM)); } }); } + /** + * Sets up the plugin configuration. + * + * @param config The plugin configuration. + */ + @Override + public BodyScrollPlugin setConfig(BodyScrollPluginConfig config) { + this.config = config; + return this; + } + + /** @return the plugin configuration */ + @Override + public BodyScrollPluginConfig getConfig() { + return this.config; + } + /** An enum to specify the postion of the scroll */ public enum ScrollPosition { /** The scroll reached the top */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPluginConfig.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPluginConfig.java new file mode 100644 index 000000000..db69973b0 --- /dev/null +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPluginConfig.java @@ -0,0 +1,49 @@ +/* + * Copyright © 2019 Dominokit + * + * 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 org.dominokit.domino.ui.datatable.plugins; + +/** + * Configuration class for {@link BodyScrollPlugin} Allow the user to define the offset of pixels + * the plugin will use to fire the event before it reach the bottom of the scroll. + */ +public class BodyScrollPluginConfig implements PluginConfig { + + private int offset; + + /** + * creates a new instance with the specified scroll offset. + * + * @param offset number of pixels to be used as scroll offset. + */ + public BodyScrollPluginConfig(int offset) { + this.offset = offset; + } + + /** @return int number of pixels to use as an offset for reaching the scroll bottom. */ + public int getOffset() { + return offset; + } + + /** + * sets the number of pixels to use as an offset for reaching the scroll bottom. + * + * @return same configuration instance + */ + public BodyScrollPluginConfig setOffset(int offset) { + this.offset = offset; + return this; + } +} From 2598beda5261a0350b56f2811643bd4914237008 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Tue, 31 Oct 2023 18:43:49 +0300 Subject: [PATCH 6/7] fix #797 Remove hardcoded style from section --- .../src/main/java/org/dominokit/domino/ui/layout/Section.java | 3 +-- .../org/dominokit/domino/ui/public/css/domino-ui-style.css | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/layout/Section.java b/domino-ui/src/main/java/org/dominokit/domino/ui/layout/Section.java index 2b9dea4cb..28ee8a1ee 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/layout/Section.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/layout/Section.java @@ -22,7 +22,7 @@ import org.dominokit.domino.ui.utils.BaseDominoElement; import org.dominokit.domino.ui.utils.DominoElement; -/** The component that contains the left pabel and right panel of the {@link Layout} */ +/** The component that contains the left panel and right panel of the {@link Layout} */ public class Section extends BaseDominoElement { HTMLElement section; @@ -38,7 +38,6 @@ public Section() { .id("rightsidebar") .css(LayoutStyles.RIGHT_SIDEBAR) .css(LayoutStyles.OVERLAY_OPEN) - .style("height: calc(100vh - 70px); overflow-y: scroll;") .element(); section = DominoElement.of(section()).add(leftSide).add(rightSide).element(); diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui-style.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui-style.css index ad7aee088..8b93657b1 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui-style.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui-style.css @@ -2658,6 +2658,7 @@ a { -ms-box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1); box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1); overflow: hidden; + overflow-y: scroll; -moz-transition: 0.5s; -o-transition: 0.5s; -webkit-transition: 0.5s; From 320a71bfce069064edfa38ac50130d66c141e48d Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Tue, 31 Oct 2023 19:08:38 +0300 Subject: [PATCH 7/7] 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 6e5533b89..ec4995e7e 100644 --- a/domino-ui-shared/pom.xml +++ b/domino-ui-shared/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.4-SNAPSHOT + 1.0.4 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 b9bf5f95e..e7c8e261a 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.4-SNAPSHOT + 1.0.4 4.0.0 diff --git a/domino-ui-tools/pom.xml b/domino-ui-tools/pom.xml index f3f3103e6..6a619cacc 100644 --- a/domino-ui-tools/pom.xml +++ b/domino-ui-tools/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.4-SNAPSHOT + 1.0.4 4.0.0 diff --git a/domino-ui-tools/theme-processor/pom.xml b/domino-ui-tools/theme-processor/pom.xml index bdc32a3d4..8a95b1fb1 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.4-SNAPSHOT + 1.0.4 4.0.0 diff --git a/domino-ui-webjar/pom.xml b/domino-ui-webjar/pom.xml index 40391a6bf..b49b48d0a 100644 --- a/domino-ui-webjar/pom.xml +++ b/domino-ui-webjar/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 1.0.4-SNAPSHOT + 1.0.4 jar 4.0.0 diff --git a/domino-ui/pom.xml b/domino-ui/pom.xml index 32b2707e4..17fcd5d96 100644 --- a/domino-ui/pom.xml +++ b/domino-ui/pom.xml @@ -6,7 +6,7 @@ org.dominokit domino-ui-parent - 1.0.4-SNAPSHOT + 1.0.4 domino-ui diff --git a/pom.xml b/pom.xml index eef582e65..c63c3973c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.dominokit domino-ui-parent - 1.0.4-SNAPSHOT + 1.0.4 pom domino-ui-parent