From 02d0900811fb09b65caf37920b2c8206f32cd47b Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Thu, 9 Nov 2023 15:06:07 +0300 Subject: [PATCH 01/18] 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-webjar/pom.xml | 2 +- domino-ui/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/domino-ui-shared/pom.xml b/domino-ui-shared/pom.xml index c88d122a9..1f341d698 100644 --- a/domino-ui-shared/pom.xml +++ b/domino-ui-shared/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 2.0.0-RC4 + 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 aa38c1ae7..178f2d8e9 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 - 2.0.0-RC4 + HEAD-SNAPSHOT 4.0.0 diff --git a/domino-ui-tools/pom.xml b/domino-ui-tools/pom.xml index 93bec8500..83024dce5 100644 --- a/domino-ui-tools/pom.xml +++ b/domino-ui-tools/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 2.0.0-RC4 + HEAD-SNAPSHOT 4.0.0 diff --git a/domino-ui-webjar/pom.xml b/domino-ui-webjar/pom.xml index 637519591..6485a5624 100644 --- a/domino-ui-webjar/pom.xml +++ b/domino-ui-webjar/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - 2.0.0-RC4 + HEAD-SNAPSHOT jar 4.0.0 diff --git a/domino-ui/pom.xml b/domino-ui/pom.xml index d40953f69..655e1d89b 100644 --- a/domino-ui/pom.xml +++ b/domino-ui/pom.xml @@ -6,7 +6,7 @@ org.dominokit domino-ui-parent - 2.0.0-RC4 + HEAD-SNAPSHOT domino-ui diff --git a/pom.xml b/pom.xml index 04dfe3102..c8370c5de 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.dominokit domino-ui-parent - 2.0.0-RC4 + HEAD-SNAPSHOT pom domino-ui-parent @@ -68,7 +68,7 @@ HEAD-SNAPSHOT - 2.0.0-RC4 + 2.0.0-RC5 11 11 From 61b94e74e437f4c0bf4caf9efa1e76cdff15d3da Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 15 Nov 2023 10:25:22 +0300 Subject: [PATCH 02/18] fix #880 Wrong color for AppLayout header description --- .../css/domino-ui/dui-components/domino-ui-colors-dark.css | 2 +- .../css/domino-ui/dui-components/domino-ui-colors-light.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-colors-dark.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-colors-dark.css index 06b38f5bc..500e88af6 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-colors-dark.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-colors-dark.css @@ -419,7 +419,7 @@ --dui-datatable-border-color: var(--dui-accent-d-4); --dui-datatable-column-resizer-color: var(--dui-accent-d-2); --dui-datatable-pin-column-border-color: var(--dui-accent-d-2); - --dui-nav-bar-description-color: var(--dui-color-1); + --dui-nav-bar-description-color: var(--dui-clr-white); --dui-datatable-tfoot-bg-color: var(--dui-accent-d-4); } diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-colors-light.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-colors-light.css index ed8469603..d981f1a78 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-colors-light.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-colors-light.css @@ -407,6 +407,6 @@ --dui-datatable-border-color: var(--dui-accent-l-4); --dui-datatable-column-resizer-color: var(--dui-accent-l-4); --dui-datatable-pin-column-border-color: var(--dui-accent-l-2); - --dui-nav-bar-description-color: var(--dui-color-1); + --dui-nav-bar-description-color: var(--dui-clr-white); --dui-datatable-tfoot-bg-color: var(--dui-accent-l-5); } \ No newline at end of file From 34e0e909af61dffbd6584fb3507d898e040561b5 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 15 Nov 2023 10:28:39 +0300 Subject: [PATCH 03/18] fix #881 Wrong position for some DropDirections with body having margins --- .../direction/BottomLeftDropDirection.java | 12 ++-- .../direction/BottomMiddleDropDirection.java | 56 ++++++++++++------- .../menu/direction/LeftDownDropDirection.java | 15 ++--- .../direction/LeftMiddleDropDirection.java | 4 +- .../menu/direction/LeftUpDropDirection.java | 26 ++++----- .../direction/RightDownDropDirection.java | 10 +--- .../direction/RightMiddleDropDirection.java | 4 +- .../menu/direction/RightUpDropDirection.java | 4 +- .../direction/TopMiddleDropDirection.java | 47 +++++++++------- .../domino/ui/popover/BasePopover.java | 1 + .../domino/ui/utils/BaseDominoElement.java | 12 ++++ .../dui-components/domino-ui-popovers.css | 4 +- 12 files changed, 117 insertions(+), 78 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java index 2a597c27b..77fec2860 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java @@ -32,11 +32,6 @@ public void position(Element source, Element target) { dui_flex_col_reverse.remove(source); DOMRect targetRect = target.getBoundingClientRect(); DOMRect sourceRect = source.getBoundingClientRect(); - double delta = 0; - double availableSpace = targetRect.left + targetRect.width; - if (availableSpace < sourceRect.width) { - delta = sourceRect.width - availableSpace; - } Style.of(source) .style @@ -44,7 +39,14 @@ public void position(Element source, Element target) { Style.of(source).style.setProperty("left", px.of(targetRect.left)); dui_dd_bottom_left.apply(source); elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); + DOMRect newRect = source.getBoundingClientRect(); + double delta = 0; + double availableSpace = targetRect.left + targetRect.width; + if (availableSpace < newRect.width) { + delta = newRect.width - availableSpace; + } + Style.of(source) .style .setProperty( diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java index 4e8e3502f..eb5bbf611 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java @@ -21,7 +21,10 @@ import static org.dominokit.domino.ui.utils.Unit.px; import elemental2.dom.DOMRect; +import elemental2.dom.DomGlobal; import elemental2.dom.Element; +import elemental2.dom.HTMLElement; +import jsinterop.base.Js; import org.dominokit.domino.ui.style.Style; /** BottomMiddleDropDirection class. */ @@ -31,35 +34,50 @@ public class BottomMiddleDropDirection implements DropDirection { public void position(Element source, Element target) { dui_flex_col_reverse.remove(source); DOMRect targetRect = target.getBoundingClientRect(); - DOMRect sourceRect = source.getBoundingClientRect(); - double delta = 0; - double availableSpace = targetRect.left + targetRect.width; - if (availableSpace < sourceRect.width) { - delta = sourceRect.width - availableSpace; - } elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); targetRect = target.getBoundingClientRect(); - sourceRect = source.getBoundingClientRect(); Style.of(source) .style .setProperty("top", px.of((targetRect.top + window.pageYOffset) + targetRect.height + 1)); - Style.of(source).style.setProperty("left", px.of(targetRect.left)); + Style.of(source).style.setProperty("left", "0"); dui_dd_bottom_middle.apply(source); + DomGlobal.console.info( + "source.offsetLeft : " + Js.uncheckedCast(source).offsetLeft); - DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - targetRect.left - - (newRect.left - targetRect.left) - + window.pageXOffset - - ((newRect.width - targetRect.width) / 2) - - delta)); + DomGlobal.setTimeout( + p0 -> { + DOMRect newRect = source.getBoundingClientRect(); + DOMRect newTargetRect = target.getBoundingClientRect(); + + int innerWidth = window.innerWidth; + + double delta = 0; + double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; + if (availableSpace < (newRect.width / 2)) { + delta = (newRect.width / 2) - availableSpace; + } + + elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); + + Style.of(source) + .style + .setProperty( + "left", + px.of( + newTargetRect.left + - (newRect.width / 2) + + (newTargetRect.width / 2) + + window.pageXOffset + - delta + - elements.body().element().getBoundingClientRect().left)); + + newRect = source.getBoundingClientRect(); + newTargetRect = target.getBoundingClientRect(); + }, + 0); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java index be81674f8..285ff2a7d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java @@ -16,7 +16,6 @@ package org.dominokit.domino.ui.menu.direction; import static elemental2.dom.DomGlobal.window; -import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; @@ -29,7 +28,6 @@ public class LeftDownDropDirection implements DropDirection { /** {@inheritDoc} */ @Override public void position(Element source, Element target) { - dui_flex_col_reverse.remove(source); DOMRect targetRect = target.getBoundingClientRect(); DOMRect sourceRect = source.getBoundingClientRect(); @@ -39,15 +37,16 @@ public void position(Element source, Element target) { delta = sourceRect.height - availableSpace; } - Style.of(source).style.setProperty("top", px.of(targetRect.top + window.pageYOffset - delta)); + Style.of(source).style.setProperty("top", px.of((targetRect.top + window.pageYOffset - delta))); Style.of(source).style.setProperty("left", px.of(targetRect.left)); + dui_dd_left_down.apply(source); - targetRect = target.getBoundingClientRect(); - sourceRect = source.getBoundingClientRect(); elements .elementOf(source) - .setCssProperty("--dui-dd-position-delta", ((targetRect.top - sourceRect.top)) + "px"); + .setCssProperty( + "--dui-dd-position-delta", + ((target.getBoundingClientRect().top - source.getBoundingClientRect().top)) + "px"); elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); @@ -60,7 +59,9 @@ public void position(Element source, Element target) { - (newRect.left - targetRect.left) + window.pageXOffset - sourceRect.width - - 9)); + - (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java index 705fb3feb..2f6a9ea64 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java @@ -72,7 +72,9 @@ public void position(Element source, Element target) { - (newRect.left - targetRect.left) + window.pageXOffset - sourceRect.width - - 9)); + - (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java index 774ac27bd..fd30e60b4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java @@ -33,41 +33,35 @@ public void position(Element source, Element target) { DOMRect targetRect = target.getBoundingClientRect(); DOMRect sourceRect = source.getBoundingClientRect(); - double delta = 0; - double availableSpace = targetRect.top; - if (availableSpace < sourceRect.height) { - delta = sourceRect.height - availableSpace; - } Style.of(source) .style .setProperty( "top", - px.of( - (targetRect.top + window.pageYOffset) - - (sourceRect.height - targetRect.height) - + delta)); + px.of((targetRect.top + window.pageYOffset) - (sourceRect.height - targetRect.height))); Style.of(source).style.setProperty("left", px.of(targetRect.left)); - dui_dd_left_up.apply(source); - targetRect = target.getBoundingClientRect(); - sourceRect = source.getBoundingClientRect(); + dui_dd_left_down.apply(source); elements .elementOf(source) - .setCssProperty("--dui-dd-position-delta", ((targetRect.top - sourceRect.top)) + "px"); + .setCssProperty( + "--dui-dd-position-delta", + ((target.getBoundingClientRect().top - source.getBoundingClientRect().top)) + "px"); elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) .style .setProperty( "left", px.of( - (targetRect.left - (newRect.left - targetRect.left)) + targetRect.left + - (newRect.left - targetRect.left) + window.pageXOffset - sourceRect.width - - 9)); + - (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java index 0e85e3f3e..b9e271bef 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java @@ -22,8 +22,6 @@ import elemental2.dom.DOMRect; import elemental2.dom.Element; -import elemental2.dom.HTMLElement; -import jsinterop.base.Js; import org.dominokit.domino.ui.style.Style; /** RightDownDropDirection class. */ @@ -41,10 +39,6 @@ public void position(Element source, Element target) { delta = sourceRect.height - availableSpace; } - double baseLeft = targetRect.left; - if (target instanceof HTMLElement) { - baseLeft = Math.min(targetRect.left, Js.uncheckedCast(target).offsetLeft); - } Style.of(source).style.setProperty("top", px.of((targetRect.top + window.pageYOffset - delta))); Style.of(source).style.setProperty("left", px.of(targetRect.left)); @@ -65,7 +59,9 @@ public void position(Element source, Element target) { (targetRect.left - (newRect.left - targetRect.left)) + window.pageXOffset + targetRect.width - + 9)); + + (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java index e7e99d8d2..1e2f09135 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java @@ -71,7 +71,9 @@ public void position(Element source, Element target) { (targetRect.left - (newRect.left - targetRect.left)) + window.pageXOffset + targetRect.width - + 9)); + + (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java index 963609844..13dde22b4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java @@ -66,7 +66,9 @@ public void position(Element source, Element target) { (targetRect.left - (newRect.left - targetRect.left)) + window.pageXOffset + targetRect.width - + 9)); + + (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java index 44188707e..65fc56565 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java @@ -21,6 +21,7 @@ import static org.dominokit.domino.ui.utils.Unit.px; import elemental2.dom.DOMRect; +import elemental2.dom.DomGlobal; import elemental2.dom.Element; import org.dominokit.domino.ui.style.Style; @@ -33,34 +34,42 @@ public void position(Element source, Element target) { DOMRect targetRect = target.getBoundingClientRect(); DOMRect sourceRect = source.getBoundingClientRect(); - double delta = 0; - double availableSpace = window.innerWidth + targetRect.left; - if (availableSpace < sourceRect.width) { - delta = sourceRect.width - availableSpace; - } - elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); targetRect = target.getBoundingClientRect(); - sourceRect = source.getBoundingClientRect(); Style.of(source) .style .setProperty("top", px.of((targetRect.top + window.pageYOffset) - sourceRect.height - 1)); - Style.of(source).style.setProperty("left", px.of(targetRect.left)); + Style.of(source).style.setProperty("left", "0"); dui_dd_top_middle.apply(source); - DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - targetRect.left - - (newRect.left - targetRect.left) - + window.pageXOffset - - ((newRect.width - targetRect.width) / 2) - - delta)); + DomGlobal.setTimeout( + p0 -> { + int innerWidth = window.innerWidth; + DOMRect newRect = source.getBoundingClientRect(); + DOMRect newTargetRect = target.getBoundingClientRect(); + + double delta = 0; + double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; + if (availableSpace < (newRect.width / 2)) { + delta = (newRect.width / 2) - availableSpace; + } + elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); + + Style.of(source) + .style + .setProperty( + "left", + px.of( + newTargetRect.left + - (newRect.width / 2) + + (newTargetRect.width / 2) + + window.pageXOffset + - delta + - elements.body().element().getBoundingClientRect().left)); + }, + 0); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/popover/BasePopover.java b/domino-ui/src/main/java/org/dominokit/domino/ui/popover/BasePopover.java index 6f2b547d6..f808d2f7d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/popover/BasePopover.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/popover/BasePopover.java @@ -86,6 +86,7 @@ public BasePopover(Element target) { root = div() .addCss(dui_popover) + .setAttribute("dui-position-x-offset", "9") .appendChild( wrapper = div() diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BaseDominoElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BaseDominoElement.java index 639d02d0b..4ddf8f250 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BaseDominoElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BaseDominoElement.java @@ -57,6 +57,7 @@ import org.dominokit.domino.ui.keyboard.KeyboardEvents; import org.dominokit.domino.ui.menu.Menu; import org.dominokit.domino.ui.menu.direction.DropDirection; +import org.dominokit.domino.ui.popover.Popover; import org.dominokit.domino.ui.popover.Tooltip; import org.dominokit.domino.ui.style.CssClass; import org.dominokit.domino.ui.style.DominoCss; @@ -600,6 +601,17 @@ public T withElement(ChildHandler handler) { return (T) this; } + /** + * Creates a popover and associate it with this component, then apply the specified handler + * + * @param handler The handler to be applied to the newly created popover + * @return same component instance. + */ + public T withPopover(ChildHandler handler) { + handler.apply((T) this, Popover.create(Js.uncheckedCast(element()))); + return (T) this; + } + /** * Registers an observer to be notified when this element is attached to the DOM. * diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-popovers.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-popovers.css index ce550e354..da268f82a 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-popovers.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-popovers.css @@ -47,7 +47,7 @@ } .dui-dd-bottom-middle .dui-popover-wrapper .dui-popover-arrow { - left: 50%; + left: calc(50% + var(--dui-menu-drop-pin-offset, 0)); } .dui-dd-bottom-left .dui-popover-wrapper .dui-popover-arrow { @@ -78,7 +78,7 @@ } .dui-dd-top-middle .dui-popover-wrapper .dui-popover-arrow { - left: 50%; + left: calc(50% + var(--dui-menu-drop-pin-offset, 0)); } .dui-dd-top-left .dui-popover-wrapper .dui-popover-arrow { From 59d41e5acb14a109e91b3839d11ebbde290558fd Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 15 Nov 2023 10:30:06 +0300 Subject: [PATCH 04/18] fix #882 Introduce new InfoBlock component --- .../org/dominokit/domino/ui/i18n/Labels.java | 7 + .../domino/ui/infoboxes/InfoBlock.java | 160 ++++++++++++++++++ .../domino/ui/infoboxes/InfoBlockStyles.java | 26 +++ .../dui-components/domino-ui-info-block.css | 19 +++ 4 files changed, 212 insertions(+) create mode 100644 domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlock.java create mode 100644 domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlockStyles.java create mode 100644 domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-info-block.css diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/i18n/Labels.java b/domino-ui/src/main/java/org/dominokit/domino/ui/i18n/Labels.java index bec7864d1..7ff3978a8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/i18n/Labels.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/i18n/Labels.java @@ -18,6 +18,13 @@ /** The {@code Labels} interface provides methods for retrieving localized labels. */ public interface Labels { + String LOREM_IPSUM_SHORT = + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut enim ad minim veniam, quis nostrud exercitation"; + String LOREM_IPSUM_MEDIUM = + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."; + String LOREM_IPSUM_LONG = + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt."; + /** * Returns the localized label for the "Close" action. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlock.java b/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlock.java new file mode 100644 index 000000000..30102c9b5 --- /dev/null +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlock.java @@ -0,0 +1,160 @@ +/* + * 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.infoboxes; + +import elemental2.dom.Element; +import elemental2.dom.HTMLDivElement; +import org.dominokit.domino.ui.elements.DivElement; +import org.dominokit.domino.ui.layout.NavBar; +import org.dominokit.domino.ui.utils.BaseDominoElement; +import org.dominokit.domino.ui.utils.ChildHandler; +import org.dominokit.domino.ui.utils.LazyChild; + +/** + * The InfoBlock class represents a customizable information block in Domino UI. This class extends + * BaseDominoElement and provides a flexible way to create a block with optional header, body, and + * footer sections. + */ +public class InfoBlock extends BaseDominoElement + implements InfoBlockStyles { + + private final DivElement root; + private final LazyChild header; + private final LazyChild footer; + private final DivElement body; + + /** + * Creates a new instance of InfoBlock. + * + * @return a new InfoBlock instance. + */ + public static InfoBlock create() { + return new InfoBlock(); + } + + /** + * Constructor for InfoBlock. Initializes the root, header, footer, and body elements with default + * styles. + */ + public InfoBlock() { + this.root = div().addCss(dui_info_block).appendChild(body = div().addCss(dui_info_block_body)); + + header = LazyChild.of(NavBar.create().addCss(dui_info_block_header), this.root); + footer = LazyChild.of(NavBar.create().addCss(dui_info_block_footer), this.root); + + init(this); + } + + /** + * Returns the element to which child elements will be appended. + * + * @return the body element of the InfoBlock. + */ + @Override + public Element getAppendTarget() { + return this.body.element(); + } + + /** + * Retrieves the header component of the InfoBlock. + * + * @return the NavBar instance used as the header. + */ + public NavBar getHeader() { + return header.get(); + } + + /** + * Retrieves the footer component of the InfoBlock. + * + * @return the NavBar instance used as the footer. + */ + public NavBar getFooter() { + return footer.get(); + } + + /** + * Retrieves the body component of the InfoBlock. + * + * @return the DivElement used as the body. + */ + public DivElement getBody() { + return body; + } + + /** + * Ensures the header is initialized and returns the current instance for chaining. + * + * @return the current InfoBlock instance. + */ + public InfoBlock withHeader() { + this.header.get(); + return this; + } + + /** + * Applies a custom handler to the header and returns the current instance for chaining. + * + * @param handler the handler to customize the header. + * @return the current InfoBlock instance. + */ + public InfoBlock withHeader(ChildHandler handler) { + handler.apply(this, header.get()); + return this; + } + + /** + * Applies a custom handler to the body and returns the current instance for chaining. + * + * @param handler the handler to customize the body. + * @return the current InfoBlock instance. + */ + public InfoBlock withBody(ChildHandler handler) { + handler.apply(this, body); + return this; + } + + /** + * Ensures the footer is initialized and returns the current instance for chaining. + * + * @return the current InfoBlock instance. + */ + public InfoBlock withFooter() { + this.footer.get(); + return this; + } + + /** + * Applies a custom handler to the footer and returns the current instance for chaining. + * + * @param handler the handler to customize the footer. + * @return the current InfoBlock instance. + */ + public InfoBlock withFooter(ChildHandler handler) { + handler.apply(this, footer.get()); + return this; + } + + /** + * Returns the root HTMLDivElement of the InfoBlock. + * + * @return the root HTMLDivElement. + */ + @Override + public HTMLDivElement element() { + return root.element(); + } +} diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlockStyles.java b/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlockStyles.java new file mode 100644 index 000000000..951970e75 --- /dev/null +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlockStyles.java @@ -0,0 +1,26 @@ +/* + * 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.infoboxes; + +import org.dominokit.domino.ui.style.CssClass; + +public interface InfoBlockStyles { + + CssClass dui_info_block = () -> "dui-info-block"; + CssClass dui_info_block_body = () -> "dui-info-block-body"; + CssClass dui_info_block_header = () -> "dui-info-block-header"; + CssClass dui_info_block_footer = () -> "dui-info-block-footer"; +} diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-info-block.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-info-block.css new file mode 100644 index 000000000..d8dd40952 --- /dev/null +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-info-block.css @@ -0,0 +1,19 @@ +.dui-info-block { + --dui-nav-bar-padding: 0; + display: flex; + flex-direction: column; +} + +.dui-info-block-header { + order: var(--dui-order-10); +} + +.dui-info-block-body { + flex-grow: 1; + order: var(--dui-order-20); + padding: var(--dui-spc-2); +} + +.dui-info-block-footer { + order: var(--dui-order-30); +} From a1545a506216d96a7f1389f22043e28bb46771e0 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 15 Nov 2023 10:37:26 +0300 Subject: [PATCH 05/18] fix #883 Javadocs not generated correctly, missing index page and other docs --- .../domino/ui/style/DominoStyle.java | 2 +- .../org/dominokit/domino/ui/style/Style.java | 19 +++++++------- .../domino/ui/style/SwapCssClass.java | 9 ++++++- .../domino/ui/style/ToggleCssClass.java | 3 +++ .../ui/forms/CountableInputFormField.java | 6 ++--- .../domino/ui/forms/FieldsGrouping.java | 12 ++++----- .../domino/ui/forms/FormsStyles.java | 2 +- .../ui/forms/InputFieldInitializer.java | 8 +++--- .../org/dominokit/domino/ui/forms/Radio.java | 14 +++++------ .../domino/ui/forms/TextAreaBox.java | 14 +++++------ .../domino/ui/forms/TextInputFormField.java | 12 ++++----- .../suggest/OrderedSuggestionsStore.java | 2 +- .../domino/ui/forms/suggest/TagBox.java | 6 ++--- .../org/dominokit/domino/ui/tree/Tree.java | 18 ++++++------- .../dominokit/domino/ui/tree/TreeItem.java | 2 +- .../domino/ui/tree/TreeItemIcon.java | 6 ++--- pom.xml | 25 ++++++++----------- 17 files changed, 83 insertions(+), 77 deletions(-) diff --git a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/DominoStyle.java b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/DominoStyle.java index 885a3d8e8..d28195f82 100644 --- a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/DominoStyle.java +++ b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/DominoStyle.java @@ -753,7 +753,7 @@ public interface DominoStyle { /** * Sets the z-index property of the element. * - * @param zIndex The value for the z-index property. + * @param zindex The value for the z-index property. * @return The updated style with the set z-index property. */ R setZIndex(int zindex); diff --git a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/Style.java b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/Style.java index e41443f7c..1aa5f5480 100644 --- a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/Style.java +++ b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/Style.java @@ -60,6 +60,7 @@ public static Style of(E element) { * Creates a new Style instance for the given IsElement. * * @param The type of the HTML element. + * @param The type of the component * @param isElement The IsElement interface representing the HTML element. * @return A new Style instance. */ @@ -370,9 +371,9 @@ public Style replaceCss(String cssClass, String replacementClass) { } /** - * Sets the CSS `border` property of the HTML element. + * Sets the CSS border property of the HTML element. * - * @param border The value to set for the `border` property. + * @param border The value to set for the border property. * @return This Style instance for method chaining. */ @Override @@ -382,9 +383,9 @@ public Style setBorder(String border) { } /** - * Sets the CSS `border-color` property of the HTML element. + * Sets the CSS border-color property of the HTML element. * - * @param borderColor The value to set for the `border-color` property. + * @param borderColor The value to set for the border-color property. * @return This Style instance for method chaining. */ @Override @@ -469,7 +470,7 @@ public Style setMaxWidth(String width, boolean important) { } /** - * Sets the CSS `height` property of the HTML element. + * Sets the CSS height property of the HTML element. * * @param height The height value. * @return This Style instance for method chaining. @@ -481,7 +482,7 @@ public Style setHeight(String height) { } /** - * Sets the CSS `height` property of the HTML element with optional importance. + * Sets the CSS height property of the HTML element with optional importance. * * @param height The height value. * @param important If true, the property is marked as important. @@ -494,7 +495,7 @@ public Style setHeight(String height, boolean important) { } /** - * Sets the CSS `min-height` property of the HTML element. + * Sets the CSS min-height property of the HTML element. * * @param height The minimum height value. * @return This Style instance for method chaining. @@ -506,7 +507,7 @@ public Style setMinHeight(String height) { } /** - * Sets the CSS `min-height` property of the HTML element with optional importance. + * Sets the CSS min-height` property of the HTML element with optional importance. * * @param height The minimum height value. * @param important If true, the property is marked as important. @@ -1146,7 +1147,7 @@ public Style setBottom(String bottom, boolean important) { /** * Sets the CSS `z-index` property of the HTML element. * - * @param zIndex The z-index value. + * @param zindex The z-index value. * @return This Style instance for method chaining. */ @Override diff --git a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/SwapCssClass.java b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/SwapCssClass.java index edfddc5e9..37b4fc67a 100644 --- a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/SwapCssClass.java +++ b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/SwapCssClass.java @@ -25,7 +25,11 @@ public class SwapCssClass implements CssClass { private CssClass current = CssClass.NONE; private CssClass replacement = CssClass.NONE; - /** Creates a new instance of SwapCssClass with no initial styles. */ + /** + * Creates a new instance of SwapCssClass with no initial styles. + * + * @return new SwapCssClass instance + */ public static SwapCssClass of() { return new SwapCssClass(); } @@ -34,6 +38,7 @@ public static SwapCssClass of() { * Creates a new instance of SwapCssClass with the given initial style. * * @param initialStyle The initial CSS class to apply. + * @return new SwapCssClass instance */ public static SwapCssClass of(CssClass initialStyle) { return new SwapCssClass(initialStyle); @@ -44,6 +49,7 @@ public static SwapCssClass of(CssClass initialStyle) { * instance. * * @param initialStyle The initial HasCssClass instance. + * @return new SwapCssClass instance */ public static SwapCssClass of(HasCssClass initialStyle) { return new SwapCssClass(initialStyle.getCssClass()); @@ -53,6 +59,7 @@ public static SwapCssClass of(HasCssClass initialStyle) { * Creates a new instance of SwapCssClass with the given CSS class. * * @param cssClass The initial CSS class to apply. + * @return new SwapCssClass instance */ public static SwapCssClass of(String cssClass) { return new SwapCssClass(cssClass); diff --git a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/ToggleCssClass.java b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/ToggleCssClass.java index 9c4a80432..e40c76fac 100644 --- a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/ToggleCssClass.java +++ b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/ToggleCssClass.java @@ -27,6 +27,7 @@ public class ToggleCssClass implements CssClass { * Creates a new instance of ToggleCssClass with the given CSS class. * * @param cssClass The CSS class to toggle. + * @return new ToggleCssClass instance */ public static ToggleCssClass of(CssClass cssClass) { return new ToggleCssClass(cssClass); @@ -37,6 +38,7 @@ public static ToggleCssClass of(CssClass cssClass) { * instance. * * @param cssClass The HasCssClass instance containing the CSS class to toggle. + * @return new ToggleCssClass instance */ public static ToggleCssClass of(HasCssClass cssClass) { return new ToggleCssClass(cssClass.getCssClass()); @@ -46,6 +48,7 @@ public static ToggleCssClass of(HasCssClass cssClass) { * Creates a new instance of ToggleCssClass with the given CSS class. * * @param cssClass The CSS class to toggle. + * @return new ToggleCssClass instance */ public static ToggleCssClass of(String cssClass) { return new ToggleCssClass(() -> cssClass); diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CountableInputFormField.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CountableInputFormField.java index 27b008cd7..c71c77e3e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CountableInputFormField.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CountableInputFormField.java @@ -26,9 +26,9 @@ import org.dominokit.domino.ui.utils.*; /** - * The `CountableInputFormField` class is an abstract class that extends the `InputFormField` class - * and provides functionality for input fields with character counters, minimum and maximum lengths, - * and placeholders. + * The CountableInputFormField class is an abstract class that extends the InputFormField class and + * provides functionality for input fields with character counters, minimum and maximum lengths, and + * placeholders. * *

Usage Example: * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FieldsGrouping.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FieldsGrouping.java index 21a9acf24..565cc2f22 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FieldsGrouping.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FieldsGrouping.java @@ -26,8 +26,8 @@ import org.dominokit.domino.ui.utils.ApplyFunction; /** - * The `FieldsGrouping` class is responsible for grouping and managing a collection of form - * elements. It provides various validation and manipulation functions for the grouped elements. + * The FieldsGrouping class is responsible for grouping and managing a collection of form elements. + * It provides various validation and manipulation functions for the grouped elements. * *

Usage Example: * @@ -57,9 +57,9 @@ public class FieldsGrouping private boolean focusValidationsPaused = false; /** - * Constructs a new `FieldsGrouping` instance. + * Constructs a new FieldsGrouping instance. * - * @return A new `FieldsGrouping` instance. + * @return A new FieldsGrouping instance. */ public static FieldsGrouping create() { return new FieldsGrouping(); @@ -69,7 +69,7 @@ public static FieldsGrouping create() { * Adds a form element to the group. * * @param formElement The form element to add to the group. - * @return The current `FieldsGrouping` instance for method chaining. + * @return The current FieldsGrouping instance for method chaining. */ public FieldsGrouping addFormElement(HasGrouping formElement) { formElements.add(formElement); @@ -80,7 +80,7 @@ public FieldsGrouping addFormElement(HasGrouping formElement) { * Groups multiple form elements together. * * @param formElements The form elements to group together. - * @return The current `FieldsGrouping` instance for method chaining. + * @return The current FieldsGrouping instance for method chaining. */ public FieldsGrouping group(HasGrouping... formElements) { if (nonNull(formElements) && formElements.length > 0) { diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FormsStyles.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FormsStyles.java index 68db56667..5a95964cb 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FormsStyles.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FormsStyles.java @@ -18,7 +18,7 @@ import org.dominokit.domino.ui.style.CssClass; /** - * The `FormsStyles` interface provides a set of CSS classes that can be used to style form elements + * The FormsStyles interface provides a set of CSS classes that can be used to style form elements * and components within Domino UI forms. */ public interface FormsStyles { diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFieldInitializer.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFieldInitializer.java index a269e7e30..b6a44c80e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFieldInitializer.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFieldInitializer.java @@ -30,7 +30,7 @@ import org.dominokit.domino.ui.utils.HasMinMaxLength; /** - * The `InputFieldInitializer` class provides initialization and event handling for input fields + * The InputFieldInitializer class provides initialization and event handling for input fields * within Domino UI forms. * * @param The type of the form element. @@ -44,13 +44,13 @@ public class InputFieldInitializer, V, E extends HTM private V oldValue; /** - * Creates a new `InputFieldInitializer` instance for the specified form element. + * Creates a new InputFieldInitializer instance for the specified form element. * * @param formElement The form element to initialize. * @param The type of the form element. * @param The value type of the form element. * @param The type of the HTML element associated with the form element. - * @return A new `InputFieldInitializer` instance. + * @return A new InputFieldInitializer instance. */ public static , V, E extends HTMLElement> InputFieldInitializer create(T formElement) { @@ -58,7 +58,7 @@ InputFieldInitializer create(T formElement) { } /** - * Creates a new `InputFieldInitializer` instance for the specified form element. + * Creates a new InputFieldInitializer instance for the specified form element. * * @param formElement The form element to initialize. */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Radio.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Radio.java index 323e8d833..58319d2e1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Radio.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Radio.java @@ -32,7 +32,7 @@ import org.gwtproject.safehtml.shared.SafeHtml; /** - * The `Radio` class represents a radio button element in a Domino UI form. + * The Radio class represents a radio button element in a Domino UI form. * *

Radio buttons are typically used to allow users to make a single selection from a list of * options. A radio button can have a label and optional helper text. @@ -70,7 +70,7 @@ public class Radio extends BaseDominoElement> private boolean changeListenersPaused = false; /** - * Creates a new `Radio` instance with the specified value and label. + * Creates a new Radio instance with the specified value and label. * * @param value The value associated with the radio button. * @param label The label text for the radio button. @@ -109,7 +109,7 @@ public Radio(T value, String label) { } /** - * Creates a new `Radio` instance with the specified value and a label generated from the value. + * Creates a new Radio instance with the specified value and a label generated from the value. * * @param value The value associated with the radio button. */ @@ -118,23 +118,23 @@ public Radio(T value) { } /** - * Creates a new `Radio` instance with the specified value and label. + * Creates a new Radio instance with the specified value and label. * * @param The type of value associated with the radio button. * @param value The value associated with the radio button. * @param label The label text for the radio button. - * @return A new `Radio` instance. + * @return A new Radio instance. */ public static Radio create(E value, String label) { return new Radio<>(value, label); } /** - * Creates a new `Radio` instance with the specified value and a label generated from the value. + * Creates a new Radio instance with the specified value and a label generated from the value. * * @param The type of value associated with the radio button. * @param value The value associated with the radio button. - * @return A new `Radio` instance. + * @return A new Radio instance. */ public static Radio create(E value) { return new Radio<>(value); diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java index d62a9857d..61293ac5b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java @@ -30,8 +30,8 @@ import org.dominokit.domino.ui.utils.PrimaryAddOn; /** - * The `TextAreaBox` class is a form field component for text areas, providing features such as - * prefix and postfix elements, auto-sizing, and value adjustments. + * The TextAreaBox class is a form field component for text areas, providing features such as prefix + * and postfix elements, auto-sizing, and value adjustments. * *

Usage Example: * @@ -74,7 +74,7 @@ public static TextAreaBox create(String label) { return new TextAreaBox(label); } - /** Creates a new `TextAreaBox` instance with default values. */ + /** Creates a new TextAreaBox instance with default values. */ public TextAreaBox() { setRows(4); addCss(dui_form_text_area); @@ -107,7 +107,7 @@ protected LazyChild initCounterElement() { } /** - * Creates a new `TextAreaBox` instance with the specified label. + * Creates a new TextAreaBox instance with the specified label. * * @param label The label text for the TextAreaBox. */ @@ -120,7 +120,7 @@ public TextAreaBox(String label) { * Appends a prefix add-on element to the header of this TextAreaBox. * * @param addon The prefix add-on to append. - * @return This `TextAreaBox` instance. + * @return This TextAreaBox instance. */ @Override public TextAreaBox appendChild(PrefixAddOn addon) { @@ -132,7 +132,7 @@ public TextAreaBox appendChild(PrefixAddOn addon) { * Appends a primary add-on element to the header of this TextAreaBox. * * @param addon The primary add-on to append. - * @return This `TextAreaBox` instance. + * @return This TextAreaBox instance. */ @Override public TextAreaBox appendChild(PrimaryAddOn addon) { @@ -144,7 +144,7 @@ public TextAreaBox appendChild(PrimaryAddOn addon) { * Appends a postfix add-on element to the header of this TextAreaBox. * * @param addon The postfix add-on to append. - * @return This `TextAreaBox` instance. + * @return This TextAreaBox` instance. */ @Override public TextAreaBox appendChild(PostfixAddOn addon) { diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextInputFormField.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextInputFormField.java index f193d3812..ef6018c56 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextInputFormField.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextInputFormField.java @@ -27,9 +27,9 @@ import org.dominokit.domino.ui.utils.LazyChild; /** - * The `TextInputFormField` class is an abstract class that extends the `CountableInputFormField` - * class and provides functionality for text input fields, including prefixes, postfixes, and - * pattern validation. + * The TextInputFormField class is an abstract class that extends the CountableInputFormField class + * and provides functionality for text input fields, including prefixes, postfixes, and pattern + * validation. * *

Usage Example: * @@ -80,7 +80,7 @@ private void addTypeMismatchValidator() { }); } - /** Creates a new `TextInputFormField` instance with default values. */ + /** Creates a new TextInputFormField instance with default values. */ public TextInputFormField() { prefixElement = LazyChild.of(div().addCss(dui_field_prefix), wrapperElement); postfixElement = LazyChild.of(div().addCss(dui_field_postfix), wrapperElement); @@ -92,7 +92,7 @@ public TextInputFormField() { * Sets a postfix element for the text input field. * * @param postfix The postfix text or content. - * @return This `TextInputFormField` instance. + * @return This TextInputFormField instance. */ @Override public T setPostfix(String postfix) { @@ -117,7 +117,7 @@ public String getPostfix() { * Sets a prefix element for the text input field. * * @param prefix The prefix text or content. - * @return This `TextInputFormField` instance. + * @return This TextInputFormField` instance. */ @Override public T setPrefix(String prefix) { diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/OrderedSuggestionsStore.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/OrderedSuggestionsStore.java index 78bf0fa1e..3a7098697 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/OrderedSuggestionsStore.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/OrderedSuggestionsStore.java @@ -245,7 +245,7 @@ public Optional findOptionByValue(T value) { * Checks if the store contains an option with the specified key. * * @param key The unique key to check for. - * @return `true` if the key exists in the store, `false` otherwise. + * @return true if the key exists in the store, false` otherwise. */ public boolean containsKey(String key) { return this.suggestions.containsKey(key); diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/TagBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/TagBox.java index 3ddbd409c..029cbeee6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/TagBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/TagBox.java @@ -155,7 +155,7 @@ protected void doSetValue(List values) { /** * Sets whether the tags are removable. * - * @param removable `true` to allow removing tags, `false` otherwise. + * @param removable true to allow removing tags, false otherwise. * @return The updated TagBox instance. */ public TagBox setRemovable(boolean removable) { @@ -167,7 +167,7 @@ public TagBox setRemovable(boolean removable) { /** * Checks if tags are removable. * - * @return `true` if tags are removable, `false` otherwise. + * @return true if tags are removable, false otherwise. */ public boolean isRemovable() { return removable; @@ -291,7 +291,7 @@ protected TagBox clearValue(boolean silent) { /** * Sets the read-only state of the TagBox. * - * @param readOnly `true` to set the TagBox as read-only, `false` otherwise. + * @param readOnly true` to set the TagBox as read-only, `false` otherwise. * @return The updated TagBox instance. */ @Override diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/Tree.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/Tree.java index b3f40eb01..57ad6f7c3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/Tree.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/Tree.java @@ -43,7 +43,7 @@ import org.dominokit.domino.ui.utils.TreeParent; /** - * The `Tree` class provides a tree structure for displaying hierarchical data. + * The Tree class provides a tree structure for displaying hierarchical data. * *

Example usage: * @@ -127,33 +127,33 @@ public Tree(String treeTitle, T value) { } /** - * Creates a new instance of `Tree` with the specified title and associated data value. + * Creates a new instance of Tree with the specified title and associated data value. * * @param title The title of the tree. * @param value The data value associated with the tree. * @param The type of data associated with each tree item. - * @return A new `Tree` instance. + * @return A new Tree instance. */ public static Tree create(String title, T value) { return new Tree<>(title, value); } /** - * Creates a new instance of `Tree` with the specified title. + * Creates a new instance of Tree with the specified title. * * @param title The title of the tree. * @param The type of data associated with each tree item. - * @return A new `Tree` instance. + * @return A new Tree instance. */ public static Tree create(String title) { return new Tree<>(title); } /** - * Creates a new empty instance of `Tree`. + * Creates a new empty instance of Tree. * * @param The type of data associated with each tree item. - * @return A new `Tree` instance. + * @return A new Tree instance. */ public static Tree create() { return new Tree<>(); @@ -168,7 +168,7 @@ public HTMLElement getAppendTarget() { * Appends a child tree item to this tree. * * @param treeItem The tree item to append. - * @return This `Tree` instance for method chaining. + * @return This Tree instance for method chaining. */ public Tree appendChild(TreeItem treeItem) { super.appendChild(treeItem.element()); @@ -215,7 +215,7 @@ TreeItemIconSupplier getIconSupplier() { /** * Appends a separator to this tree. * - * @return This `Tree` instance for method chaining. + * @return This Tree instance for method chaining. */ public Tree addSeparator() { appendChild(Separator.create()); diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItem.java index e870d478a..663375978 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItem.java @@ -931,7 +931,7 @@ public TreeItem setTitle(String title) { } /** - * Retrieves the `UListElement` that represents the sub-tree of this tree item. + * Retrieves the UListElement` that represents the sub-tree of this tree item. * * @return The `UListElement` representing the sub-tree. */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItemIcon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItemIcon.java index 492a5bbd5..af704cf11 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItemIcon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItemIcon.java @@ -19,9 +19,9 @@ import org.dominokit.domino.ui.icons.StateChangeMdiIcon; /** - * The `TreeItemIcon` class provides a utility for creating a state-changing icon for tree items. - * This icon can change its appearance based on the state of the tree item (collapsed, expanded, - * leaf, or active). + * The TreeItemIcon class provides a utility for creating a state-changing icon for tree items. This + * icon can change its appearance based on the state of the tree item (collapsed, expanded, leaf, or + * active). */ public class TreeItemIcon { diff --git a/pom.xml b/pom.xml index c8370c5de..3f49dcbf4 100644 --- a/pom.xml +++ b/pom.xml @@ -74,18 +74,18 @@ 3.11.0 3.0.1 - 3.5.0 + 3.6.2 2.9 3.0 3.0.0-M1 - 1.0.0 + 1.1.0 1.6.8 1.6 UTF-8 UTF-8 - 1.1.0 + 1.2.1 2.10.0 - 1.0.0 + 1.0.1 1.0.1 1.0.0 @@ -143,11 +143,6 @@ elemental2-webstorage ${elemental2.version} - - com.google.jsinterop - jsinterop-annotations - 2.0.0 - com.google.guava guava @@ -218,7 +213,9 @@ ${maven.javadoc.plugin} false + false 11 + none @@ -228,8 +225,6 @@ org.dominokit.doctool.DominoDocsDoclet - - org.dominokit domino-doc-tool @@ -242,7 +237,7 @@ -duidocsurl 'https://www.javadoc.io/doc/org.dominokit/domino-ui/latest/' - ${project.build.directory}/sitedocs/ + ${project.build.directory}/apidocs/ @@ -251,9 +246,9 @@ jar - - docs/jdocs.css - + + --allow-script-in-comments + From 662619055cd6cd090228a59774e4c228bd5dc996 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 15 Nov 2023 11:02:23 +0300 Subject: [PATCH 06/18] fix #878 TextBox And TextArea: character count is not handled correct --- .../src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java | 1 + .../src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java | 1 + 2 files changed, 2 insertions(+) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java index dd4f8599d..e0cdb6cd5 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java @@ -91,6 +91,7 @@ protected void doSetValue(String value) { } else { getInputElement().element().value = ""; } + updateCounter(getLength(), getMaxCount()); } /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java index 61293ac5b..81cc58cf4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java @@ -202,6 +202,7 @@ protected void doSetValue(String value) { } else { getInputElement().element().value = ""; } + updateCounter(getLength(), getMaxCount()); } /** From ff37ffa7dba580f98bb2454855b3051d5268c656 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 15 Nov 2023 19:37:24 +0300 Subject: [PATCH 07/18] implement static elements factory instead of interface implementation --- .../org/dominokit/domino/ui/alerts/Alert.java | 5 +- .../domino/ui/animations/Animation.java | 1 + .../ui/animations/TransitionListeners.java | 1 + .../org/dominokit/domino/ui/badges/Badge.java | 1 + .../domino/ui/breadcrumbs/Breadcrumb.java | 1 + .../domino/ui/breadcrumbs/BreadcrumbItem.java | 2 + .../domino/ui/button/BaseButton.java | 9 +- .../dominokit/domino/ui/button/Button.java | 2 + .../domino/ui/button/ButtonStyles.java | 2 - .../domino/ui/button/ButtonsToolbar.java | 2 + .../domino/ui/button/DropdownButton.java | 2 + .../domino/ui/button/LinkButton.java | 2 + .../domino/ui/button/RemoveButton.java | 2 + .../domino/ui/button/group/ButtonsGroup.java | 1 + .../org/dominokit/domino/ui/cards/Card.java | 3 + .../dominokit/domino/ui/cards/CardHeader.java | 1 + .../domino/ui/carousel/Carousel.java | 1 + .../dominokit/domino/ui/carousel/Slide.java | 3 +- .../org/dominokit/domino/ui/chips/Chip.java | 18 +- .../dominokit/domino/ui/chips/ChipsGroup.java | 7 +- .../org/dominokit/domino/ui/code/Code.java | 3 + .../domino/ui/collapsible/Accordion.java | 1 + .../domino/ui/collapsible/AccordionPanel.java | 2 + .../AnimationCollapseStrategy.java | 1 + .../ui/collapsible/CollapseStrategy.java | 2 + .../domino/ui/collapsible/Collapsible.java | 1 + .../collapsible/DisplayCollapseStrategy.java | 1 + .../collapsible/HeightCollapseStrategy.java | 1 + .../TreeHeightCollapseStrategy.java | 1 + .../domino/ui/config/FormsFieldsConfig.java | 1 + .../domino/ui/datatable/CellRenderer.java | 1 + .../domino/ui/datatable/ColumnConfig.java | 1 + .../ui/datatable/ColumnCssRuleMeta.java | 2 + .../domino/ui/datatable/ColumnHeader.java | 1 + .../domino/ui/datatable/ColumnUtils.java | 1 + .../domino/ui/datatable/DataTable.java | 5 +- .../DefaultColumnShowHideListener.java | 1 + .../ui/datatable/HeaderElementSupplier.java | 2 + .../domino/ui/datatable/RowCell.java | 1 + .../domino/ui/datatable/TableRow.java | 5 +- .../ui/datatable/plugins/DataTablePlugin.java | 2 + .../ui/datatable/plugins/DragDropPlugin.java | 1 + .../plugins/column/ColumnFilterMeta.java | 2 + .../column/ColumnHeaderFilterPlugin.java | 1 + .../plugins/column/PinColumnsPlugin.java | 1 + .../plugins/column/ResizeColumnsPlugin.java | 1 + .../filter/header/BooleanHeaderFilter.java | 2 + .../filter/header/DateHeaderFilter.java | 2 + .../filter/header/DecimalHeaderFilter.java | 2 + .../header/DelayedHeaderFilterInput.java | 1 + .../filter/header/DoubleHeaderFilter.java | 2 + .../filter/header/EnumHeaderFilter.java | 2 + .../filter/header/FloatHeaderFilter.java | 2 + .../filter/header/IntegerHeaderFilter.java | 2 + .../filter/header/LongHeaderFilter.java | 2 + .../filter/header/SelectHeaderFilter.java | 1 + .../filter/header/ShortHeaderFilter.java | 2 + .../filter/header/TextHeaderFilter.java | 2 + .../filter/header/TimeHeaderFilter.java | 2 + .../plugins/grouping/GroupingPlugin.java | 1 + .../plugins/header/HeaderActionElement.java | 2 + .../plugins/header/HeaderBarPlugin.java | 6 +- .../plugins/header/TopPanelPlugin.java | 1 + .../plugins/pagination/BodyScrollPlugin.java | 2 + .../plugins/pagination/SortPlugin.java | 1 + .../plugins/row/RecordDetailsPlugin.java | 1 + .../plugins/selection/SelectionPlugin.java | 1 + .../plugins/summary/SummaryCellRenderer.java | 2 + .../datatable/plugins/summary/SummaryRow.java | 5 +- .../plugins/summary/SummaryRowCell.java | 1 + .../plugins/tree/TreeGridPlugin.java | 1 + .../plugins/tree/TreePluginConfig.java | 1 + .../domino/ui/datepicker/Calendar.java | 1 + .../ui/datepicker/CalendarCustomEvents.java | 2 + .../domino/ui/datepicker/CalendarDay.java | 4 + .../domino/ui/datepicker/CalendarHeader.java | 1 + .../domino/ui/datepicker/CalendarMonth.java | 1 + .../ui/datepicker/CalendarSelectors.java | 1 + .../domino/ui/datepicker/MonthsPicker.java | 2 + .../domino/ui/datepicker/WeekDayHeader.java | 2 + .../domino/ui/datepicker/YearMonthPicker.java | 2 + .../domino/ui/datepicker/YearPicker.java | 2 + .../domino/ui/dialogs/AbstractDialog.java | 3 + .../domino/ui/dialogs/AlertMessageDialog.java | 1 + .../domino/ui/dialogs/ConfirmationDialog.java | 1 + .../domino/ui/dialogs/MessageDialog.java | 1 + .../domino/ui/dialogs/ModalBackDrop.java | 1 + .../dominokit/domino/ui/dialogs/Window.java | 2 + .../dominokit/domino/ui/dnd/Draggable.java | 1 + .../org/dominokit/domino/ui/dnd/DropZone.java | 6 +- .../domino/ui/elements/ABBRElement.java | 2 + .../domino/ui/elements/AddressElement.java | 2 + .../domino/ui/elements/AnchorElement.java | 1 + .../domino/ui/elements/AreaElement.java | 2 + .../domino/ui/elements/ArticleElement.java | 2 + .../domino/ui/elements/AsideElement.java | 2 + .../domino/ui/elements/AudioElement.java | 2 + .../domino/ui/elements/BElement.java | 2 + .../domino/ui/elements/BRElement.java | 2 + .../domino/ui/elements/BaseElement.java | 4 + .../domino/ui/elements/BlockquoteElement.java | 2 + .../domino/ui/elements/BodyElement.java | 2 + .../domino/ui/elements/ButtonElement.java | 2 + .../domino/ui/elements/CanvasElement.java | 2 + .../domino/ui/elements/CiteElement.java | 2 + .../domino/ui/elements/CodeElement.java | 2 + .../domino/ui/elements/ColElement.java | 2 + .../domino/ui/elements/ColGroupElement.java | 2 + .../domino/ui/elements/DDElement.java | 2 + .../domino/ui/elements/DFNElement.java | 2 + .../domino/ui/elements/DListElement.java | 2 + .../domino/ui/elements/DTElement.java | 2 + .../domino/ui/elements/DataListElement.java | 2 + .../domino/ui/elements/DelElement.java | 2 + .../domino/ui/elements/DivElement.java | 2 + .../domino/ui/elements/EMElement.java | 2 + .../domino/ui/elements/EmbedElement.java | 2 + .../domino/ui/elements/FieldSetElement.java | 2 + .../domino/ui/elements/FigCaptionElement.java | 2 + .../domino/ui/elements/FigureElement.java | 2 + .../domino/ui/elements/FooterElement.java | 2 + .../domino/ui/elements/FormElement.java | 2 + .../domino/ui/elements/HGroupElement.java | 2 + .../domino/ui/elements/HRElement.java | 2 + .../domino/ui/elements/HeaderElement.java | 2 + .../domino/ui/elements/HeadingElement.java | 2 + .../domino/ui/elements/IElement.java | 2 + .../domino/ui/elements/IFrameElement.java | 2 + .../domino/ui/elements/ImageElement.java | 2 + .../domino/ui/elements/InputElement.java | 2 + .../domino/ui/elements/InsElement.java | 2 + .../domino/ui/elements/KBDElement.java | 2 + .../domino/ui/elements/LIElement.java | 2 + .../domino/ui/elements/LabelElement.java | 2 + .../domino/ui/elements/LegendElement.java | 2 + .../domino/ui/elements/MainElement.java | 2 + .../domino/ui/elements/MapElement.java | 2 + .../domino/ui/elements/MarkElement.java | 2 + .../domino/ui/elements/MeterElement.java | 2 + .../domino/ui/elements/NavElement.java | 2 + .../domino/ui/elements/NoScriptElement.java | 2 + .../domino/ui/elements/OListElement.java | 2 + .../domino/ui/elements/ObjectElement.java | 2 + .../domino/ui/elements/OptGroupElement.java | 2 + .../domino/ui/elements/OptionElement.java | 2 + .../domino/ui/elements/OutputElement.java | 2 + .../domino/ui/elements/ParagraphElement.java | 2 + .../domino/ui/elements/ParamElement.java | 2 + .../domino/ui/elements/PictureElement.java | 2 + .../domino/ui/elements/PreElement.java | 2 + .../domino/ui/elements/ProgressElement.java | 2 + .../domino/ui/elements/QuoteElement.java | 2 + .../domino/ui/elements/ScriptElement.java | 2 + .../domino/ui/elements/SectionElement.java | 2 + .../domino/ui/elements/SelectElement.java | 2 + .../domino/ui/elements/SmallElement.java | 2 + .../domino/ui/elements/SourceElement.java | 2 + .../domino/ui/elements/SpanElement.java | 2 + .../domino/ui/elements/StrongElement.java | 2 + .../domino/ui/elements/SubElement.java | 2 + .../domino/ui/elements/SupElement.java | 2 + .../domino/ui/elements/TBodyElement.java | 2 + .../domino/ui/elements/TDElement.java | 2 + .../domino/ui/elements/TFootElement.java | 2 + .../domino/ui/elements/THElement.java | 2 + .../domino/ui/elements/THeadElement.java | 2 + .../ui/elements/TableCaptionElement.java | 2 + .../domino/ui/elements/TableElement.java | 2 + .../domino/ui/elements/TableRowElement.java | 2 + .../domino/ui/elements/TextAreaElement.java | 2 + .../domino/ui/elements/TimeElement.java | 2 + .../domino/ui/elements/TrackElement.java | 2 + .../domino/ui/elements/UElement.java | 2 + .../domino/ui/elements/UListElement.java | 2 + .../domino/ui/elements/VarElement.java | 2 + .../domino/ui/elements/VideoElement.java | 2 + .../domino/ui/elements/WBRElement.java | 2 + .../domino/ui/events/CustomEvents.java | 2 + .../domino/ui/events/EventOptions.java | 2 + .../domino/ui/forms/AbstractFormElement.java | 1 + .../domino/ui/forms/BaseTextBox.java | 2 + .../dominokit/domino/ui/forms/CheckBox.java | 1 + .../ui/forms/CountableInputFormField.java | 3 +- .../domino/ui/forms/CustomInputBox.java | 1 + .../dominokit/domino/ui/forms/DateBox.java | 1 + .../dominokit/domino/ui/forms/EmailBox.java | 2 + .../domino/ui/forms/FieldsGrouping.java | 2 +- .../domino/ui/forms/HasInputElement.java | 6 +- .../ui/forms/InputFieldInitializer.java | 1 + .../domino/ui/forms/InputFormField.java | 1 + .../dominokit/domino/ui/forms/NumberBox.java | 10 +- .../org/dominokit/domino/ui/forms/Radio.java | 1 + .../domino/ui/forms/SwitchButton.java | 5 +- .../domino/ui/forms/TextAreaBox.java | 1 + .../domino/ui/forms/TextInputFormField.java | 2 + .../dominokit/domino/ui/forms/TimeBox.java | 1 + .../dominokit/domino/ui/forms/UploadBox.java | 1 + .../ui/forms/suggest/AbstractSelect.java | 1 + .../ui/forms/suggest/AbstractSuggestBox.java | 1 + .../domino/ui/forms/suggest/Option.java | 2 + .../domino/ui/forms/suggest/SelectOption.java | 9 +- .../ui/forms/suggest/SuggestOption.java | 6 +- .../forms/validations/InputAutoValidator.java | 2 + .../forms/validations/MaxLengthValidator.java | 2 + .../forms/validations/MinLengthValidator.java | 2 + .../dominokit/domino/ui/grid/AutoGrid.java | 2 + .../org/dominokit/domino/ui/grid/Column.java | 2 + .../dominokit/domino/ui/grid/GridLayout.java | 3 + .../org/dominokit/domino/ui/grid/Row.java | 8 +- .../domino/ui/grid/flex/FlexItem.java | 4 +- .../domino/ui/grid/flex/FlexLayout.java | 1 + .../domino/ui/icons/ElementIcon.java | 2 + .../org/dominokit/domino/ui/icons/Icon.java | 3 + .../domino/ui/icons/IconWrapper.java | 2 + .../domino/ui/icons/LabeledIcon.java | 4 +- .../dominokit/domino/ui/icons/MdiIcon.java | 7 +- .../domino/ui/icons/StateChangeIcon.java | 1 + .../dominokit/domino/ui/icons/ToggleIcon.java | 2 + .../dominokit/domino/ui/icons/UrlIcon.java | 2 + .../domino/ui/infoboxes/InfoBlock.java | 3 + .../domino/ui/infoboxes/InfoBox.java | 10 +- .../domino/ui/keyboard/AcceptKeyEvents.java | 2 + .../ui/keyboard/KeyEventHandlerContext.java | 2 + .../domino/ui/keyboard/KeyboardEvents.java | 2 + .../ui/keyboard/KeyboardKeyListener.java | 2 + .../org/dominokit/domino/ui/labels/Label.java | 2 + .../dominokit/domino/ui/layout/AppLayout.java | 1 + .../domino/ui/layout/EmptyState.java | 2 + .../dominokit/domino/ui/layout/NavBar.java | 1 + .../dominokit/domino/ui/lists/ListGroup.java | 1 + .../dominokit/domino/ui/lists/ListItem.java | 1 + .../domino/ui/loaders/BaseLoader.java | 2 + .../domino/ui/loaders/BounceLoader.java | 2 + .../domino/ui/loaders/BouncePulseLoader.java | 2 + .../domino/ui/loaders/FacebookLoader.java | 2 + .../domino/ui/loaders/IosLoader.java | 2 + .../dominokit/domino/ui/loaders/IsLoader.java | 2 + .../dominokit/domino/ui/loaders/Loader.java | 5 +- .../domino/ui/loaders/NoneLoader.java | 2 + .../domino/ui/loaders/OrbitLoader.java | 2 + .../domino/ui/loaders/ProgressBarLoader.java | 2 + .../domino/ui/loaders/PulseLoader.java | 2 + .../domino/ui/loaders/RotatePlaneLoader.java | 2 + .../domino/ui/loaders/RotationLoader.java | 2 + .../domino/ui/loaders/RoundBounceLoader.java | 2 + .../domino/ui/loaders/StretchLoader.java | 2 + .../domino/ui/loaders/TimerLoader.java | 2 + .../domino/ui/loaders/Win8LinearLoader.java | 2 + .../domino/ui/loaders/Win8Loader.java | 2 + .../domino/ui/media/MediaObject.java | 4 + .../domino/ui/menu/AbstractMenuItem.java | 1 + .../org/dominokit/domino/ui/menu/Menu.java | 8 +- .../dominokit/domino/ui/menu/MenuItem.java | 1 + .../domino/ui/menu/MenuItemsGroup.java | 2 +- .../dominokit/domino/ui/menu/MenuTarget.java | 1 + .../direction/BestFitSideDropDirection.java | 1 + .../BestMiddleDownUpDropDirection.java | 1 + .../BestMiddleSideDropDirection.java | 1 + .../BestMiddleUpDownDropDirection.java | 1 + .../BestSideUpDownDropDirection.java | 1 + .../direction/BottomLeftDropDirection.java | 1 + .../direction/BottomMiddleDropDirection.java | 55 +- .../direction/BottomRightDropDirection.java | 1 + .../ui/menu/direction/DropDirection.java | 2 + .../menu/direction/LeftDownDropDirection.java | 1 + .../direction/LeftMiddleDropDirection.java | 1 + .../menu/direction/LeftUpDropDirection.java | 1 + .../MiddleOfScreenDropDirection.java | 1 + .../menu/direction/MouseBestFitDirection.java | 1 + .../direction/RightDownDropDirection.java | 1 + .../direction/RightMiddleDropDirection.java | 1 + .../menu/direction/RightUpDropDirection.java | 1 + .../menu/direction/TopLeftDropDirection.java | 7 +- .../direction/TopMiddleDropDirection.java | 48 +- .../menu/direction/TopRightDropDirection.java | 1 + .../domino/ui/notifications/Notification.java | 1 + .../notifications/NotificationPosition.java | 8 +- .../ui/pagination/AdvancedPagination.java | 1 + .../domino/ui/pagination/BasePagination.java | 1 + .../dominokit/domino/ui/pagination/Pager.java | 2 + .../domino/ui/pagination/PagerNavItem.java | 2 + .../ui/pagination/ScrollingPagination.java | 1 + .../domino/ui/pickers/SimpleColorPicker.java | 2 + .../domino/ui/popover/BasePopover.java | 1 + .../dominokit/domino/ui/popover/Popover.java | 1 + .../dominokit/domino/ui/popover/Tooltip.java | 6 +- .../domino/ui/preloaders/Preloader.java | 2 + .../domino/ui/progress/Progress.java | 2 + .../domino/ui/progress/ProgressBar.java | 2 + .../ui/richtext/BackgroundColorPicker.java | 2 + .../domino/ui/richtext/ColorPickerButton.java | 2 + .../domino/ui/richtext/FontPicker.java | 4 + .../ui/richtext/ForegroundColorPicker.java | 2 + .../domino/ui/richtext/HiliteColorPicker.java | 2 + .../domino/ui/richtext/RichTextCommand.java | 1 + .../domino/ui/richtext/RichTextEditor.java | 2 + .../richtext/commands/BackColorCommand.java | 2 + .../ui/richtext/commands/BoldCommand.java | 2 + .../ui/richtext/commands/CopyCommand.java | 2 + .../ui/richtext/commands/CutCommand.java | 2 + .../commands/DecreaseFontCommand.java | 2 + .../ui/richtext/commands/FontNameCommand.java | 2 + .../richtext/commands/ForeColorCommand.java | 2 + .../ui/richtext/commands/HeadingCommand.java | 2 + .../richtext/commands/HiliteColorCommand.java | 2 + .../commands/HorizontalRuleCommand.java | 2 + .../commands/IncreaseFontCommand.java | 2 + .../ui/richtext/commands/IndentCommand.java | 2 + .../richtext/commands/InsertHtmlCommand.java | 1 + .../richtext/commands/InsertImageCommand.java | 1 + .../commands/InsertImageLinkCommand.java | 1 + .../richtext/commands/InsertLinkCommand.java | 1 + .../commands/InsertOrderedListCommand.java | 2 + .../commands/InsertParagraphCommand.java | 2 + .../commands/InsertUnorderedListCommand.java | 2 + .../ui/richtext/commands/ItalicCommand.java | 2 + .../commands/JustifyCenterCommand.java | 2 + .../richtext/commands/JustifyFullCommand.java | 2 + .../richtext/commands/JustifyLeftCommand.java | 2 + .../commands/JustifyRightCommand.java | 2 + .../ui/richtext/commands/OutdentCommand.java | 2 + .../ui/richtext/commands/PasteCommand.java | 2 + .../ui/richtext/commands/RedoCommand.java | 2 + .../commands/RemoveFormatCommand.java | 2 + .../richtext/commands/RemoveLinkCommand.java | 1 + .../commands/StrikeThroughCommand.java | 2 + .../richtext/commands/SubscriptCommand.java | 2 + .../richtext/commands/SuperscriptCommand.java | 2 + .../richtext/commands/UnderLineCommand.java | 2 + .../ui/richtext/commands/UndoCommand.java | 2 + .../domino/ui/scroll/AutoHScrollPanel.java | 2 + .../domino/ui/scroll/AutoScrollPanel.java | 2 + .../domino/ui/scroll/AutoVScrollPanel.java | 2 + .../domino/ui/scroll/HScrollPanel.java | 2 + .../domino/ui/scroll/ScrollPanel.java | 2 + .../dominokit/domino/ui/scroll/ScrollTop.java | 1 + .../domino/ui/scroll/VScrollPanel.java | 2 + .../dominokit/domino/ui/search/Search.java | 2 + .../dominokit/domino/ui/search/SearchBox.java | 1 + .../dominokit/domino/ui/sliders/Slider.java | 1 + .../dominokit/domino/ui/spin/HSpinSelect.java | 2 + .../dominokit/domino/ui/spin/SpinItem.java | 3 + .../dominokit/domino/ui/spin/SpinSelect.java | 7 +- .../dominokit/domino/ui/spin/VSpinSelect.java | 2 + .../domino/ui/splitpanel/BaseSplitPanel.java | 2 + .../domino/ui/splitpanel/BaseSplitter.java | 1 + .../domino/ui/splitpanel/HSplitPanel.java | 2 + .../domino/ui/splitpanel/HSplitter.java | 2 + .../domino/ui/splitpanel/SplitPanel.java | 1 + .../domino/ui/splitpanel/VSplitPanel.java | 2 + .../domino/ui/splitpanel/VSplitter.java | 2 + .../org/dominokit/domino/ui/stepper/Step.java | 3 + .../domino/ui/stepper/StepTracker.java | 3 + .../dominokit/domino/ui/stepper/Stepper.java | 4 + .../domino/ui/stepper/StepperTrack.java | 1 + .../org/dominokit/domino/ui/style/Waves.java | 7 +- .../domino/ui/style/WavesElement.java | 2 + .../domino/ui/style/WavesSupport.java | 1 + .../dominokit/domino/ui/tabs/FillItem.java | 3 + .../org/dominokit/domino/ui/tabs/Tab.java | 7 +- .../dominokit/domino/ui/tabs/TabsPanel.java | 1 + .../domino/ui/themes/DominoThemeAccent.java | 2 + .../domino/ui/themes/DominoThemeDark.java | 2 + .../domino/ui/themes/DominoThemeDefault.java | 2 + .../domino/ui/themes/DominoThemeLight.java | 2 + .../domino/ui/themes/DominoThemeManager.java | 1 + .../domino/ui/themes/ElementThemeManager.java | 2 + .../domino/ui/themes/IsDominoTheme.java | 2 + .../domino/ui/thumbnails/Thumbnail.java | 8 +- .../domino/ui/timepicker/TimePicker.java | 2 + .../ui/timepicker/TimePickerCustomEvents.java | 2 + .../ui/timepicker/TimePickerHeader.java | 2 + .../ui/timepicker/TimePickerSelectors.java | 1 + .../org/dominokit/domino/ui/tree/Tree.java | 15 +- .../dominokit/domino/ui/tree/TreeHeader.java | 1 + .../dominokit/domino/ui/tree/TreeItem.java | 30 +- .../domino/ui/typography/BlockHeader.java | 2 + .../domino/ui/typography/Blockquote.java | 2 + .../domino/ui/upload/DefaultFilePreview.java | 2 + .../upload/DefaultFilePreviewContainer.java | 2 + .../upload/DefaultFileUploadDecoration.java | 1 + .../dominokit/domino/ui/upload/FileItem.java | 1 + .../ui/upload/FilePreviewContainer.java | 2 + .../domino/ui/upload/FileUpload.java | 15 +- .../domino/ui/upload/IsFilePreview.java | 2 + .../domino/ui/upload/UploadOptions.java | 1 + .../domino/ui/upload/UploadRequestSender.java | 2 + .../domino/ui/utils/AppendStrategy.java | 1 + .../domino/ui/utils/AttachDetachCallback.java | 2 + .../domino/ui/utils/BaseDominoElement.java | 35 +- .../domino/ui/utils/BodyObserver.java | 1 + .../dominokit/domino/ui/utils/CanChange.java | 2 + .../domino/ui/utils/ClipboardItem.java | 2 + .../dominokit/domino/ui/utils/DOMParser.java | 2 + .../domino/ui/utils/DelayedTextInput.java | 1 + .../domino/ui/utils/DisableUtil.java | 1 + .../domino/ui/utils/DomElements.java | 52 +- .../org/dominokit/domino/ui/utils/Domino.java | 1771 +++++++++++++++++ .../domino/ui/utils/DominoDocument.java | 2 + .../domino/ui/utils/DominoElement.java | 2 + .../domino/ui/utils/DominoNavigator.java | 2 + .../domino/ui/utils/DominoStyleSheet.java | 1 + .../domino/ui/utils/DominoWindow.java | 2 + .../domino/ui/utils/DynamicStyleSheet.java | 1 + .../domino/ui/utils/ElementObserver.java | 2 + .../domino/ui/utils/ElementUtil.java | 1 + .../domino/ui/utils/ElementsFactory.java | 90 +- .../ui/utils/ElementsFactoryDelegate.java | 1 + .../domino/ui/utils/FillerElement.java | 2 + .../domino/ui/utils/FollowOnScroll.java | 1 + .../domino/ui/utils/FooterContent.java | 3 + .../domino/ui/utils/HasChildren.java | 2 + .../domino/ui/utils/HasClickableElement.java | 2 + .../domino/ui/utils/HasWavesElement.java | 2 + .../domino/ui/utils/HeaderContent.java | 3 + .../domino/ui/utils/KeyboardNavigation.java | 1 + .../dominokit/domino/ui/utils/LazyChild.java | 1 + .../domino/ui/utils/PopupsCloser.java | 1 + .../domino/ui/utils/PostfixAddOn.java | 4 + .../domino/ui/utils/PrefixAddOn.java | 4 + .../domino/ui/utils/PrimaryAddOn.java | 4 + .../domino/ui/utils/ResizeObserver.java | 2 + .../domino/ui/utils/ResizeObserverEntry.java | 2 + .../dominokit/domino/ui/utils/SVGFactory.java | 597 +++++- .../dominokit/domino/ui/utils/Separator.java | 4 + .../domino/ui/utils/SubheaderAddon.java | 4 + .../dominokit/domino/ui/utils/SwipeUtil.java | 1 + .../org/dominokit/domino/ui/utils/URL.java | 2 + 428 files changed, 3144 insertions(+), 456 deletions(-) create mode 100644 domino-ui/src/main/java/org/dominokit/domino/ui/utils/Domino.java diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/alerts/Alert.java b/domino-ui/src/main/java/org/dominokit/domino/ui/alerts/Alert.java index edc314996..d3df5ad4c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/alerts/Alert.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/alerts/Alert.java @@ -17,12 +17,15 @@ import static org.dominokit.domino.ui.alerts.AlertStyles.dui_alert; import static org.dominokit.domino.ui.alerts.AlertStyles.dui_alert_body; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.button.RemoveButton; import org.dominokit.domino.ui.elements.DivElement; -import org.dominokit.domino.ui.utils.*; +import org.dominokit.domino.ui.utils.BaseDominoElement; +import org.dominokit.domino.ui.utils.ChildHandler; +import org.dominokit.domino.ui.utils.LazyChild; /** * Displays a none floating message anywhere in the page, the message can be permanent or diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/animations/Animation.java b/domino-ui/src/main/java/org/dominokit/domino/ui/animations/Animation.java index 76bc09752..c2c2c944d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/animations/Animation.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/animations/Animation.java @@ -15,6 +15,7 @@ */ package org.dominokit.domino.ui.animations; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/animations/TransitionListeners.java b/domino-ui/src/main/java/org/dominokit/domino/ui/animations/TransitionListeners.java index ceb79436a..ff958b2ee 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/animations/TransitionListeners.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/animations/TransitionListeners.java @@ -15,6 +15,7 @@ */ package org.dominokit.domino.ui.animations; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/badges/Badge.java b/domino-ui/src/main/java/org/dominokit/domino/ui/badges/Badge.java index 213886539..23058636d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/badges/Badge.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/badges/Badge.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.badges; import static org.dominokit.domino.ui.badges.BadgeStyles.dui_badge; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import elemental2.dom.Text; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/breadcrumbs/Breadcrumb.java b/domino-ui/src/main/java/org/dominokit/domino/ui/breadcrumbs/Breadcrumb.java index b6bfa14a7..9c3f587aa 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/breadcrumbs/Breadcrumb.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/breadcrumbs/Breadcrumb.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.breadcrumbs.BreadcrumbStyles.dui_breadcrumb; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.EventListener; import elemental2.dom.HTMLOListElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/breadcrumbs/BreadcrumbItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/breadcrumbs/BreadcrumbItem.java index afea2c830..680e73c27 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/breadcrumbs/BreadcrumbItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/breadcrumbs/BreadcrumbItem.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.breadcrumbs; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLAnchorElement; import elemental2.dom.HTMLLIElement; import elemental2.dom.Text; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/button/BaseButton.java b/domino-ui/src/main/java/org/dominokit/domino/ui/button/BaseButton.java index ac2465fa6..4e3738587 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/button/BaseButton.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/button/BaseButton.java @@ -16,11 +16,10 @@ package org.dominokit.domino.ui.button; import static java.util.Objects.nonNull; -import static org.dominokit.domino.ui.button.ButtonStyles.dui_button; -import static org.dominokit.domino.ui.button.ButtonStyles.dui_button_body; -import static org.dominokit.domino.ui.button.ButtonStyles.dui_button_icon; -import static org.dominokit.domino.ui.button.ButtonStyles.dui_button_reversed; -import static org.dominokit.domino.ui.button.ButtonStyles.dui_button_text; +import static org.dominokit.domino.ui.button.ButtonStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.span; import elemental2.dom.Element; import elemental2.dom.Event; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/button/Button.java b/domino-ui/src/main/java/org/dominokit/domino/ui/button/Button.java index 7eda77be1..789997dc4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/button/Button.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/button/Button.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.button; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLButtonElement; import org.dominokit.domino.ui.elements.ButtonElement; import org.dominokit.domino.ui.icons.Icon; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/button/ButtonStyles.java b/domino-ui/src/main/java/org/dominokit/domino/ui/button/ButtonStyles.java index 5c328bc0a..4b82d1de1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/button/ButtonStyles.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/button/ButtonStyles.java @@ -34,8 +34,6 @@ public interface ButtonStyles { /** Constant dui_button_toolbar */ CssClass dui_button_toolbar = () -> "dui-btn-toolbar"; /** Constant dui_vertical */ - CssClass dui_vertical = () -> "dui-vertical"; - /** Constant dui_circle */ CssClass dui_circle = () -> "dui-circle"; /** Constant dui_button_reversed */ CssClass dui_button_reversed = () -> "dui-btn-reverse"; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/button/ButtonsToolbar.java b/domino-ui/src/main/java/org/dominokit/domino/ui/button/ButtonsToolbar.java index db7ef7ba8..b6a53b810 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/button/ButtonsToolbar.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/button/ButtonsToolbar.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.button; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.Arrays; import org.dominokit.domino.ui.button.group.ButtonsGroup; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/button/DropdownButton.java b/domino-ui/src/main/java/org/dominokit/domino/ui/button/DropdownButton.java index 7bd8a0033..82e83ea66 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/button/DropdownButton.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/button/DropdownButton.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.button; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.menu.Menu; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/button/LinkButton.java b/domino-ui/src/main/java/org/dominokit/domino/ui/button/LinkButton.java index d4be49445..f7231fc92 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/button/LinkButton.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/button/LinkButton.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.button; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLAnchorElement; import org.dominokit.domino.ui.elements.AnchorElement; import org.dominokit.domino.ui.icons.Icon; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/button/RemoveButton.java b/domino-ui/src/main/java/org/dominokit/domino/ui/button/RemoveButton.java index aa3b0aacf..0192502c5 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/button/RemoveButton.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/button/RemoveButton.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.button; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLButtonElement; import org.dominokit.domino.ui.elements.ButtonElement; import org.dominokit.domino.ui.style.GenericCss; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/button/group/ButtonsGroup.java b/domino-ui/src/main/java/org/dominokit/domino/ui/button/group/ButtonsGroup.java index 36ea569cb..4702e3f1f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/button/group/ButtonsGroup.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/button/group/ButtonsGroup.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.button.group; import static org.dominokit.domino.ui.button.ButtonStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import java.util.Arrays; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java b/domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java index 5d63c8153..9fb5eab33 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java @@ -16,6 +16,9 @@ package org.dominokit.domino.ui.cards; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.dui_order_last; import elemental2.dom.Element; import elemental2.dom.HTMLDivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/cards/CardHeader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/cards/CardHeader.java index 73a74916d..63e8944b1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/cards/CardHeader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/cards/CardHeader.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.cards; import static org.dominokit.domino.ui.cards.CardStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLImageElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Carousel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Carousel.java index c41aeeab4..2590a2e2e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Carousel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Carousel.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.carousel; import static org.dominokit.domino.ui.carousel.CarouselStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import java.util.ArrayList; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Slide.java b/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Slide.java index 3bef9c483..1dfc91a92 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Slide.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Slide.java @@ -18,6 +18,7 @@ import static org.dominokit.domino.ui.carousel.CarouselStyles.slide; import static org.dominokit.domino.ui.carousel.CarouselStyles.slide_caption; import static org.dominokit.domino.ui.carousel.CarouselStyles.slide_indicator; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; @@ -73,7 +74,7 @@ private Slide(HTMLElement element) { * attribute. */ public Slide(String imageSrc) { - this(elements.img(imageSrc).element()); + this(img(imageSrc).element()); } /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/chips/Chip.java b/domino-ui/src/main/java/org/dominokit/domino/ui/chips/Chip.java index 1f61ff856..92084d7a4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/chips/Chip.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/chips/Chip.java @@ -15,12 +15,10 @@ */ package org.dominokit.domino.ui.chips; -import static org.dominokit.domino.ui.chips.ChipStyles.dui_chip; -import static org.dominokit.domino.ui.chips.ChipStyles.dui_chip_addon; -import static org.dominokit.domino.ui.chips.ChipStyles.dui_chip_has_addon; -import static org.dominokit.domino.ui.chips.ChipStyles.dui_chip_remove; -import static org.dominokit.domino.ui.chips.ChipStyles.dui_chip_selected; -import static org.dominokit.domino.ui.chips.ChipStyles.dui_chip_value; +import static org.dominokit.domino.ui.chips.ChipStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.span; import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLImageElement; @@ -32,13 +30,7 @@ import org.dominokit.domino.ui.elements.ImageElement; import org.dominokit.domino.ui.elements.SpanElement; import org.dominokit.domino.ui.style.BooleanCssClass; -import org.dominokit.domino.ui.utils.AcceptDisable; -import org.dominokit.domino.ui.utils.BaseDominoElement; -import org.dominokit.domino.ui.utils.ChildHandler; -import org.dominokit.domino.ui.utils.HasSelectionListeners; -import org.dominokit.domino.ui.utils.LazyChild; -import org.dominokit.domino.ui.utils.PrefixAddOn; -import org.dominokit.domino.ui.utils.Selectable; +import org.dominokit.domino.ui.utils.*; /** * A component for a Tag that can have a text and icon or image and can be set to be removable. diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/chips/ChipsGroup.java b/domino-ui/src/main/java/org/dominokit/domino/ui/chips/ChipsGroup.java index 65074dc50..2f1b33b74 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/chips/ChipsGroup.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/chips/ChipsGroup.java @@ -15,10 +15,15 @@ */ package org.dominokit.domino.ui.chips; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; + import elemental2.dom.HTMLDivElement; import java.util.*; import org.dominokit.domino.ui.elements.DivElement; -import org.dominokit.domino.ui.utils.*; +import org.dominokit.domino.ui.utils.AcceptDisable; +import org.dominokit.domino.ui.utils.BaseDominoElement; +import org.dominokit.domino.ui.utils.HasSelectionListeners; /** * This component groups a set of {@link org.dominokit.domino.ui.chips.Chip}s and controls the diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/code/Code.java b/domino-ui/src/main/java/org/dominokit/domino/ui/code/Code.java index e4399459f..b8983de3a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/code/Code.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/code/Code.java @@ -18,6 +18,9 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.style.DisplayCss.dui_overflow_x_scroll; import static org.dominokit.domino.ui.style.SpacingCss.dui_whitespace_pre; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.code; +import static org.dominokit.domino.ui.utils.Domino.elementOf; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/Accordion.java b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/Accordion.java index bb8499c24..9608d7dde 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/Accordion.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/Accordion.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.collapsible; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import java.util.ArrayList; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/AccordionPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/AccordionPanel.java index e3313f1dd..00fc6e158 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/AccordionPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/AccordionPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.collapsible; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.*; import org.dominokit.domino.ui.config.AccordionConfig; import org.dominokit.domino.ui.config.HasComponentConfig; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/AnimationCollapseStrategy.java b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/AnimationCollapseStrategy.java index 8acc54586..a11b6f833 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/AnimationCollapseStrategy.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/AnimationCollapseStrategy.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.style.DisplayCss.dui_hidden; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/CollapseStrategy.java b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/CollapseStrategy.java index a1c7c73ce..893257cff 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/CollapseStrategy.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/CollapseStrategy.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.collapsible; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; /** CollapseStrategy interface. */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/Collapsible.java b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/Collapsible.java index 3279fe0e9..e90b29a76 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/Collapsible.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/Collapsible.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/DisplayCollapseStrategy.java b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/DisplayCollapseStrategy.java index de1c5a893..3d3ce2779 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/DisplayCollapseStrategy.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/DisplayCollapseStrategy.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.collapsible; import static org.dominokit.domino.ui.collapsible.Collapsible.DUI_COLLAPSED; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/HeightCollapseStrategy.java b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/HeightCollapseStrategy.java index 4e602dda5..65b9af5a0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/HeightCollapseStrategy.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/HeightCollapseStrategy.java @@ -17,6 +17,7 @@ import static org.dominokit.domino.ui.collapsible.Collapsible.DUI_COLLAPSED; import static org.dominokit.domino.ui.style.GenericCss.dui_transition_none; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.AddEventListenerOptions; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/TreeHeightCollapseStrategy.java b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/TreeHeightCollapseStrategy.java index 2b7774a2f..2573f64bc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/TreeHeightCollapseStrategy.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/collapsible/TreeHeightCollapseStrategy.java @@ -17,6 +17,7 @@ import static org.dominokit.domino.ui.collapsible.Collapsible.DUI_COLLAPSED; import static org.dominokit.domino.ui.style.GenericCss.dui_transition_none; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.AddEventListenerOptions; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/config/FormsFieldsConfig.java b/domino-ui/src/main/java/org/dominokit/domino/ui/config/FormsFieldsConfig.java index e1972bc1e..5c329a1f6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/config/FormsFieldsConfig.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/config/FormsFieldsConfig.java @@ -15,6 +15,7 @@ */ package org.dominokit.domino.ui.config; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/CellRenderer.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/CellRenderer.java index d697494dd..9f59b3d16 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/CellRenderer.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/CellRenderer.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.datatable; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLTableCellElement; import elemental2.dom.Node; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnConfig.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnConfig.java index 0a205abba..00aa0e311 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnConfig.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnConfig.java @@ -18,6 +18,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.datatable.ColumnUtils.fixElementWidth; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import elemental2.dom.HTMLTableCellElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnCssRuleMeta.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnCssRuleMeta.java index 8099d4765..fde819234 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnCssRuleMeta.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnCssRuleMeta.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.Collection; import java.util.HashMap; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnHeader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnHeader.java index eec86a304..537a972df 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnHeader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnHeader.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.datatable; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import elemental2.dom.HTMLTableCellElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnUtils.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnUtils.java index 312940a44..36bf083b4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnUtils.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnUtils.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/DataTable.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/DataTable.java index 124ac78fe..c3a367490 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/DataTable.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/DataTable.java @@ -16,9 +16,12 @@ package org.dominokit.domino.ui.datatable; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; -import elemental2.dom.*; +import elemental2.dom.DomGlobal; import elemental2.dom.EventListener; +import elemental2.dom.HTMLDivElement; +import elemental2.dom.Node; import java.util.*; import java.util.stream.Collectors; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/DefaultColumnShowHideListener.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/DefaultColumnShowHideListener.java index 6a600e057..0ca157f19 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/DefaultColumnShowHideListener.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/DefaultColumnShowHideListener.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.datatable; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/HeaderElementSupplier.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/HeaderElementSupplier.java index e90080c90..35d6ac46f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/HeaderElementSupplier.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/HeaderElementSupplier.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Node; /** A functional interface for supplying header elements in a data table. */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/RowCell.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/RowCell.java index 87fad2647..e59a07081 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/RowCell.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/RowCell.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.HTMLTableCellElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableRow.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableRow.java index 855e24f5a..67f2b130d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableRow.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableRow.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLTableCellElement; import elemental2.dom.HTMLTableRowElement; @@ -25,8 +26,10 @@ import org.dominokit.domino.ui.datatable.events.TableDataUpdatedEvent; import org.dominokit.domino.ui.forms.validations.ValidationResult; import org.dominokit.domino.ui.style.BooleanCssClass; -import org.dominokit.domino.ui.utils.*; +import org.dominokit.domino.ui.utils.BaseDominoElement; import org.dominokit.domino.ui.utils.HasSelectionHandler.SelectionHandler; +import org.dominokit.domino.ui.utils.HasSelectionListeners; +import org.dominokit.domino.ui.utils.Selectable; /** * Represents a table row containing data and provides functionalities for handling selection, diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/DataTablePlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/DataTablePlugin.java index 6ebbbbe2a..a147d25e2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/DataTablePlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/DataTablePlugin.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.datatable.plugins; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import java.util.List; import java.util.Optional; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/DragDropPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/DragDropPlugin.java index 108ea88cb..5f2214df4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/DragDropPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/DragDropPlugin.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.datatable.DataTableStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import elemental2.dom.Text; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ColumnFilterMeta.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ColumnFilterMeta.java index 6e042846c..357ff9154 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ColumnFilterMeta.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ColumnFilterMeta.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.datatable.plugins.column; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableCellElement; import java.util.Optional; import org.dominokit.domino.ui.datatable.ColumnConfig; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ColumnHeaderFilterPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ColumnHeaderFilterPlugin.java index 654b4f287..48eaa42c6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ColumnHeaderFilterPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ColumnHeaderFilterPlugin.java @@ -18,6 +18,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.datatable.DataTableStyles.dui_datatable_column_filter; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import java.util.List; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/PinColumnsPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/PinColumnsPlugin.java index d748a9a60..80f754bb8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/PinColumnsPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/PinColumnsPlugin.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.datatable.plugins.column; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import java.util.List; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ResizeColumnsPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ResizeColumnsPlugin.java index e41f98898..9749ce1c6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ResizeColumnsPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/column/ResizeColumnsPlugin.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable.plugins.column; import static org.dominokit.domino.ui.datatable.DataTableStyles.dui_column_resizer; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.Unit.px; import elemental2.dom.DomGlobal; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/BooleanHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/BooleanHeaderFilter.java index 96bd09c32..4e5380598 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/BooleanHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/BooleanHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.datatable.ColumnConfig; import org.dominokit.domino.ui.datatable.model.Category; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DateHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DateHeaderFilter.java index c84e897a9..bc3c284f1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DateHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DateHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.datatable.ColumnConfig; import org.dominokit.domino.ui.datatable.model.Category; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DecimalHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DecimalHeaderFilter.java index 324ab298c..ba50816e8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DecimalHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DecimalHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLInputElement; import java.math.BigDecimal; import org.dominokit.domino.ui.datatable.model.FilterTypes; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DelayedHeaderFilterInput.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DelayedHeaderFilterInput.java index 548f0542a..e5eff8e09 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DelayedHeaderFilterInput.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DelayedHeaderFilterInput.java @@ -18,6 +18,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.style.SpacingCss.dui_m_b_0; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLInputElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DoubleHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DoubleHeaderFilter.java index f599a0468..a8e87769a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DoubleHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DoubleHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.datatable.model.FilterTypes; import org.dominokit.domino.ui.forms.DoubleBox; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/EnumHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/EnumHeaderFilter.java index 41121b613..e7d08d0f2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/EnumHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/EnumHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import java.util.Arrays; import org.dominokit.domino.ui.datatable.ColumnConfig; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/FloatHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/FloatHeaderFilter.java index 1db63d813..271ce7b68 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/FloatHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/FloatHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.datatable.model.FilterTypes; import org.dominokit.domino.ui.forms.FloatBox; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/IntegerHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/IntegerHeaderFilter.java index 2eb62f3ca..2c1249502 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/IntegerHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/IntegerHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.datatable.model.FilterTypes; import org.dominokit.domino.ui.forms.IntegerBox; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/LongHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/LongHeaderFilter.java index 128d67742..117fce79e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/LongHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/LongHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.datatable.model.FilterTypes; import org.dominokit.domino.ui.forms.LongBox; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/SelectHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/SelectHeaderFilter.java index 071d16805..375b2ecab 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/SelectHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/SelectHeaderFilter.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; import static org.dominokit.domino.ui.style.SpacingCss.dui_m_b_0; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.datatable.ColumnConfig; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/ShortHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/ShortHeaderFilter.java index 08798a85b..7c8cb57af 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/ShortHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/ShortHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.datatable.model.FilterTypes; import org.dominokit.domino.ui.forms.ShortBox; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/TextHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/TextHeaderFilter.java index 436c738b8..37d136b33 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/TextHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/TextHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.datatable.model.FilterTypes; import org.dominokit.domino.ui.forms.TextBox; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/TimeHeaderFilter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/TimeHeaderFilter.java index d3a7dcbb9..b3baf1a55 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/TimeHeaderFilter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/TimeHeaderFilter.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.filter.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.datatable.ColumnConfig; import org.dominokit.domino.ui.datatable.model.Category; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/grouping/GroupingPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/grouping/GroupingPlugin.java index 82e777f99..68b6b295c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/grouping/GroupingPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/grouping/GroupingPlugin.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable.plugins.grouping; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLTableCellElement; import elemental2.dom.Node; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/HeaderActionElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/HeaderActionElement.java index 16589e670..baa952c79 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/HeaderActionElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/HeaderActionElement.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.header; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import org.dominokit.domino.ui.datatable.DataTable; import org.dominokit.domino.ui.datatable.events.TableEvent; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/HeaderBarPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/HeaderBarPlugin.java index ad578d2c2..c609ddc10 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/HeaderBarPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/HeaderBarPlugin.java @@ -19,6 +19,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.datatable.DataTableStyles.dui_datatable_nav_bar; import static org.dominokit.domino.ui.datatable.DataTableStyles.dui_datatable_search_box; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import java.util.ArrayList; @@ -31,7 +32,10 @@ import org.dominokit.domino.ui.datatable.model.Category; import org.dominokit.domino.ui.datatable.model.Filter; import org.dominokit.domino.ui.datatable.plugins.DataTablePlugin; -import org.dominokit.domino.ui.icons.*; +import org.dominokit.domino.ui.icons.Icon; +import org.dominokit.domino.ui.icons.MdiIcon; +import org.dominokit.domino.ui.icons.ToggleIcon; +import org.dominokit.domino.ui.icons.ToggleMdiIcon; import org.dominokit.domino.ui.icons.lib.Icons; import org.dominokit.domino.ui.layout.NavBar; import org.dominokit.domino.ui.menu.CustomMenuItem; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/TopPanelPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/TopPanelPlugin.java index e3cd18b79..6a4a29fcb 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/TopPanelPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/header/TopPanelPlugin.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable.plugins.header; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/pagination/BodyScrollPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/pagination/BodyScrollPlugin.java index 0e6ad6d93..347f6d646 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/pagination/BodyScrollPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/pagination/BodyScrollPlugin.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.pagination; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.core.JsMath; import elemental2.dom.HTMLTableElement; import org.dominokit.domino.ui.datatable.DataTable; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/pagination/SortPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/pagination/SortPlugin.java index de72a6f8c..753d0a226 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/pagination/SortPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/pagination/SortPlugin.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable.plugins.pagination; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import java.util.HashMap; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/row/RecordDetailsPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/row/RecordDetailsPlugin.java index d06147802..a45233c63 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/row/RecordDetailsPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/row/RecordDetailsPlugin.java @@ -19,6 +19,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.datatable.DataTableStyles.dui_datatable_details_td; import static org.dominokit.domino.ui.datatable.DataTableStyles.dui_datatable_details_tr; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.*; import java.util.Collections; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/selection/SelectionPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/selection/SelectionPlugin.java index a055cc796..c33c05de3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/selection/SelectionPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/selection/SelectionPlugin.java @@ -21,6 +21,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.datatable.DataTableStyles.dui_datatable_row_selected; import static org.dominokit.domino.ui.forms.FormsStyles.dui_form_select_check_box; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryCellRenderer.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryCellRenderer.java index 9e3223791..636e6b7bc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryCellRenderer.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryCellRenderer.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.summary; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableCellElement; import elemental2.dom.Node; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryRow.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryRow.java index 424640b60..3dd897494 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryRow.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryRow.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datatable.plugins.summary; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableCellElement; import elemental2.dom.HTMLTableRowElement; import java.util.Collections; @@ -226,8 +228,7 @@ public void render(DataTable dataTable, SummaryRow summaryRow) { for (int i = 0; i < columns.size(); i++) { summaryRow.renderCell(columns.get(i)); SummaryRowCell addedCell = summaryRow.rowCells.get(columns.get(i).getName()); - DominoElement cell = - elements.elementOf(addedCell.getCellInfo().getElement()); + DominoElement cell = elementOf(addedCell.getCellInfo().getElement()); if (cell.hasAttribute("colspan")) { int colspan = Integer.parseInt(cell.getAttribute("colspan")); if (colspan > 1) { diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryRowCell.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryRowCell.java index 009530ae2..1a647a344 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryRowCell.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryRowCell.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable.plugins.summary; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.HTMLTableCellElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/tree/TreeGridPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/tree/TreeGridPlugin.java index 274832008..5a15349d8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/tree/TreeGridPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/tree/TreeGridPlugin.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datatable.plugins.tree; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLTableCellElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/tree/TreePluginConfig.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/tree/TreePluginConfig.java index b669c4329..d077aa92e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/tree/TreePluginConfig.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/tree/TreePluginConfig.java @@ -18,6 +18,7 @@ import static java.util.Objects.isNull; import static org.dominokit.domino.ui.style.SpacingCss.dui_font_size_4; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Node; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/Calendar.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/Calendar.java index e6ae1c49b..2ae43e194 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/Calendar.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/Calendar.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.datepicker; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.CustomEvent; import elemental2.dom.HTMLDivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarCustomEvents.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarCustomEvents.java index 92fc31efe..acb3e3efd 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarCustomEvents.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarCustomEvents.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.datepicker; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.CustomEvent; import elemental2.dom.CustomEventInit; import jsinterop.base.Js; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarDay.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarDay.java index d747efafe..873552117 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarDay.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarDay.java @@ -15,6 +15,10 @@ */ package org.dominokit.domino.ui.datepicker; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.span; + import elemental2.dom.Element; import elemental2.dom.HTMLDivElement; import java.util.Date; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarHeader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarHeader.java index a98465d14..2cfe9abea 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarHeader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarHeader.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datepicker; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import java.util.Date; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarMonth.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarMonth.java index fcb9d8830..1e53380cf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarMonth.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarMonth.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.datepicker; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import java.util.Date; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarSelectors.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarSelectors.java index 94b9c997a..94699476f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarSelectors.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/CalendarSelectors.java @@ -18,6 +18,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.DominoUIConfig.CONFIG; import elemental2.core.JsDate; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/MonthsPicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/MonthsPicker.java index 8379e069c..f01378379 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/MonthsPicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/MonthsPicker.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.datepicker; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.Date; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/WeekDayHeader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/WeekDayHeader.java index dcb0eae8c..8f9d4acd3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/WeekDayHeader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/WeekDayHeader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.datepicker; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.elements.SpanElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/YearMonthPicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/YearMonthPicker.java index 95843ecaf..bfafcb9ce 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/YearMonthPicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/YearMonthPicker.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.datepicker; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.spin.HSpinSelect; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/YearPicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/YearPicker.java index d16e097c3..7070a4c47 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/YearPicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datepicker/YearPicker.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.datepicker; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.Date; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/AbstractDialog.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/AbstractDialog.java index 49712d872..462037490 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/AbstractDialog.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/AbstractDialog.java @@ -18,6 +18,9 @@ import static elemental2.dom.DomGlobal.document; import static elemental2.dom.DomGlobal.window; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.style.DisplayCss.dui_hidden; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; import elemental2.dom.*; import java.util.ArrayList; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/AlertMessageDialog.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/AlertMessageDialog.java index 126877ae6..8d06e3c05 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/AlertMessageDialog.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/AlertMessageDialog.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.dialogs; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import org.dominokit.domino.ui.animations.Animation; import org.dominokit.domino.ui.animations.Transition; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/ConfirmationDialog.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/ConfirmationDialog.java index b23a638ec..fd10a76f9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/ConfirmationDialog.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/ConfirmationDialog.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.dialogs; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.SpanElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/MessageDialog.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/MessageDialog.java index c6897a499..e12aef97b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/MessageDialog.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/MessageDialog.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.dialogs; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.SpanElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/ModalBackDrop.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/ModalBackDrop.java index ed03573c5..c975bbe08 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/ModalBackDrop.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/ModalBackDrop.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.dialogs; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.CustomEvent; import elemental2.dom.CustomEventInit; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/Window.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/Window.java index 807b9a339..a479f9253 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/Window.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/Window.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.dialogs; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.*; import jsinterop.base.Js; import org.dominokit.domino.ui.events.EventType; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dnd/Draggable.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dnd/Draggable.java index 45a7535a3..ac8a653ed 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dnd/Draggable.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dnd/Draggable.java @@ -15,6 +15,7 @@ */ package org.dominokit.domino.ui.dnd; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.*; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dnd/DropZone.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dnd/DropZone.java index b7d23f475..ff68ffec3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dnd/DropZone.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dnd/DropZone.java @@ -15,9 +15,13 @@ */ package org.dominokit.domino.ui.dnd; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; -import elemental2.dom.*; +import elemental2.dom.DragEvent; +import elemental2.dom.Event; +import elemental2.dom.EventListener; +import elemental2.dom.HTMLElement; import java.util.HashMap; import java.util.Map; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ABBRElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ABBRElement.java index 4de52c339..59e61f492 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ABBRElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ABBRElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AddressElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AddressElement.java index a6d654535..d3f614f7a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AddressElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AddressElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AnchorElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AnchorElement.java index 16a5b1e37..41beb2821 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AnchorElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AnchorElement.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.elements; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLAnchorElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AreaElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AreaElement.java index 2e961005f..01eeb850a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AreaElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AreaElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLAreaElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ArticleElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ArticleElement.java index b2fece3bc..324ef2396 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ArticleElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ArticleElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AsideElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AsideElement.java index 6620f6e32..c7efe7b45 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AsideElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AsideElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AudioElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AudioElement.java index 5b695652e..c9f016cda 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AudioElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/AudioElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLAudioElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BElement.java index 832315938..83a74198a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BRElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BRElement.java index 2046a6274..fa5c2fc8c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BRElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BRElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLBRElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BaseElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BaseElement.java index 83a916db3..78bcc7109 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BaseElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BaseElement.java @@ -15,6 +15,10 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.dui; +import static org.dominokit.domino.ui.utils.Domino.elementOf; + import elemental2.dom.Element; import org.dominokit.domino.ui.utils.BaseDominoElement; import org.dominokit.domino.ui.utils.DominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BlockquoteElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BlockquoteElement.java index 252fa48ee..dc78841c1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BlockquoteElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BlockquoteElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLQuoteElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BodyElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BodyElement.java index 51175d07c..1b08354a2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BodyElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/BodyElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLBodyElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ButtonElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ButtonElement.java index bf772d07b..86ae76284 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ButtonElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ButtonElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLButtonElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CanvasElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CanvasElement.java index 5689d9af4..4473b57b5 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CanvasElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CanvasElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLCanvasElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CiteElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CiteElement.java index 3e2005b54..3a56c0fc9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CiteElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CiteElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CodeElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CodeElement.java index 33f9e4647..642d13ade 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CodeElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/CodeElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ColElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ColElement.java index e31d411f8..594678c8e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ColElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ColElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableColElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ColGroupElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ColGroupElement.java index 9d0c900a4..06cbd36eb 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ColGroupElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ColGroupElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableColElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DDElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DDElement.java index da9cbc634..f88445fa6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DDElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DDElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DFNElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DFNElement.java index 58dbb8361..1ae978c42 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DFNElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DFNElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DListElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DListElement.java index 66d03a747..73257fdcc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DListElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DListElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDListElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DTElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DTElement.java index fad0b70a8..826649584 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DTElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DTElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DataListElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DataListElement.java index a68337574..4ca2002a3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DataListElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DataListElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDataListElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DelElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DelElement.java index 6f5a0f93d..74648d0cf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DelElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DelElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLModElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DivElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DivElement.java index a7f3fb991..f2973533a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DivElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/DivElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/EMElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/EMElement.java index d289fd261..e4d51afc7 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/EMElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/EMElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/EmbedElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/EmbedElement.java index 0146f28f5..e2a1a13e9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/EmbedElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/EmbedElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLEmbedElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FieldSetElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FieldSetElement.java index 21b43a635..821fea5b6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FieldSetElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FieldSetElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLFieldSetElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FigCaptionElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FigCaptionElement.java index 1769aaa52..960242ef4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FigCaptionElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FigCaptionElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FigureElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FigureElement.java index c3ef45c30..0bcc93f5b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FigureElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FigureElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FooterElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FooterElement.java index 135b9ec10..c3783fec3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FooterElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FooterElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FormElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FormElement.java index abcab7943..bc9c21f13 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FormElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/FormElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLFormElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HGroupElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HGroupElement.java index c48663e23..84c2989a3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HGroupElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HGroupElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HRElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HRElement.java index 81a734cd6..ee6a1526e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HRElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HRElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLHRElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HeaderElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HeaderElement.java index 45220f7c0..39c6827f0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HeaderElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HeaderElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HeadingElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HeadingElement.java index f712f1256..25874284e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HeadingElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/HeadingElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLHeadingElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/IElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/IElement.java index 2bb3261fc..906cdb4da 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/IElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/IElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/IFrameElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/IFrameElement.java index be8f1db55..6fc5556f0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/IFrameElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/IFrameElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLIFrameElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ImageElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ImageElement.java index 7583ac092..0231ea4fe 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ImageElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ImageElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLImageElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InputElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InputElement.java index bf791a7a0..27f94ea9f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InputElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InputElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InsElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InsElement.java index bc56c3072..11ae633e5 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InsElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InsElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLModElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/KBDElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/KBDElement.java index 49267e8c3..1b664373e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/KBDElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/KBDElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LIElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LIElement.java index 556f00581..34a46834e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LIElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LIElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLLIElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LabelElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LabelElement.java index 1944f1582..ca22e112c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LabelElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LabelElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLLabelElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LegendElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LegendElement.java index e9694b2ec..d6ae59b89 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LegendElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/LegendElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLLegendElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MainElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MainElement.java index f6432281d..45330a967 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MainElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MainElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MapElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MapElement.java index cab4eca51..9ec28eae0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MapElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MapElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLMapElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MarkElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MarkElement.java index ebc15176b..41dc0530e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MarkElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MarkElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MeterElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MeterElement.java index eae41adfd..19a2295be 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MeterElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/MeterElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLMeterElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/NavElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/NavElement.java index 6362e68a5..87ec9ad10 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/NavElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/NavElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/NoScriptElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/NoScriptElement.java index c5d24949f..0748bf50d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/NoScriptElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/NoScriptElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OListElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OListElement.java index da70384cb..874d9b771 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OListElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OListElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLOListElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ObjectElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ObjectElement.java index e3752560e..86790dc55 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ObjectElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ObjectElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLObjectElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OptGroupElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OptGroupElement.java index ac2221868..97cdd5870 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OptGroupElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OptGroupElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLOptGroupElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OptionElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OptionElement.java index e9816daea..5e89b8413 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OptionElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OptionElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLOptionElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OutputElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OutputElement.java index 9f7ec64cf..88fb2d92f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OutputElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/OutputElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLOutputElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ParagraphElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ParagraphElement.java index 198738363..a944260fc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ParagraphElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ParagraphElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLParagraphElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ParamElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ParamElement.java index 7c5648d3f..d2e495173 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ParamElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ParamElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLParamElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/PictureElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/PictureElement.java index f22107a33..a31d2ab07 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/PictureElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/PictureElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLPictureElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/PreElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/PreElement.java index 7a217f59a..a5bf267c0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/PreElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/PreElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLPreElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ProgressElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ProgressElement.java index 108144c4f..9cca54dad 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ProgressElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ProgressElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLProgressElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/QuoteElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/QuoteElement.java index e0c352eed..f673b1cb9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/QuoteElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/QuoteElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLQuoteElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ScriptElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ScriptElement.java index 5cc92a79d..1214d2a8b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ScriptElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/ScriptElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLScriptElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SectionElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SectionElement.java index bb695137f..c8fc113d1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SectionElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SectionElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SelectElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SelectElement.java index be0fb8631..9fea8d2c0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SelectElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SelectElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLSelectElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SmallElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SmallElement.java index 59404b058..c49dda176 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SmallElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SmallElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SourceElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SourceElement.java index afb71c181..19ec3fb8d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SourceElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SourceElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLSourceElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SpanElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SpanElement.java index 4cc302375..aa77f90e8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SpanElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SpanElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/StrongElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/StrongElement.java index 4d3831a36..709e034ba 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/StrongElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/StrongElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SubElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SubElement.java index 8ccfa7172..8778f49a0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SubElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SubElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SupElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SupElement.java index c94c0e838..d8ac57e71 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SupElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/SupElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TBodyElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TBodyElement.java index 5ac24c6fb..9a4b985f9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TBodyElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TBodyElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableSectionElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TDElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TDElement.java index 4a4301473..66059ed5a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TDElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TDElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableCellElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TFootElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TFootElement.java index 75ae7d458..9c921bc64 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TFootElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TFootElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableSectionElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/THElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/THElement.java index c06975762..4f7894943 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/THElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/THElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableCellElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/THeadElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/THeadElement.java index 6cbeec0a5..03c266a19 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/THeadElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/THeadElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableSectionElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableCaptionElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableCaptionElement.java index 8a94c0554..361f7be8c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableCaptionElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableCaptionElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableCaptionElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableElement.java index a99c4a445..a2bd84013 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableRowElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableRowElement.java index 437e38a17..49519901c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableRowElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TableRowElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTableRowElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TextAreaElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TextAreaElement.java index 3d633452e..ea3ac7a68 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TextAreaElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TextAreaElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTextAreaElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TimeElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TimeElement.java index a91b22ae9..436c8ec4e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TimeElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TimeElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TrackElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TrackElement.java index 2f9eb117a..24a6c8de7 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TrackElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/TrackElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLTrackElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/UElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/UElement.java index 37566c0dc..025b3c714 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/UElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/UElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/UListElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/UListElement.java index 15be4e09e..615dc2a1c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/UListElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/UListElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLUListElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/VarElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/VarElement.java index c0c96e1a5..07ac2c0c9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/VarElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/VarElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/VideoElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/VideoElement.java index 459bd4fab..ea81698d2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/VideoElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/VideoElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLVideoElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/WBRElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/WBRElement.java index 66215fcb0..9e38cc9dc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/WBRElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/WBRElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.elements; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/events/CustomEvents.java b/domino-ui/src/main/java/org/dominokit/domino/ui/events/CustomEvents.java index ca1b03aca..0d82d6238 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/events/CustomEvents.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/events/CustomEvents.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.events; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.CustomEvent; import elemental2.dom.CustomEventInit; import jsinterop.base.Js; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/events/EventOptions.java b/domino-ui/src/main/java/org/dominokit/domino/ui/events/EventOptions.java index b0f705eaa..ce9305f43 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/events/EventOptions.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/events/EventOptions.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.events; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.AddEventListenerOptions; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/AbstractFormElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/AbstractFormElement.java index 1271b4c9d..62fbbfe79 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/AbstractFormElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/AbstractFormElement.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLFieldSetElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java index e0cdb6cd5..bdf192d0b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/BaseTextBox.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.forms; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.input; import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.utils.DominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CheckBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CheckBox.java index 97854bec1..8363d3708 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CheckBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CheckBox.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.forms; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.*; import java.util.Optional; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CountableInputFormField.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CountableInputFormField.java index c71c77e3e..3421a7138 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CountableInputFormField.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CountableInputFormField.java @@ -17,7 +17,8 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; -import static org.dominokit.domino.ui.forms.FormsStyles.du_field_counter; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.span; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.SpanElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CustomInputBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CustomInputBox.java index acf73e93a..c7a5ba1bf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CustomInputBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/CustomInputBox.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.forms; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLInputElement; import java.util.HashMap; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/DateBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/DateBox.java index 1bd6b10e6..7c4bda3a4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/DateBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/DateBox.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.menu.direction.DropDirection.BEST_MIDDLE_DOWN_UP; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.HTMLInputElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/EmailBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/EmailBox.java index 425d25a5c..a548b9122 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/EmailBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/EmailBox.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.forms; +import static org.dominokit.domino.ui.utils.Domino.*; + import java.util.HashMap; import java.util.Map; import org.dominokit.domino.ui.elements.DataListElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FieldsGrouping.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FieldsGrouping.java index 565cc2f22..6fa567cc4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FieldsGrouping.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FieldsGrouping.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.forms; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import java.util.*; @@ -23,7 +24,6 @@ import org.dominokit.domino.ui.forms.validations.ValidationResult; import org.dominokit.domino.ui.keyboard.KeyEventsConsumer; import org.dominokit.domino.ui.utils.*; -import org.dominokit.domino.ui.utils.ApplyFunction; /** * The FieldsGrouping class is responsible for grouping and managing a collection of form elements. diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/HasInputElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/HasInputElement.java index 8d5bdbc1d..064292ae9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/HasInputElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/HasInputElement.java @@ -15,8 +15,12 @@ */ package org.dominokit.domino.ui.forms; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; -import org.dominokit.domino.ui.utils.*; +import org.dominokit.domino.ui.utils.CanChange; +import org.dominokit.domino.ui.utils.DominoElement; +import org.dominokit.domino.ui.utils.Focusable; /** * The {@code HasInputElement} interface provides methods for working with input elements within a diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFieldInitializer.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFieldInitializer.java index b6a44c80e..055a3f513 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFieldInitializer.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFieldInitializer.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.forms; import static org.dominokit.domino.ui.forms.FormsStyles.dui_form_field; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFormField.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFormField.java index c8d849c5a..6ba7ec10d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFormField.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/InputFormField.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/NumberBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/NumberBox.java index 4c24ca3ad..103b6f25e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/NumberBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/NumberBox.java @@ -17,8 +17,14 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; - -import elemental2.dom.*; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.input; + +import elemental2.dom.ClipboardEvent; +import elemental2.dom.Event; +import elemental2.dom.HTMLInputElement; +import elemental2.dom.KeyboardEvent; import java.util.Objects; import jsinterop.base.Js; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Radio.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Radio.java index 58319d2e1..b18dfbcaf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Radio.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/Radio.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.forms.FormsStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.*; import java.util.LinkedHashSet; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/SwitchButton.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/SwitchButton.java index 53652ce4a..f51f590e6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/SwitchButton.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/SwitchButton.java @@ -17,8 +17,11 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; -import elemental2.dom.*; +import elemental2.dom.Event; +import elemental2.dom.EventListener; +import elemental2.dom.HTMLInputElement; import java.util.Optional; import java.util.function.Consumer; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java index 81cc58cf4..74314647e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.forms.FormsStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.EventListener; import elemental2.dom.HTMLTextAreaElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextInputFormField.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextInputFormField.java index ef6018c56..5591f278c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextInputFormField.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextInputFormField.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.forms; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; import elemental2.dom.HTMLInputElement; import jsinterop.base.Js; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TimeBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TimeBox.java index 72f7f535c..fc622922a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TimeBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TimeBox.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.menu.direction.DropDirection.BEST_MIDDLE_DOWN_UP; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.HTMLInputElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/UploadBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/UploadBox.java index 2287e3825..03fc43049 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/UploadBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/UploadBox.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.forms; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.File; import elemental2.dom.HTMLInputElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java index 4af1abf1f..fa4e98cfd 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSuggestBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSuggestBox.java index edb31367b..b0900d110 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSuggestBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSuggestBox.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/Option.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/Option.java index 8de183b2b..0d5f0836b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/Option.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/Option.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.forms.suggest; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.span; import elemental2.dom.DomGlobal; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/SelectOption.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/SelectOption.java index ddd156fdd..da756a8d3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/SelectOption.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/SelectOption.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.forms.suggest; +import static org.dominokit.domino.ui.utils.Domino.*; + import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.menu.AbstractMenuItem; import org.dominokit.domino.ui.menu.MenuItem; @@ -116,10 +118,7 @@ public static SelectOption create( */ public SelectOption(String key, V value, String text, String description) { super( - key, - value, - elements.div().textContent(text).addCss(dui_m_r_1), - MenuItem.create(text, description)); + key, value, div().textContent(text).addCss(dui_m_r_1), MenuItem.create(text, description)); } /** @@ -130,7 +129,7 @@ public SelectOption(String key, V value, String text, String description) { * @param text The text to display for the option. */ public SelectOption(String key, V value, String text) { - super(key, value, elements.div().textContent(text).addCss(dui_m_r_1), MenuItem.create(text)); + super(key, value, div().textContent(text).addCss(dui_m_r_1), MenuItem.create(text)); } /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/SuggestOption.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/SuggestOption.java index e0e3f4e7e..ad4d27be3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/SuggestOption.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/SuggestOption.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.forms.suggest; +import static org.dominokit.domino.ui.utils.Domino.*; + import org.dominokit.domino.ui.elements.SpanElement; import org.dominokit.domino.ui.menu.AbstractMenuItem; import org.dominokit.domino.ui.menu.MenuItem; @@ -97,7 +99,7 @@ public SuggestOption(String key, V value, String text, String description) { this( key, value, - (k, v) -> elements.span().textContent(text), + (k, v) -> span().textContent(text), (k, v) -> MenuItem.create(text, description)); } @@ -109,7 +111,7 @@ public SuggestOption(String key, V value, String text, String description) { * @param text The text to display for the suggestion. */ public SuggestOption(String key, V value, String text) { - super(key, value, elements.span().textContent(text), MenuItem.create(text)); + super(key, value, span().textContent(text), MenuItem.create(text)); withComponent( (parent, span) -> span.applyMeta(ValueMeta.of(value), AttributeMeta.of(DUI_OPTION_KEY, key))); diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/InputAutoValidator.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/InputAutoValidator.java index 7b4f41ee4..708032576 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/InputAutoValidator.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/InputAutoValidator.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.forms.validations; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.EventListener; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.forms.AutoValidator; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/MaxLengthValidator.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/MaxLengthValidator.java index 7980e8c56..427126799 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/MaxLengthValidator.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/MaxLengthValidator.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.forms.validations; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.forms.HasInputElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/MinLengthValidator.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/MinLengthValidator.java index 133dad6ff..3181e1cbb 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/MinLengthValidator.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/validations/MinLengthValidator.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.forms.validations; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import elemental2.dom.HTMLInputElement; import org.dominokit.domino.ui.forms.HasInputElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/AutoGrid.java b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/AutoGrid.java index fb0aaae7e..61f2cb5c5 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/AutoGrid.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/AutoGrid.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.grid; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/Column.java b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/Column.java index 1ea408f75..478196213 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/Column.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/Column.java @@ -17,6 +17,8 @@ import static org.dominokit.domino.ui.grid.Column.Offset.*; import static org.dominokit.domino.ui.grid.Column.Span.*; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/GridLayout.java b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/GridLayout.java index 3ed5d98ff..8aaf50059 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/GridLayout.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/GridLayout.java @@ -15,6 +15,9 @@ */ package org.dominokit.domino.ui.grid; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/Row.java b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/Row.java index a08a6e320..b750c3b09 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/Row.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/Row.java @@ -15,11 +15,9 @@ */ package org.dominokit.domino.ui.grid; -import static org.dominokit.domino.ui.grid.Columns._12; -import static org.dominokit.domino.ui.grid.Columns._16; -import static org.dominokit.domino.ui.grid.Columns._18; -import static org.dominokit.domino.ui.grid.Columns._24; -import static org.dominokit.domino.ui.grid.Columns._32; +import static org.dominokit.domino.ui.grid.Columns.*; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/flex/FlexItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/flex/FlexItem.java index bdaeb38fb..2b4febf75 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/flex/FlexItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/flex/FlexItem.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.grid.flex; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; @@ -40,7 +42,7 @@ public class FlexItem extends BaseDominoElement element. */ public FlexItem() { - this((T) elements.div().element()); + this((T) div().element()); } /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/flex/FlexLayout.java b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/flex/FlexLayout.java index 0442c2cc1..33ba8684a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/grid/flex/FlexLayout.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/grid/flex/FlexLayout.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.grid.flex; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import java.util.ArrayList; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/ElementIcon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/ElementIcon.java index 1f286cd38..bbae2e543 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/ElementIcon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/ElementIcon.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.icons; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.style.CssClass; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/Icon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/Icon.java index 6d3e2cd7e..661242f34 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/Icon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/Icon.java @@ -15,6 +15,9 @@ */ package org.dominokit.domino.ui.icons; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.dui_clickable; + import elemental2.dom.EventListener; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.events.EventType; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/IconWrapper.java b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/IconWrapper.java index 07fa4e73d..d4e59ae5c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/IconWrapper.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/IconWrapper.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.icons; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/LabeledIcon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/LabeledIcon.java index 4b5a913a5..b2ab41d13 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/LabeledIcon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/LabeledIcon.java @@ -15,7 +15,9 @@ */ package org.dominokit.domino.ui.icons; -import static org.dominokit.domino.ui.icons.IconsStyles.*; +import static org.dominokit.domino.ui.icons.IconsStyles.dui_icon_text; +import static org.dominokit.domino.ui.icons.IconsStyles.dui_labeled_icon; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.SpanElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/MdiIcon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/MdiIcon.java index 5b90d403f..0d2b24c97 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/MdiIcon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/MdiIcon.java @@ -16,13 +16,10 @@ package org.dominokit.domino.ui.icons; import static org.dominokit.domino.ui.icons.IconsStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; -import org.dominokit.domino.ui.style.BooleanCssClass; -import org.dominokit.domino.ui.style.CompositeCssClass; -import org.dominokit.domino.ui.style.CssClass; -import org.dominokit.domino.ui.style.HasCssClass; -import org.dominokit.domino.ui.style.SwapCssClass; +import org.dominokit.domino.ui.style.*; /** * An icon component for Material Design Icons (MDI) that allows you to customize its appearance and diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/StateChangeIcon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/StateChangeIcon.java index 93336bbdc..c552f6182 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/StateChangeIcon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/StateChangeIcon.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.icons; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import java.util.HashMap; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/ToggleIcon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/ToggleIcon.java index 3f8b5de85..4c83d6444 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/ToggleIcon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/ToggleIcon.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.icons; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import java.util.function.Consumer; import org.dominokit.domino.ui.style.AutoSwapCssClass; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/UrlIcon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/UrlIcon.java index 4038937fb..18cec8530 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/icons/UrlIcon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/icons/UrlIcon.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.icons; +import static org.dominokit.domino.ui.utils.Domino.*; + import org.dominokit.domino.ui.style.CssClass; import org.dominokit.domino.ui.style.SwapCssClass; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlock.java b/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlock.java index 30102c9b5..d3c538ee3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlock.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBlock.java @@ -15,6 +15,9 @@ */ package org.dominokit.domino.ui.infoboxes; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; + import elemental2.dom.Element; import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBox.java index d2d51d0e5..fbe924539 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/infoboxes/InfoBox.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.infoboxes; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; @@ -135,7 +137,7 @@ public static InfoBox create(IsElement icon, String title, String v * @return A new InfoBox instance. */ public static InfoBox create(HTMLElement icon, String title, String value) { - return new InfoBox(elements.elementOf(icon), title, value); + return new InfoBox(elementOf(icon), title, value); } /** @@ -146,7 +148,7 @@ public static InfoBox create(HTMLElement icon, String title, String value) { * @return A new InfoBox instance. */ public static InfoBox create(HTMLElement icon, String title) { - return new InfoBox(elements.elementOf(icon), title); + return new InfoBox(elementOf(icon), title); } /** @@ -157,7 +159,7 @@ public static InfoBox create(HTMLElement icon, String title) { * @return A new InfoBox instance. */ public static InfoBox create(IsElement icon, String title) { - return new InfoBox(elements.elementOf(icon), title); + return new InfoBox(elementOf(icon), title); } /** @@ -198,7 +200,7 @@ public static InfoBox create(IsElement icon) { * @return A new InfoBox instance. */ public static InfoBox create(HTMLElement icon) { - return new InfoBox(elements.elementOf(icon)); + return new InfoBox(elementOf(icon)); } /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/AcceptKeyEvents.java b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/AcceptKeyEvents.java index 19c85c010..2634c1eec 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/AcceptKeyEvents.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/AcceptKeyEvents.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.keyboard; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.EventListener; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyEventHandlerContext.java b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyEventHandlerContext.java index 8be6a591a..3d8a3acab 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyEventHandlerContext.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyEventHandlerContext.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.keyboard; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.EventListener; import java.util.function.Supplier; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardEvents.java b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardEvents.java index 9a161017f..d9913005a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardEvents.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardEvents.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.keyboard; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Node; import org.dominokit.domino.ui.events.HasDefaultEventOptions; import org.dominokit.domino.ui.utils.LazyInitializer; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardKeyListener.java b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardKeyListener.java index 0ec24f615..0c70e53ac 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardKeyListener.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardKeyListener.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.keyboard; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Event; import elemental2.dom.EventListener; import elemental2.dom.KeyboardEvent; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/labels/Label.java b/domino-ui/src/main/java/org/dominokit/domino/ui/labels/Label.java index fe9dedaff..609765ad9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/labels/Label.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/labels/Label.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.labels; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.SpanElement; import org.dominokit.domino.ui.style.CssClass; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/layout/AppLayout.java b/domino-ui/src/main/java/org/dominokit/domino/ui/layout/AppLayout.java index 4a2af5c93..6231ce14f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/layout/AppLayout.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/layout/AppLayout.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.layout; import static org.dominokit.domino.ui.layout.NavBarStyles.dui_nav_utility; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.Event; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/layout/EmptyState.java b/domino-ui/src/main/java/org/dominokit/domino/ui/layout/EmptyState.java index b86fdde45..73ca1d6d9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/layout/EmptyState.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/layout/EmptyState.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.layout; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.elements.HeadingElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/layout/NavBar.java b/domino-ui/src/main/java/org/dominokit/domino/ui/layout/NavBar.java index a0051eaad..0ff40e737 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/layout/NavBar.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/layout/NavBar.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static org.dominokit.domino.ui.layout.NavBarStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/lists/ListGroup.java b/domino-ui/src/main/java/org/dominokit/domino/ui/lists/ListGroup.java index dc11a53e2..3183795c2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/lists/ListGroup.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/lists/ListGroup.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLUListElement; import java.util.*; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/lists/ListItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/lists/ListItem.java index 56a5e382e..16da13905 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/lists/ListItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/lists/ListItem.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Event; import elemental2.dom.HTMLLIElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BaseLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BaseLoader.java index 3d81407d6..8cc9e6e0d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BaseLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BaseLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.i18n.LoaderLabels; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BounceLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BounceLoader.java index f6deffa57..8fb0795b8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BounceLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BounceLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BouncePulseLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BouncePulseLoader.java index 85fa2f131..45f4b06ec 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BouncePulseLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/BouncePulseLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/FacebookLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/FacebookLoader.java index a7b4d2fe5..5cbde63f0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/FacebookLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/FacebookLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/IosLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/IosLoader.java index f4bd3a73c..88639bed2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/IosLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/IosLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/IsLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/IsLoader.java index acd4d0d52..b5aa045c2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/IsLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/IsLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.utils.DominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Loader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Loader.java index d2ecbfba9..d25d44cd8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Loader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Loader.java @@ -18,12 +18,15 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.loaders.LoaderStyles.*; import static org.dominokit.domino.ui.style.GenericCss.dui_vertical_center; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; -import org.dominokit.domino.ui.style.*; +import org.dominokit.domino.ui.style.CompositeCssClass; +import org.dominokit.domino.ui.style.CssClass; +import org.dominokit.domino.ui.style.SwapCssClass; import org.dominokit.domino.ui.utils.DominoElement; import org.gwtproject.timer.client.Timer; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/NoneLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/NoneLoader.java index b191492a1..967ef8382 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/NoneLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/NoneLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/OrbitLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/OrbitLoader.java index 499057fee..b5b13d9b7 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/OrbitLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/OrbitLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/ProgressBarLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/ProgressBarLoader.java index b749e3daa..f05a2c6d1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/ProgressBarLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/ProgressBarLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/PulseLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/PulseLoader.java index 26ca158d8..8896b0b34 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/PulseLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/PulseLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RotatePlaneLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RotatePlaneLoader.java index ae52882d4..00a385e1f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RotatePlaneLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RotatePlaneLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RotationLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RotationLoader.java index 3b2adde04..d91b71de4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RotationLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RotationLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RoundBounceLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RoundBounceLoader.java index 24ceacf3e..37692aaeb 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RoundBounceLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/RoundBounceLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/StretchLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/StretchLoader.java index 0a4bd9731..00eb21079 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/StretchLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/StretchLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/TimerLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/TimerLoader.java index 4653532b5..9a68f3388 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/TimerLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/TimerLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Win8LinearLoader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Win8LinearLoader.java index 7af78fc49..81dabe23c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Win8LinearLoader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Win8LinearLoader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Win8Loader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Win8Loader.java index 80df8f7ea..eabf52b07 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Win8Loader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/loaders/Win8Loader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.loaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/media/MediaObject.java b/domino-ui/src/main/java/org/dominokit/domino/ui/media/MediaObject.java index 23e0ad86c..67c2f9ffb 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/media/MediaObject.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/media/MediaObject.java @@ -15,6 +15,10 @@ */ package org.dominokit.domino.ui.media; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.h; + import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; import elemental2.dom.Node; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java index efc36832f..81970669e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import elemental2.dom.Event; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java index 6ead72ef1..0f072fdae 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java @@ -18,15 +18,11 @@ import static elemental2.dom.DomGlobal.document; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.PopupsCloser.DOMINO_UI_AUTO_CLOSABLE; -import elemental2.dom.DomGlobal; -import elemental2.dom.Element; -import elemental2.dom.Event; +import elemental2.dom.*; import elemental2.dom.EventListener; -import elemental2.dom.HTMLDivElement; -import elemental2.dom.HTMLElement; -import elemental2.dom.HTMLLIElement; import java.util.*; import jsinterop.base.Js; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java index 1cdbefe98..f1783ca61 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import java.util.Arrays; import java.util.Optional; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItemsGroup.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItemsGroup.java index 46ba57951..7fe6a24e4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItemsGroup.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItemsGroup.java @@ -16,7 +16,7 @@ package org.dominokit.domino.ui.menu; import static java.util.Objects.nonNull; -import static org.dominokit.domino.ui.menu.MenuStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import java.util.ArrayList; import java.util.List; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuTarget.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuTarget.java index fd7439405..2295d4322 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuTarget.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuTarget.java @@ -15,6 +15,7 @@ */ package org.dominokit.domino.ui.menu; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestFitSideDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestFitSideDropDirection.java index b03895dd6..ccb953ba5 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestFitSideDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestFitSideDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DOMRect; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleDownUpDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleDownUpDropDirection.java index 7750d57b7..45478941d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleDownUpDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleDownUpDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DOMRect; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleSideDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleSideDropDirection.java index bcfc03110..173cb7048 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleSideDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleSideDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DOMRect; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleUpDownDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleUpDownDropDirection.java index 80e0db5c5..93d147114 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleUpDownDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestMiddleUpDownDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DOMRect; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestSideUpDownDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestSideUpDownDropDirection.java index ffc62223c..ff489642d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestSideUpDownDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BestSideUpDownDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DOMRect; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java index 77fec2860..2daf358e2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java index eb5bbf611..6a643fb96 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java @@ -17,14 +17,12 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; import elemental2.dom.DOMRect; -import elemental2.dom.DomGlobal; import elemental2.dom.Element; -import elemental2.dom.HTMLElement; -import jsinterop.base.Js; import org.dominokit.domino.ui.style.Style; /** BottomMiddleDropDirection class. */ @@ -42,42 +40,33 @@ public void position(Element source, Element target) { .style .setProperty("top", px.of((targetRect.top + window.pageYOffset) + targetRect.height + 1)); - Style.of(source).style.setProperty("left", "0"); + Style.of(source).style.setProperty("left", targetRect.left + "px"); dui_dd_bottom_middle.apply(source); - DomGlobal.console.info( - "source.offsetLeft : " + Js.uncheckedCast(source).offsetLeft); - DomGlobal.setTimeout( - p0 -> { - DOMRect newRect = source.getBoundingClientRect(); - DOMRect newTargetRect = target.getBoundingClientRect(); + DOMRect newRect = source.getBoundingClientRect(); + DOMRect newTargetRect = target.getBoundingClientRect(); - int innerWidth = window.innerWidth; + int innerWidth = window.innerWidth; - double delta = 0; - double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; - if (availableSpace < (newRect.width / 2)) { - delta = (newRect.width / 2) - availableSpace; - } + double delta = 0; + double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; + if (availableSpace < (newRect.width / 2)) { + delta = (newRect.width / 2) - availableSpace; + } - elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); + elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); - Style.of(source) - .style - .setProperty( - "left", - px.of( - newTargetRect.left - - (newRect.width / 2) - + (newTargetRect.width / 2) - + window.pageXOffset - - delta - - elements.body().element().getBoundingClientRect().left)); - - newRect = source.getBoundingClientRect(); - newTargetRect = target.getBoundingClientRect(); - }, - 0); + Style.of(source) + .style + .setProperty( + "left", + px.of( + newTargetRect.left + - (newRect.width / 2) + + (newTargetRect.width / 2) + + window.pageXOffset + - delta + - elements.body().element().getBoundingClientRect().left)); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomRightDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomRightDropDirection.java index 6b773ae8f..0741804c9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomRightDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomRightDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/DropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/DropDirection.java index bdeaa5bad..a8732551a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/DropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/DropDirection.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.menu.direction; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import elemental2.dom.Event; import org.dominokit.domino.ui.style.CssClass; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java index 285ff2a7d..82b9465c8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.menu.direction; import static elemental2.dom.DomGlobal.window; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java index 2f6a9ea64..5b32693d7 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java index fd30e60b4..ead0d1eaf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/MiddleOfScreenDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/MiddleOfScreenDropDirection.java index 3caa28e1c..8d9707612 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/MiddleOfScreenDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/MiddleOfScreenDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/MouseBestFitDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/MouseBestFitDirection.java index b28558f78..db4a2ca53 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/MouseBestFitDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/MouseBestFitDirection.java @@ -18,6 +18,7 @@ import static elemental2.dom.DomGlobal.window; import static java.util.Objects.isNull; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java index b9e271bef..06671924d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java index 1e2f09135..2a47e9898 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java index 13dde22b4..652097227 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java index b52c01f97..0d3c511ad 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java @@ -17,13 +17,12 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; import elemental2.dom.DOMRect; import elemental2.dom.Element; -import elemental2.dom.HTMLElement; -import jsinterop.base.Js; import org.dominokit.domino.ui.style.Style; /** TopLeftDropDirection class. */ @@ -40,10 +39,6 @@ public void position(Element source, Element target) { if (availableSpace < sourceRect.width) { delta = sourceRect.width - availableSpace; } - double baseLeft = targetRect.left; - if (target instanceof HTMLElement) { - baseLeft = Math.min(targetRect.left, Js.uncheckedCast(target).offsetLeft); - } Style.of(source) .style diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java index 65fc56565..ee5154e18 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java @@ -17,11 +17,11 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; import elemental2.dom.DOMRect; -import elemental2.dom.DomGlobal; import elemental2.dom.Element; import org.dominokit.domino.ui.style.Style; @@ -41,35 +41,31 @@ public void position(Element source, Element target) { .style .setProperty("top", px.of((targetRect.top + window.pageYOffset) - sourceRect.height - 1)); - Style.of(source).style.setProperty("left", "0"); + Style.of(source).style.setProperty("left", px.of(targetRect.left)); dui_dd_top_middle.apply(source); - DomGlobal.setTimeout( - p0 -> { - int innerWidth = window.innerWidth; - DOMRect newRect = source.getBoundingClientRect(); - DOMRect newTargetRect = target.getBoundingClientRect(); + int innerWidth = window.innerWidth; + DOMRect newRect = source.getBoundingClientRect(); + DOMRect newTargetRect = target.getBoundingClientRect(); - double delta = 0; - double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; - if (availableSpace < (newRect.width / 2)) { - delta = (newRect.width / 2) - availableSpace; - } - elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); + double delta = 0; + double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; + if (availableSpace < (newRect.width / 2)) { + delta = (newRect.width / 2) - availableSpace; + } + elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); - Style.of(source) - .style - .setProperty( - "left", - px.of( - newTargetRect.left - - (newRect.width / 2) - + (newTargetRect.width / 2) - + window.pageXOffset - - delta - - elements.body().element().getBoundingClientRect().left)); - }, - 0); + Style.of(source) + .style + .setProperty( + "left", + px.of( + newTargetRect.left + - (newRect.width / 2) + + (newTargetRect.width / 2) + + window.pageXOffset + - delta + - elements.body().element().getBoundingClientRect().left)); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopRightDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopRightDropDirection.java index 04922d0a2..9183cdf46 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopRightDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopRightDropDirection.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.window; import static org.dominokit.domino.ui.style.SpacingCss.dui_flex_col_reverse; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import static org.dominokit.domino.ui.utils.Unit.px; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/notifications/Notification.java b/domino-ui/src/main/java/org/dominokit/domino/ui/notifications/Notification.java index be48fad8c..ae382c713 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/notifications/Notification.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/notifications/Notification.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.notifications; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.*; import java.util.ArrayList; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/notifications/NotificationPosition.java b/domino-ui/src/main/java/org/dominokit/domino/ui/notifications/NotificationPosition.java index aeb81199c..bc50f50c2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/notifications/NotificationPosition.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/notifications/NotificationPosition.java @@ -15,12 +15,8 @@ */ package org.dominokit.domino.ui.notifications; -import static org.dominokit.domino.ui.notifications.NotificationStyles.dui_ntf_bottom_left; -import static org.dominokit.domino.ui.notifications.NotificationStyles.dui_ntf_bottom_middle; -import static org.dominokit.domino.ui.notifications.NotificationStyles.dui_ntf_bottom_right; -import static org.dominokit.domino.ui.notifications.NotificationStyles.dui_ntf_top_left; -import static org.dominokit.domino.ui.notifications.NotificationStyles.dui_ntf_top_middle; -import static org.dominokit.domino.ui.notifications.NotificationStyles.dui_ntf_top_right; +import static org.dominokit.domino.ui.notifications.NotificationStyles.*; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.DOMRect; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/AdvancedPagination.java b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/AdvancedPagination.java index 8b0b00302..581dfd411 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/AdvancedPagination.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/AdvancedPagination.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.pagination; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.EventListener; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/BasePagination.java b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/BasePagination.java index f1c092d1f..532b89a9c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/BasePagination.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/BasePagination.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.pagination; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import java.util.*; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/Pager.java b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/Pager.java index 917bf01fc..b0bc40bc8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/Pager.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/Pager.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.pagination; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.EventListener; import elemental2.dom.HTMLElement; import elemental2.dom.Text; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/PagerNavItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/PagerNavItem.java index e658ec60e..87a0375f9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/PagerNavItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/PagerNavItem.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.pagination; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import elemental2.dom.HTMLLIElement; import elemental2.dom.Node; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/ScrollingPagination.java b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/ScrollingPagination.java index fd6feae8c..59bf57d76 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/ScrollingPagination.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/pagination/ScrollingPagination.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.pagination; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import java.util.stream.IntStream; import org.dominokit.domino.ui.icons.lib.Icons; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/pickers/SimpleColorPicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/pickers/SimpleColorPicker.java index e27882c80..dfd2ea3c8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/pickers/SimpleColorPicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/pickers/SimpleColorPicker.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.pickers; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.HashSet; import java.util.Set; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/popover/BasePopover.java b/domino-ui/src/main/java/org/dominokit/domino/ui/popover/BasePopover.java index f808d2f7d..36e97a604 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/popover/BasePopover.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/popover/BasePopover.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static org.dominokit.domino.ui.collapsible.Collapsible.DUI_COLLAPSED; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.*; import java.util.Objects; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/popover/Popover.java b/domino-ui/src/main/java/org/dominokit/domino/ui/popover/Popover.java index b64506cd3..d4caa916e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/popover/Popover.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/popover/Popover.java @@ -17,6 +17,7 @@ import static elemental2.dom.DomGlobal.document; import static org.dominokit.domino.ui.dialogs.ModalBackDrop.DUI_REMOVE_POPOVERS; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.EventListener; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/popover/Tooltip.java b/domino-ui/src/main/java/org/dominokit/domino/ui/popover/Tooltip.java index 754fea17c..8cfe3dbba 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/popover/Tooltip.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/popover/Tooltip.java @@ -17,6 +17,8 @@ import static elemental2.dom.DomGlobal.document; import static org.dominokit.domino.ui.dialogs.ModalBackDrop.DUI_REMOVE_TOOLTIPS; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.body; import elemental2.dom.Element; import elemental2.dom.EventListener; @@ -64,7 +66,7 @@ public class Tooltip extends BasePopover { * @return The created tooltip. */ public static Tooltip create(Element target, String text) { - return new Tooltip(target, elements.text(text)); + return new Tooltip(target, text(text)); } /** @@ -75,7 +77,7 @@ public static Tooltip create(Element target, String text) { * @return The created tooltip. */ public static Tooltip create(IsElement target, String text) { - return new Tooltip(target.element(), elements.text(text)); + return new Tooltip(target.element(), text(text)); } /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/preloaders/Preloader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/preloaders/Preloader.java index ecef9773e..16f229d37 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/preloaders/Preloader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/preloaders/Preloader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.preloaders; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/progress/Progress.java b/domino-ui/src/main/java/org/dominokit/domino/ui/progress/Progress.java index 92d1ad1e8..ff33a0dd2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/progress/Progress.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/progress/Progress.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.progress; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.ArrayList; import java.util.List; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/progress/ProgressBar.java b/domino-ui/src/main/java/org/dominokit/domino/ui/progress/ProgressBar.java index 743f8bd7f..450af43c8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/progress/ProgressBar.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/progress/ProgressBar.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.progress; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.Optional; import org.dominokit.domino.ui.config.HasComponentConfig; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/BackgroundColorPicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/BackgroundColorPicker.java index 068ba1910..5c78702b0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/BackgroundColorPicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/BackgroundColorPicker.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext; +import static org.dominokit.domino.ui.utils.Domino.*; + import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.icons.ElementIcon; import org.dominokit.domino.ui.pickers.ColorValue; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/ColorPickerButton.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/ColorPickerButton.java index 63ca37483..e6d2173bf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/ColorPickerButton.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/ColorPickerButton.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/FontPicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/FontPicker.java index 585066bf9..6aa1a51d2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/FontPicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/FontPicker.java @@ -15,6 +15,10 @@ */ package org.dominokit.domino.ui.richtext; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.body; +import static org.dominokit.domino.ui.utils.Domino.span; + import elemental2.dom.Element; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/ForegroundColorPicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/ForegroundColorPicker.java index bf7bc434b..2a7b10274 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/ForegroundColorPicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/ForegroundColorPicker.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext; +import static org.dominokit.domino.ui.utils.Domino.*; + import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.icons.Icon; import org.dominokit.domino.ui.icons.lib.Icons; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/HiliteColorPicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/HiliteColorPicker.java index e660f4d60..604657c51 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/HiliteColorPicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/HiliteColorPicker.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext; +import static org.dominokit.domino.ui.utils.Domino.*; + import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.icons.Icon; import org.dominokit.domino.ui.icons.lib.Icons; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/RichTextCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/RichTextCommand.java index 748d06c2d..a9f015870 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/RichTextCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/RichTextCommand.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.richtext; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/RichTextEditor.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/RichTextEditor.java index ec5917232..8a125c20a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/RichTextEditor.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/RichTextEditor.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.button.group.ButtonsGroup; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/BackColorCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/BackColorCommand.java index d0e35561c..303b09a52 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/BackColorCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/BackColorCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.richtext.BackgroundColorPicker; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/BoldCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/BoldCommand.java index da85fa6b6..efe53e8fd 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/BoldCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/BoldCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/CopyCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/CopyCommand.java index 8734d7edc..fc3a4312f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/CopyCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/CopyCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/CutCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/CutCommand.java index ed4f2f94f..5d1b4163b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/CutCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/CutCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/DecreaseFontCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/DecreaseFontCommand.java index a9f36e12b..ada285986 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/DecreaseFontCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/DecreaseFontCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/FontNameCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/FontNameCommand.java index d12498826..4788d9e4c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/FontNameCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/FontNameCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.richtext.FontPicker; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/ForeColorCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/ForeColorCommand.java index cf14e14e8..0a963fbff 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/ForeColorCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/ForeColorCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.richtext.ColorPickerButton; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HeadingCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HeadingCommand.java index b9b16ea7a..e68000d82 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HeadingCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HeadingCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.button.DropdownButton; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HiliteColorCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HiliteColorCommand.java index 61d5c3d9f..ba8bdf0df 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HiliteColorCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HiliteColorCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.richtext.ColorPickerButton; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HorizontalRuleCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HorizontalRuleCommand.java index 1176e777c..25030863e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HorizontalRuleCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/HorizontalRuleCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/IncreaseFontCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/IncreaseFontCommand.java index 6326e4846..a4039ec8b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/IncreaseFontCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/IncreaseFontCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/IndentCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/IndentCommand.java index 60cfb7947..f7cdbaa03 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/IndentCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/IndentCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertHtmlCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertHtmlCommand.java index 50f4bded0..0e92e5662 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertHtmlCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertHtmlCommand.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.richtext.commands; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.*; import jsinterop.base.Js; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertImageCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertImageCommand.java index c6cb8788c..6594dedad 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertImageCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertImageCommand.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.richtext.commands; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.*; import org.dominokit.domino.ui.button.Button; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertImageLinkCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertImageLinkCommand.java index fc093e6f7..0c1121bbc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertImageLinkCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertImageLinkCommand.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.richtext.commands; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import elemental2.dom.Range; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertLinkCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertLinkCommand.java index 95f1d7d89..4a2fa452a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertLinkCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertLinkCommand.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.richtext.commands; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DocumentFragment; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertOrderedListCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertOrderedListCommand.java index c674ef436..663403121 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertOrderedListCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertOrderedListCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertParagraphCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertParagraphCommand.java index 898d900cb..77b1ba069 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertParagraphCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertParagraphCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.DocumentFragment; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertUnorderedListCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertUnorderedListCommand.java index 1a2e89bcc..3a8df2e0a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertUnorderedListCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/InsertUnorderedListCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/ItalicCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/ItalicCommand.java index fc0c1713c..b00ef6ca9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/ItalicCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/ItalicCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyCenterCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyCenterCommand.java index d246827b5..0d005c185 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyCenterCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyCenterCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyFullCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyFullCommand.java index 541b45c1a..10910986f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyFullCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyFullCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyLeftCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyLeftCommand.java index 010270f90..f55e6b2ae 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyLeftCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyLeftCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyRightCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyRightCommand.java index 7b47fb227..e8dcfeceb 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyRightCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/JustifyRightCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/OutdentCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/OutdentCommand.java index d94191b57..838a56a8d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/OutdentCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/OutdentCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/PasteCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/PasteCommand.java index 770fc09d7..b6ec5653d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/PasteCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/PasteCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.DomGlobal; import elemental2.dom.HTMLElement; import jsinterop.base.Js; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RedoCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RedoCommand.java index 80ca4b831..abe1a5cb2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RedoCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RedoCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RemoveFormatCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RemoveFormatCommand.java index f3c12b7da..65fb0b5b3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RemoveFormatCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RemoveFormatCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RemoveLinkCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RemoveLinkCommand.java index ab0223105..f8e08877c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RemoveLinkCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/RemoveLinkCommand.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.richtext.commands; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DocumentFragment; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/StrikeThroughCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/StrikeThroughCommand.java index 7ebc63990..4439f854c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/StrikeThroughCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/StrikeThroughCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/SubscriptCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/SubscriptCommand.java index f7a8ce2e3..7f2ffe36d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/SubscriptCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/SubscriptCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/SuperscriptCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/SuperscriptCommand.java index 42b988ead..b698d16ff 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/SuperscriptCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/SuperscriptCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/UnderLineCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/UnderLineCommand.java index ae8242436..e2044fe22 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/UnderLineCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/UnderLineCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/UndoCommand.java b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/UndoCommand.java index c2128bf7d..5eaa83af1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/UndoCommand.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/richtext/commands/UndoCommand.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.richtext.commands; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoHScrollPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoHScrollPanel.java index 8f0f449d8..7895643f4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoHScrollPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoHScrollPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.scroll; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoScrollPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoScrollPanel.java index aee72c54a..faa2ba094 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoScrollPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoScrollPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.scroll; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoVScrollPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoVScrollPanel.java index 3afbe85ad..b69eb7079 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoVScrollPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/AutoVScrollPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.scroll; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/HScrollPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/HScrollPanel.java index 6df109d50..1f85c70b8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/HScrollPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/HScrollPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.scroll; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/ScrollPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/ScrollPanel.java index 2e53e160e..37910f331 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/ScrollPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/ScrollPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.scroll; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/ScrollTop.java b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/ScrollTop.java index ed29942f0..49e4cf91b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/ScrollTop.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/ScrollTop.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.scroll; import static elemental2.dom.DomGlobal.document; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.button.Button; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/VScrollPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/VScrollPanel.java index 346ec30f0..bdb653748 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/VScrollPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/scroll/VScrollPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.scroll; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/search/Search.java b/domino-ui/src/main/java/org/dominokit/domino/ui/search/Search.java index b7c5f5d33..47bd3575d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/search/Search.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/search/Search.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.search; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import jsinterop.base.Js; import org.dominokit.domino.ui.animations.Transition; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/search/SearchBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/search/SearchBox.java index affeebe01..b053a4804 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/search/SearchBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/search/SearchBox.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.search.SearchStyles.dui_quick_search; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Event; import elemental2.dom.EventListener; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/sliders/Slider.java b/domino-ui/src/main/java/org/dominokit/domino/ui/sliders/Slider.java index a76146e43..7752970a4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/sliders/Slider.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/sliders/Slider.java @@ -24,6 +24,7 @@ import static org.dominokit.domino.ui.events.EventType.touchend; import static org.dominokit.domino.ui.events.EventType.touchmove; import static org.dominokit.domino.ui.events.EventType.touchstart; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.EventListener; import elemental2.dom.HTMLDivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/spin/HSpinSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/spin/HSpinSelect.java index 55ce3d7e0..4089f74a0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/spin/HSpinSelect.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/spin/HSpinSelect.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.spin; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.DOMRect; import org.dominokit.domino.ui.icons.Icon; import org.dominokit.domino.ui.utils.DominoUIConfig; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/spin/SpinItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/spin/SpinItem.java index a7c2c23f6..142e7b046 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/spin/SpinItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/spin/SpinItem.java @@ -15,6 +15,9 @@ */ package org.dominokit.domino.ui.spin; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/spin/SpinSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/spin/SpinSelect.java index ed3e4cc0f..a9dacd0cf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/spin/SpinSelect.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/spin/SpinSelect.java @@ -16,15 +16,12 @@ package org.dominokit.domino.ui.spin; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.EventListener; import elemental2.dom.HTMLDivElement; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; +import java.util.*; import org.dominokit.domino.ui.config.HasComponentConfig; import org.dominokit.domino.ui.config.SpinConfig; import org.dominokit.domino.ui.elements.AnchorElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/spin/VSpinSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/spin/VSpinSelect.java index 728074363..e9d7e89f6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/spin/VSpinSelect.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/spin/VSpinSelect.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.spin; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.DOMRect; import org.dominokit.domino.ui.icons.Icon; import org.dominokit.domino.ui.utils.DominoUIConfig; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/BaseSplitPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/BaseSplitPanel.java index 6e04faa2c..4201b5eb9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/BaseSplitPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/BaseSplitPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.splitpanel; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.LinkedList; import java.util.List; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/BaseSplitter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/BaseSplitter.java index 01a7258b1..3a5f43c16 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/BaseSplitter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/BaseSplitter.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.splitpanel; import static elemental2.dom.DomGlobal.document; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.EventListener; import elemental2.dom.HTMLDivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/HSplitPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/HSplitPanel.java index 099a4a07b..352e5027e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/HSplitPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/HSplitPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.splitpanel; +import static org.dominokit.domino.ui.utils.Domino.*; + /** * Represents a horizontal split panel which contains two panels separated by a horizontal splitter. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/HSplitter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/HSplitter.java index 363c8c5d4..f900efeda 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/HSplitter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/HSplitter.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.splitpanel; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.MouseEvent; import elemental2.dom.TouchEvent; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/SplitPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/SplitPanel.java index d65a3a078..8ec22d300 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/SplitPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/SplitPanel.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.splitpanel; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import java.util.ArrayList; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/VSplitPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/VSplitPanel.java index 3cb2be40d..29a990e0a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/VSplitPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/VSplitPanel.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.splitpanel; +import static org.dominokit.domino.ui.utils.Domino.*; + /** * Represents a vertical split panel which contains two panels separated by a vertical splitter. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/VSplitter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/VSplitter.java index 72621cdf4..0fcc3d392 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/VSplitter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel/VSplitter.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.splitpanel; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.MouseEvent; import elemental2.dom.TouchEvent; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/Step.java b/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/Step.java index 2a43161e1..ce77f3c3f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/Step.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/Step.java @@ -16,6 +16,9 @@ package org.dominokit.domino.ui.stepper; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.dui_active; import elemental2.dom.Element; import elemental2.dom.HTMLDivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/StepTracker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/StepTracker.java index d94f15166..edd6cd94a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/StepTracker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/StepTracker.java @@ -16,6 +16,9 @@ package org.dominokit.domino.ui.stepper; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.dui_active; import elemental2.dom.Element; import elemental2.dom.HTMLDivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/Stepper.java b/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/Stepper.java index 9d9d7f878..832e0b918 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/Stepper.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/Stepper.java @@ -15,6 +15,10 @@ */ package org.dominokit.domino.ui.stepper; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; +import static org.dominokit.domino.ui.utils.Domino.elementOf; + import elemental2.dom.HTMLDivElement; import java.util.ArrayList; import java.util.List; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/StepperTrack.java b/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/StepperTrack.java index eedc2e3a8..4436aa53c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/StepperTrack.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/stepper/StepperTrack.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import java.util.ArrayList; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/style/Waves.java b/domino-ui/src/main/java/org/dominokit/domino/ui/style/Waves.java index 80b1052ad..cc4df1c34 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/style/Waves.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/style/Waves.java @@ -18,13 +18,10 @@ import static elemental2.dom.DomGlobal.window; import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.events.EventType.mousedown; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; -import elemental2.dom.DOMRect; -import elemental2.dom.Element; -import elemental2.dom.Event; -import elemental2.dom.EventListener; -import elemental2.dom.MouseEvent; +import elemental2.dom.*; import jsinterop.base.Js; import jsinterop.base.JsPropertyMap; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/style/WavesElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/style/WavesElement.java index b320e615e..4b8be5793 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/style/WavesElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/style/WavesElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.style; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/style/WavesSupport.java b/domino-ui/src/main/java/org/dominokit/domino/ui/style/WavesSupport.java index 3473eec0e..42155bb89 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/style/WavesSupport.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/style/WavesSupport.java @@ -15,6 +15,7 @@ */ package org.dominokit.domino.ui.style; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/FillItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/FillItem.java index c0da1f147..9747cff00 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/FillItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/FillItem.java @@ -16,6 +16,9 @@ package org.dominokit.domino.ui.tabs; import static org.dominokit.domino.ui.tabs.TabStyles.dui_tab_item; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.dui_grow_1; +import static org.dominokit.domino.ui.utils.Domino.li; import elemental2.dom.HTMLLIElement; import org.dominokit.domino.ui.elements.LIElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/Tab.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/Tab.java index 1f483c777..f2c939dcd 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/Tab.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/Tab.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.tabs; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.*; import java.util.ArrayList; @@ -30,11 +31,7 @@ import org.dominokit.domino.ui.elements.SpanElement; import org.dominokit.domino.ui.events.EventType; import org.dominokit.domino.ui.icons.Icon; -import org.dominokit.domino.ui.utils.ApplyFunction; -import org.dominokit.domino.ui.utils.BaseDominoElement; -import org.dominokit.domino.ui.utils.ChildHandler; -import org.dominokit.domino.ui.utils.HasClickableElement; -import org.dominokit.domino.ui.utils.LazyChild; +import org.dominokit.domino.ui.utils.*; /** * Represents a UI tab component used within a {@link TabsPanel}. Provides functionalities such as diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/TabsPanel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/TabsPanel.java index f5ee48f08..daf8e3b19 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/TabsPanel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tabs/TabsPanel.java @@ -17,6 +17,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import elemental2.dom.HTMLDivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeAccent.java b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeAccent.java index 96fb34a1e..30745517a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeAccent.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeAccent.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.themes; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import org.dominokit.domino.ui.style.CssClass; import org.dominokit.domino.ui.style.DominoCss; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeDark.java b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeDark.java index 2b8f8d990..2e8708317 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeDark.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeDark.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.themes; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import org.dominokit.domino.ui.style.CssClass; import org.dominokit.domino.ui.style.DominoCss; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeDefault.java b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeDefault.java index 2a8a148a9..0e1a41bb0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeDefault.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeDefault.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.themes; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import org.dominokit.domino.ui.style.CssClass; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeLight.java b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeLight.java index 4609a7870..591ea3744 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeLight.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeLight.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.themes; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import org.dominokit.domino.ui.style.CssClass; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeManager.java b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeManager.java index 48baa6f87..f0ba8025a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeManager.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/DominoThemeManager.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.themes; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.webstorage.WebStorageWindow; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/ElementThemeManager.java b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/ElementThemeManager.java index 46fb4627f..39a3942ff 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/ElementThemeManager.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/ElementThemeManager.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.themes; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import java.util.HashMap; import java.util.Map; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/IsDominoTheme.java b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/IsDominoTheme.java index ce92ce84a..9381b18ba 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/themes/IsDominoTheme.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/themes/IsDominoTheme.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.themes; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.style.DominoCss; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/thumbnails/Thumbnail.java b/domino-ui/src/main/java/org/dominokit/domino/ui/thumbnails/Thumbnail.java index e9478d8d4..a041bbce2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/thumbnails/Thumbnail.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/thumbnails/Thumbnail.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.thumbnails; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLImageElement; @@ -117,7 +119,7 @@ public Thumbnail setDirection(ThumbnailDirection direction) { * @return the current Thumbnail instance for method chaining. */ public Thumbnail appendChild(HTMLImageElement img) { - elements.elementOf(img).addCss(dui_thumbnail_img); + elementOf(img).addCss(dui_thumbnail_img); return super.appendChild(img); } @@ -131,7 +133,7 @@ public Thumbnail appendChild(HTMLImageElement img) { public Thumbnail appendChild(IsElement element) { if (element.element() instanceof HTMLImageElement || element.element() instanceof HTMLPictureElement) { - elements.elementOf(element).addCss(dui_thumbnail_img); + elementOf(element).addCss(dui_thumbnail_img); } return super.appendChild(element); } @@ -145,7 +147,7 @@ public Thumbnail appendChild(IsElement element) { */ public Thumbnail appendChild(Node node) { if (node instanceof HTMLImageElement || node instanceof HTMLPictureElement) { - elements.elementOf(Js.uncheckedCast(node)).addCss(dui_thumbnail_img); + elementOf(Js.uncheckedCast(node)).addCss(dui_thumbnail_img); } return super.appendChild(node); } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePicker.java b/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePicker.java index b72e84873..c909e7ef9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePicker.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePicker.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.timepicker; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.div; import elemental2.dom.CustomEvent; import elemental2.dom.HTMLDivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerCustomEvents.java b/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerCustomEvents.java index 84428328d..5d5b9be4b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerCustomEvents.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerCustomEvents.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.timepicker; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.CustomEvent; import elemental2.dom.CustomEventInit; import jsinterop.base.Js; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerHeader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerHeader.java index ea9e0844d..8a50a2f8d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerHeader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerHeader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.timepicker; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import java.util.Date; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerSelectors.java b/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerSelectors.java index 7214c0cae..397a9ded2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerSelectors.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/timepicker/TimePickerSelectors.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.timepicker; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import java.util.Date; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/Tree.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/Tree.java index 57ad6f7c3..75bed5247 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/Tree.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/Tree.java @@ -17,14 +17,11 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; +import java.util.*; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.collapsible.CollapseStrategy; import org.dominokit.domino.ui.elements.DivElement; @@ -34,13 +31,7 @@ import org.dominokit.domino.ui.icons.ToggleMdiIcon; import org.dominokit.domino.ui.icons.lib.Icons; import org.dominokit.domino.ui.search.Search; -import org.dominokit.domino.ui.utils.BaseDominoElement; -import org.dominokit.domino.ui.utils.ChildHandler; -import org.dominokit.domino.ui.utils.HasSelectionListeners; -import org.dominokit.domino.ui.utils.LazyChild; -import org.dominokit.domino.ui.utils.PostfixAddOn; -import org.dominokit.domino.ui.utils.Separator; -import org.dominokit.domino.ui.utils.TreeParent; +import org.dominokit.domino.ui.utils.*; /** * The Tree class provides a tree structure for displaying hierarchical data. diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeHeader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeHeader.java index 3e0f3aac0..21ac8fded 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeHeader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeHeader.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.tree; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItem.java index 663375978..4fd743c0c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/tree/TreeItem.java @@ -17,36 +17,22 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; -import elemental2.dom.*; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Optional; -import java.util.Set; +import elemental2.dom.Element; +import elemental2.dom.EventListener; +import elemental2.dom.HTMLAnchorElement; +import elemental2.dom.HTMLLIElement; +import java.util.*; import org.dominokit.domino.ui.collapsible.Collapsible; import org.dominokit.domino.ui.config.HasComponentConfig; import org.dominokit.domino.ui.config.TreeConfig; -import org.dominokit.domino.ui.elements.AnchorElement; -import org.dominokit.domino.ui.elements.DivElement; -import org.dominokit.domino.ui.elements.LIElement; -import org.dominokit.domino.ui.elements.SpanElement; -import org.dominokit.domino.ui.elements.UListElement; +import org.dominokit.domino.ui.elements.*; import org.dominokit.domino.ui.icons.Icon; import org.dominokit.domino.ui.icons.StateChangeIcon; import org.dominokit.domino.ui.icons.ToggleIcon; import org.dominokit.domino.ui.style.WaveStyle; -import org.dominokit.domino.ui.utils.BaseDominoElement; -import org.dominokit.domino.ui.utils.CanActivate; -import org.dominokit.domino.ui.utils.CanDeactivate; -import org.dominokit.domino.ui.utils.HasClickableElement; -import org.dominokit.domino.ui.utils.HasSelectionListeners; -import org.dominokit.domino.ui.utils.LazyChild; -import org.dominokit.domino.ui.utils.PostfixAddOn; -import org.dominokit.domino.ui.utils.PrefixAddOn; -import org.dominokit.domino.ui.utils.TreeParent; +import org.dominokit.domino.ui.utils.*; /** * Represents a tree item in a tree structure. diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/typography/BlockHeader.java b/domino-ui/src/main/java/org/dominokit/domino/ui/typography/BlockHeader.java index f8fc740c8..570cb14c1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/typography/BlockHeader.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/typography/BlockHeader.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.typography; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.elements.HeadingElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/typography/Blockquote.java b/domino-ui/src/main/java/org/dominokit/domino/ui/typography/Blockquote.java index d0bc25a4e..b7a3a9ba7 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/typography/Blockquote.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/typography/Blockquote.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.typography; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.BlockquoteElement; import org.dominokit.domino.ui.elements.FooterElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFilePreview.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFilePreview.java index 657e76ea3..a4da67670 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFilePreview.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFilePreview.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.upload; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Event; import elemental2.dom.FileReader; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFilePreviewContainer.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFilePreviewContainer.java index 80eb51b24..faf549d54 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFilePreviewContainer.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFilePreviewContainer.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.upload; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.grid.Row; import org.dominokit.domino.ui.utils.BaseDominoElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFileUploadDecoration.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFileUploadDecoration.java index c5086cdaa..60ef0806f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFileUploadDecoration.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/DefaultFileUploadDecoration.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.upload; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLDivElement; import org.dominokit.domino.ui.elements.DivElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FileItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FileItem.java index 3ab46f2d2..f6884df22 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FileItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FileItem.java @@ -17,6 +17,7 @@ import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.upload.FilePreviewFactory.UNITS; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.core.JsNumber; import elemental2.dom.File; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FilePreviewContainer.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FilePreviewContainer.java index f9eab86c0..a50148a91 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FilePreviewContainer.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FilePreviewContainer.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.upload; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FileUpload.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FileUpload.java index 429a00cc4..3522538df 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FileUpload.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/FileUpload.java @@ -16,20 +16,11 @@ package org.dominokit.domino.ui.upload; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.DominoUIConfig.CONFIG; -import elemental2.dom.DragEvent; -import elemental2.dom.Element; -import elemental2.dom.File; -import elemental2.dom.FileList; -import elemental2.dom.HTMLDivElement; -import elemental2.dom.HTMLElement; -import elemental2.dom.XMLHttpRequest; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Optional; +import elemental2.dom.*; +import java.util.*; import java.util.function.Supplier; import jsinterop.base.Js; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/IsFilePreview.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/IsFilePreview.java index 86d90ec0b..5b023fe92 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/IsFilePreview.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/IsFilePreview.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.upload; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.utils.ChildHandler; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/UploadOptions.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/UploadOptions.java index 311d524ae..5d57357ba 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/UploadOptions.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/UploadOptions.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.upload; import static org.dominokit.domino.ui.upload.FileUpload.DEFAULT_SUCCESS_CODES; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.XMLHttpRequest; import java.util.List; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/UploadRequestSender.java b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/UploadRequestSender.java index 05889db4f..15cb936bd 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/upload/UploadRequestSender.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/upload/UploadRequestSender.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.upload; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.FormData; import elemental2.dom.XMLHttpRequest; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/AppendStrategy.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/AppendStrategy.java index 39c9b54bc..ced9dd609 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/AppendStrategy.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/AppendStrategy.java @@ -15,6 +15,7 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/AttachDetachCallback.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/AttachDetachCallback.java index 9fcddb81d..5dbf28329 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/AttachDetachCallback.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/AttachDetachCallback.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.MutationRecord; /** A functional interface for attaching and detaching callback methods to observe DOM mutations. */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BaseDominoElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BaseDominoElement.java index 4ddf8f250..1c8c8d1c9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BaseDominoElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BaseDominoElement.java @@ -17,27 +17,12 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.core.JsArray; -import elemental2.dom.AddEventListenerOptions; -import elemental2.dom.CSSStyleDeclaration; -import elemental2.dom.CustomEvent; -import elemental2.dom.DOMRect; -import elemental2.dom.Element; -import elemental2.dom.Event; +import elemental2.dom.*; import elemental2.dom.EventListener; -import elemental2.dom.EventTarget; -import elemental2.dom.HTMLElement; -import elemental2.dom.Node; -import elemental2.dom.NodeList; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; +import java.util.*; import java.util.function.Consumer; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -59,15 +44,7 @@ import org.dominokit.domino.ui.menu.direction.DropDirection; import org.dominokit.domino.ui.popover.Popover; import org.dominokit.domino.ui.popover.Tooltip; -import org.dominokit.domino.ui.style.CssClass; -import org.dominokit.domino.ui.style.DominoCss; -import org.dominokit.domino.ui.style.DominoStyle; -import org.dominokit.domino.ui.style.Elevation; -import org.dominokit.domino.ui.style.HasCssClass; -import org.dominokit.domino.ui.style.HasCssClasses; -import org.dominokit.domino.ui.style.Style; -import org.dominokit.domino.ui.style.WaveStyle; -import org.dominokit.domino.ui.style.WavesSupport; +import org.dominokit.domino.ui.style.*; import org.dominokit.domino.ui.themes.DominoThemeManager; import org.gwtproject.editor.client.Editor; import org.gwtproject.safehtml.shared.SafeHtml; @@ -101,11 +78,9 @@ public abstract class BaseDominoElement, DominoStyle, - DominoCss, HasKeyboardEvents, HasCollapseListeners, HasAttributes, - ElementsFactory, HasMeta { static { @@ -1847,7 +1822,7 @@ public List> childElements() { NodeList childNodes = element().childNodes; return childNodes.asList().stream() .filter(node -> node instanceof Element) - .map(node -> elements.elementOf(Js.uncheckedCast(node))) + .map(node -> elementOf(Js.uncheckedCast(node))) .collect(Collectors.toList()); } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BodyObserver.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BodyObserver.java index ead6f8ea1..f4b195222 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BodyObserver.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/BodyObserver.java @@ -18,6 +18,7 @@ import static elemental2.dom.DomGlobal.document; import static org.dominokit.domino.ui.utils.BaseDominoElement.ATTACH_UID_KEY; import static org.dominokit.domino.ui.utils.BaseDominoElement.DETACH_UID_KEY; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.core.JsArray; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/CanChange.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/CanChange.java index da2bcfe5e..ef6c45682 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/CanChange.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/CanChange.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Event; import java.util.Optional; import java.util.function.Consumer; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ClipboardItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ClipboardItem.java index 90e92641d..259818ab1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ClipboardItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ClipboardItem.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.core.JsArray; import elemental2.dom.Blob; import jsinterop.annotations.JsPackage; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DOMParser.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DOMParser.java index 49143d901..8947158a4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DOMParser.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DOMParser.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Document; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DelayedTextInput.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DelayedTextInput.java index 936c4d384..cd71081e8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DelayedTextInput.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DelayedTextInput.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.utils; import static java.util.Objects.isNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLInputElement; import jsinterop.base.Js; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DisableUtil.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DisableUtil.java index d803f4ea6..6ae817060 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DisableUtil.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DisableUtil.java @@ -15,6 +15,7 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DomElements.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DomElements.java index c66ffad72..f839f213d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DomElements.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DomElements.java @@ -17,57 +17,9 @@ import static elemental2.dom.DomGlobal.document; import static jsinterop.base.Js.cast; +import static org.dominokit.domino.ui.utils.Domino.*; -import elemental2.dom.Element; -import elemental2.dom.HTMLAnchorElement; -import elemental2.dom.HTMLAreaElement; -import elemental2.dom.HTMLAudioElement; -import elemental2.dom.HTMLBRElement; -import elemental2.dom.HTMLBodyElement; -import elemental2.dom.HTMLButtonElement; -import elemental2.dom.HTMLCanvasElement; -import elemental2.dom.HTMLDListElement; -import elemental2.dom.HTMLDataListElement; -import elemental2.dom.HTMLDivElement; -import elemental2.dom.HTMLElement; -import elemental2.dom.HTMLEmbedElement; -import elemental2.dom.HTMLFieldSetElement; -import elemental2.dom.HTMLFormElement; -import elemental2.dom.HTMLHRElement; -import elemental2.dom.HTMLHeadingElement; -import elemental2.dom.HTMLIFrameElement; -import elemental2.dom.HTMLImageElement; -import elemental2.dom.HTMLInputElement; -import elemental2.dom.HTMLLIElement; -import elemental2.dom.HTMLLabelElement; -import elemental2.dom.HTMLLegendElement; -import elemental2.dom.HTMLMapElement; -import elemental2.dom.HTMLMeterElement; -import elemental2.dom.HTMLModElement; -import elemental2.dom.HTMLOListElement; -import elemental2.dom.HTMLObjectElement; -import elemental2.dom.HTMLOptGroupElement; -import elemental2.dom.HTMLOptionElement; -import elemental2.dom.HTMLOutputElement; -import elemental2.dom.HTMLParagraphElement; -import elemental2.dom.HTMLParamElement; -import elemental2.dom.HTMLPictureElement; -import elemental2.dom.HTMLPreElement; -import elemental2.dom.HTMLProgressElement; -import elemental2.dom.HTMLQuoteElement; -import elemental2.dom.HTMLScriptElement; -import elemental2.dom.HTMLSelectElement; -import elemental2.dom.HTMLSourceElement; -import elemental2.dom.HTMLTableCaptionElement; -import elemental2.dom.HTMLTableCellElement; -import elemental2.dom.HTMLTableColElement; -import elemental2.dom.HTMLTableElement; -import elemental2.dom.HTMLTableRowElement; -import elemental2.dom.HTMLTableSectionElement; -import elemental2.dom.HTMLTextAreaElement; -import elemental2.dom.HTMLTrackElement; -import elemental2.dom.HTMLUListElement; -import elemental2.dom.HTMLVideoElement; +import elemental2.dom.*; import elemental2.svg.SVGCircleElement; import elemental2.svg.SVGElement; import elemental2.svg.SVGLineElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/Domino.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/Domino.java new file mode 100644 index 000000000..a695f31c4 --- /dev/null +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/Domino.java @@ -0,0 +1,1771 @@ +/* + * 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.utils; + +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.ElementsFactory.elements; +import static org.dominokit.domino.ui.utils.SVGFactory.svgElements; + +import elemental2.dom.Element; +import elemental2.dom.Text; +import elemental2.svg.SVGElement; +import java.util.Optional; +import org.dominokit.domino.ui.IsElement; +import org.dominokit.domino.ui.elements.*; +import org.dominokit.domino.ui.elements.ImageElement; +import org.dominokit.domino.ui.elements.ScriptElement; +import org.dominokit.domino.ui.elements.svg.*; +import org.dominokit.domino.ui.style.DominoCss; + +public class Domino implements DominoCss { + public static final Domino DOM = new Domino(); + + private Domino() {} + + /** + * Retrieves an element by its unique identifier. + * + * @param id The unique identifier of the element to retrieve. + * @return An optional containing the element, or empty if not found. + */ + public static Optional> byId(String id) { + return elements.byId(id); + } + + /** + * Creates a new HTML element of the specified type. + * + * @param element The HTML element name (e.g., "div", "span"). + * @param type The Java class representing the element type. + * @param The element type. + * @return A new instance of the specified element type. + */ + public static E create(String element, Class type) { + return elements.create(element, type); + } + + /** + * Wraps an existing element in a DominoElement. + * + * @param element The existing HTML element to wrap. + * @param The element type. + * @return A DominoElement wrapping the existing element. + */ + public static DominoElement elementOf(E element) { + return elements.elementOf(element); + } + + /** + * Creates a DominoElement of the specified IsElement type. + * + * @param element The IsElement to wrap. + * @param The element type. + * @param The IsElement type. + * @return A DominoElement wrapping the IsElement. + */ + public static > DominoElement elementOf(E element) { + return elements.elementOf(element); + } + + /** + * Generates a unique identifier. + * + * @return A unique identifier. + */ + public static String getUniqueId() { + return elements.getUniqueId(); + } + + /** + * Generates a unique identifier with the specified prefix. + * + * @param prefix The prefix to use in the generated identifier. + * @return A unique identifier with the specified prefix. + */ + public static String getUniqueId(String prefix) { + return elements.getUniqueId(prefix); + } + + /** + * Creates a <body> element. + * + * @return A new BodyElement. + */ + public static BodyElement body() { + return elements.body(); + } + + /** + * Creates a <picture> element. + * + * @return A new PictureElement. + */ + public static PictureElement picture() { + return elements.picture(); + } + + /** + * Creates an <address> element. + * + * @return A new AddressElement. + */ + public static AddressElement address() { + return elements.address(); + } + + /** + * Creates an <article> element. + * + * @return A new ArticleElement. + */ + public static ArticleElement article() { + return elements.article(); + } + + /** + * Creates an <aside> element. + * + * @return A new AsideElement. + */ + public static AsideElement aside() { + return elements.aside(); + } + + /** + * Creates a <footer> element. + * + * @return A new FooterElement. + */ + public static FooterElement footer() { + return elements.footer(); + } + + /** + * Creates a <h> (heading) element with the specified level. + * + * @param n The heading level (e.g., 1 for <h1>, 2 for <h2>, etc.). + * @return A new HeadingElement with the specified level. + */ + public static HeadingElement h(int n) { + return elements.h(n); + } + + /** + * Creates a <header> element. + * + * @return A new HeaderElement. + */ + public static HeaderElement header() { + return elements.header(); + } + + /** + * Creates an <hgroup> element. + * + * @return A new HGroupElement. + */ + public static HGroupElement hgroup() { + return elements.hgroup(); + } + + /** + * Creates a <nav> element. + * + * @return A new NavElement. + */ + public static NavElement nav() { + return elements.nav(); + } + + /** + * Creates a <section> element. + * + * @return A new SectionElement. + */ + public static SectionElement section() { + return elements.section(); + } + + /** + * Creates a <blockquote> element. + * + * @return A new BlockquoteElement. + */ + public static BlockquoteElement blockquote() { + return elements.blockquote(); + } + + /** + * Creates a <dd> element. + * + * @return A new DDElement. + */ + public static DDElement dd() { + return elements.dd(); + } + + /** + * Creates a <div> element. + * + * @return A new DivElement. + */ + public static DivElement div() { + return elements.div(); + } + + /** + * Creates a <dl> (definition list) element. + * + * @return A new DListElement. + */ + public static DListElement dl() { + return elements.dl(); + } + + /** + * Creates a <dt> (definition term) element. + * + * @return A new DTElement. + */ + public static DTElement dt() { + return elements.dt(); + } + + /** + * Creates a <figcaption> element. + * + * @return A new FigCaptionElement. + */ + public static FigCaptionElement figcaption() { + return elements.figcaption(); + } + + /** + * Creates a <figure> element. + * + * @return A new FigureElement. + */ + public static FigureElement figure() { + return elements.figure(); + } + + /** + * Creates a <hr> (horizontal rule) element. + * + * @return A new HRElement. + */ + public static HRElement hr() { + return elements.hr(); + } + + /** + * Creates a <li> (list item) element. + * + * @return A new LIElement. + */ + public static LIElement li() { + return elements.li(); + } + + /** + * Creates a <main> element. + * + * @return A new MainElement. + */ + @SuppressWarnings("all") + public static MainElement main() { + return elements.main(); + } + + /** + * Creates an <ol> (ordered list) element. + * + * @return A new OListElement. + */ + public static OListElement ol() { + return elements.ol(); + } + + /** + * Creates a <p> (paragraph) element. + * + * @return A new ParagraphElement. + */ + public static ParagraphElement p() { + return elements.p(); + } + + /** + * Creates a <p> (paragraph) element with the specified text content. + * + * @param text The text content to set in the paragraph. + * @return A new ParagraphElement with the specified text content. + */ + public static ParagraphElement p(String text) { + return elements.p(text); + } + + /** + * Creates a <pre> (preformatted text) element. + * + * @return A new PreElement. + */ + public static PreElement pre() { + return elements.pre(); + } + + /** + * Creates a <ul> (unordered list) element. + * + * @return A new UListElement. + */ + public static UListElement ul() { + return elements.ul(); + } + + /** + * Creates an <a> (anchor) element. + * + * @return A new AnchorElement. + */ + public static AnchorElement a() { + return elements.a(); + } + + /** + * Creates an <a> (anchor) element with the specified href. + * + * @param href The URL to set in the anchor's href attribute. + * @return A new AnchorElement with the specified href. + */ + public static AnchorElement a(String href) { + return elements.a(href); + } + + /** + * Creates an <a> (anchor) element with the specified href and target. + * + * @param href The URL to set in the anchor's href attribute. + * @param target The target attribute value to set. + * @return A new AnchorElement with the specified href and target. + */ + public static AnchorElement a(String href, String target) { + return elements.a(href, target); + } + + /** + * Creates an <abbr> element. + * + * @return A new ABBRElement. + */ + public static ABBRElement abbr() { + return elements.abbr(); + } + + /** + * Creates a <b> (bold) element. + * + * @return A new BElement. + */ + public static BElement b() { + return elements.b(); + } + + /** + * Creates a <br> (line break) element. + * + * @return A new BRElement. + */ + public static BRElement br() { + return elements.br(); + } + + /** + * Creates a <cite> element. + * + * @return A new CiteElement. + */ + public static CiteElement cite() { + return elements.cite(); + } + + /** + * Creates a <code> element. + * + * @return A new CodeElement. + */ + public static CodeElement code() { + return elements.code(); + } + + /** + * Creates a <dfn> element. + * + * @return A new DFNElement. + */ + public static DFNElement dfn() { + return elements.dfn(); + } + + /** + * Creates an <em> (emphasis) element. + * + * @return A new EMElement. + */ + public static EMElement em() { + return elements.em(); + } + + /** + * Creates an <i> (italic) element. + * + * @return A new IElement. + */ + public static IElement i() { + return elements.i(); + } + + /** + * Creates a <kbd> (keyboard input) element. + * + * @return A new KBDElement. + */ + public static KBDElement kbd() { + return elements.kbd(); + } + + /** + * Creates a <mark> element. + * + * @return A new MarkElement. + */ + public static MarkElement mark() { + return elements.mark(); + } + + /** + * Creates a <q> (quotation) element. + * + * @return A new QuoteElement. + */ + public static QuoteElement q() { + return elements.q(); + } + + /** + * Creates a <small> element. + * + * @return A new SmallElement. + */ + public static SmallElement small() { + return elements.small(); + } + + /** + * Creates a <span> element. + * + * @return A new SpanElement. + */ + public static SpanElement span() { + return elements.span(); + } + + /** + * Creates a <strong> (strong emphasis) element. + * + * @return A new StrongElement. + */ + public static StrongElement strong() { + return elements.strong(); + } + + /** + * Creates a <sub> (subscript) element. + * + * @return A new SubElement. + */ + public static SubElement sub() { + return elements.sub(); + } + + /** + * Creates a <sup> (superscript) element. + * + * @return A new SupElement. + */ + public static SupElement sup() { + return elements.sup(); + } + + /** + * Creates a <time> element. + * + * @return A new TimeElement. + */ + public static TimeElement time() { + return elements.time(); + } + + /** + * Creates a <u> (underline) element. + * + * @return A new UElement. + */ + public static UElement u() { + return elements.u(); + } + + /** + * Creates a <var> (variable) element. + * + * @return A new VarElement. + */ + public static VarElement var() { + return elements.var(); + } + + /** + * Creates a <wbr> (word break opportunity) element. + * + * @return A new WBRElement. + */ + public static WBRElement wbr() { + return elements.wbr(); + } + + /** + * Creates an <area> element. + * + * @return A new AreaElement. + */ + public static AreaElement area() { + return elements.area(); + } + + /** + * Creates an <audio> element. + * + * @return A new AudioElement. + */ + public static AudioElement audio() { + return elements.audio(); + } + + /** + * Creates an <img> (image) element. + * + * @return A new ImageElement. + */ + public static ImageElement img() { + return elements.img(); + } + + /** + * Creates an <img> (image) element with the specified source URL. + * + * @param src The URL of the image source. + * @return A new ImageElement with the specified source URL. + */ + public static ImageElement img(String src) { + return elements.img(src); + } + + /** + * Creates a <map> element. + * + * @return A new MapElement. + */ + public static MapElement map() { + return elements.map(); + } + + /** + * Creates a <track> element. + * + * @return A new TrackElement. + */ + public static TrackElement track() { + return elements.track(); + } + + /** + * Creates a <video> element. + * + * @return A new VideoElement. + */ + public static VideoElement video() { + return elements.video(); + } + + /** + * Creates a <canvas> element. + * + * @return A new CanvasElement. + */ + public static CanvasElement canvas() { + return elements.canvas(); + } + + /** + * Creates an <embed> element. + * + * @return A new EmbedElement. + */ + public static EmbedElement embed() { + return elements.embed(); + } + + /** + * Creates an <iframe> element. + * + * @return A new IFrameElement. + */ + public static IFrameElement iframe() { + return elements.iframe(); + } + + /** + * Creates an <iframe> element with the specified source URL. + * + * @param src The URL of the iframe source. + * @return A new IFrameElement with the specified source URL. + */ + public static IFrameElement iframe(String src) { + return elements.iframe(src); + } + + /** + * Creates an <object> element. + * + * @return A new ObjectElement. + */ + public static ObjectElement object() { + return elements.object(); + } + + /** + * Creates a <param> element. + * + * @return A new ParamElement. + */ + public static ParamElement param() { + return elements.param(); + } + + /** + * Creates a <source> element. + * + * @return A new SourceElement. + */ + public static SourceElement source() { + return elements.source(); + } + + /** + * Creates a <noscript> element. + * + * @return A new NoScriptElement. + */ + public static NoScriptElement noscript() { + return elements.noscript(); + } + + /** + * Creates a <script> element. + * + * @return A new ScriptElement. + */ + public static ScriptElement script() { + return elements.script(); + } + + /** + * Creates a <del> (deleted text) element. + * + * @return A new DelElement. + */ + public static DelElement del() { + return elements.del(); + } + + /** + * Creates an <ins> (inserted text) element. + * + * @return A new InsElement. + */ + public static InsElement ins() { + return elements.ins(); + } + + /** + * Creates a <caption> (table caption) element. + * + * @return A new TableCaptionElement. + */ + public static TableCaptionElement caption() { + return elements.caption(); + } + + /** + * Creates a <col> element. + * + * @return A new ColElement. + */ + public static ColElement col() { + return elements.col(); + } + + /** + * Creates a <colgroup> element. + * + * @return A new ColGroupElement. + */ + public static ColGroupElement colgroup() { + return elements.colgroup(); + } + + /** + * Creates a <table> element. + * + * @return A new TableElement. + */ + public static TableElement table() { + return elements.table(); + } + + /** + * Creates a <tbody> element. + * + * @return A new TBodyElement. + */ + public static TBodyElement tbody() { + return elements.tbody(); + } + + /** + * Creates a <td> (table cell) element. + * + * @return A new TDElement. + */ + public static TDElement td() { + return elements.td(); + } + + /** + * Creates a <tfoot> element. + * + * @return A new TFootElement. + */ + public static TFootElement tfoot() { + return elements.tfoot(); + } + + /** + * Creates a <th> (table header cell) element. + * + * @return A new THElement. + */ + public static THElement th() { + return elements.th(); + } + + /** + * Creates a <thead> element. + * + * @return A new THeadElement. + */ + public static THeadElement thead() { + return elements.thead(); + } + + /** + * Creates a <tr> (table row) element. + * + * @return A new TableRowElement. + */ + public static TableRowElement tr() { + return elements.tr(); + } + + /** + * Creates a <button> element. + * + * @return A new ButtonElement. + */ + public static ButtonElement button() { + return elements.button(); + } + + /** + * Creates a <datalist> element. + * + * @return A new DataListElement. + */ + public static DataListElement datalist() { + return elements.datalist(); + } + + /** + * Creates a <fieldset> element. + * + * @return A new FieldSetElement. + */ + public static FieldSetElement fieldset() { + return elements.fieldset(); + } + + /** + * Creates a <form> element. + * + * @return A new FormElement. + */ + public static FormElement form() { + return elements.form(); + } + + /** + * Creates an <input> element with the specified input type. + * + * @param type The input type (e.g., "text", "checkbox", "radio", etc.). + * @return A new InputElement with the specified input type. + */ + public static InputElement input(InputType type) { + return elements.input(type); + } + + /** + * Creates an <input> element with the specified input type. + * + * @param type The input type (e.g., "text", "checkbox", "radio", etc.). + * @return A new InputElement with the specified input type. + */ + public static InputElement input(String type) { + return elements.input(type); + } + + /** + * Creates a <label> element. + * + * @return A new LabelElement. + */ + public static LabelElement label() { + return elements.label(); + } + + /** + * Creates a <label> element with the specified text. + * + * @param text The text content to set in the label. + * @return A new LabelElement with the specified text content. + */ + public static LabelElement label(String text) { + return elements.label(text); + } + + /** + * Creates a <legend> element. + * + * @return A new LegendElement. + */ + public static LegendElement legend() { + return elements.legend(); + } + + /** + * Creates a <meter> element. + * + * @return A new MeterElement. + */ + public static MeterElement meter() { + return elements.meter(); + } + + /** + * Creates an <optgroup> element. + * + * @return A new OptGroupElement. + */ + public static OptGroupElement optgroup() { + return elements.optgroup(); + } + + /** + * Creates an <option> element. + * + * @return A new OptionElement. + */ + public static OptionElement option() { + return elements.option(); + } + + /** + * Creates an <output> element. + * + * @return A new OutputElement. + */ + public static OutputElement output() { + return elements.output(); + } + + /** + * Creates a <progress> element. + * + * @return A new ProgressElement. + */ + public static ProgressElement progress() { + return elements.progress(); + } + + /** + * Creates a <select> element. + * + * @return A new SelectElement. + */ + public static SelectElement select_() { + return elements.select_(); + } + + /** + * Creates a <textarea> element. + * + * @return A new TextAreaElement. + */ + public static TextAreaElement textarea() { + return elements.textarea(); + } + + /** + * Creates an <svg> element. + * + * @return A new SvgElement. + */ + public static SvgElement svg() { + return elements.svg(); + } + + /** + * Creates an <svg> element. + * + * @param The actual type of the svg element being created + * @param tag The string tag name for the svg element. + * @param type The concrete type for the svg element + * @return A new SvgElement of the specified type. + */ + public static T svg(String tag, Class type) { + return elements.svg(tag, type); + } + + /** + * Creates a <circle> element with the specified attributes. + * + * @param cx The x-coordinate of the center of the circle. + * @param cy The y-coordinate of the center of the circle. + * @param r The radius of the circle. + * @return A new CircleElement with the specified attributes. + */ + public static CircleElement circle(double cx, double cy, double r) { + return elements.circle(cx, cy, r); + } + + /** + * Creates a <line> element with the specified attributes. + * + * @param x1 The x-coordinate of the start point of the line. + * @param y1 The y-coordinate of the start point of the line. + * @param x2 The x-coordinate of the end point of the line. + * @param y2 The y-coordinate of the end point of the line. + * @return A new LineElement with the specified attributes. + */ + public static LineElement line(double x1, double y1, double x2, double y2) { + return elements.line(x1, y1, x2, y2); + } + + /** + * Creates a <text> element. + * + * @return A new Text element. + */ + public static Text text() { + return elements.text(); + } + + /** + * Creates a <text> element with the specified content. + * + * @param content The text content to set in the text element. + * @return A new Text element with the specified content. + */ + public static Text text(String content) { + return elements.text(content); + } + + /** + * Creates an AElement, representing an anchor element in SVG. This element can define a hyperlink + * to a specified location. + * + * @return An instance of AElement. + */ + public static AElement svgA() { + return svgElements.svgA(); + } + + /** + * Creates an AltGlyphDefElement, used in SVG to define alternative glyph definitions. + * + * @return An instance of AltGlyphDefElement. + */ + public static AltGlyphDefElement svgAltGlyphDef() { + return svgElements.svgAltGlyphDef(); + } + + /** + * Creates an AltGlyphElement, which allows for advanced glyph substitution in SVG text. + * + * @return An instance of AltGlyphElement. + */ + public static AltGlyphElement svgAltGlyph() { + return svgElements.svgAltGlyph(); + } + + /** + * Creates an AltGlyphItemElement, part of SVG's advanced text layout features. + * + * @return An instance of AltGlyphItemElement. + */ + public static AltGlyphItemElement svgAltGlyphItem() { + return svgElements.svgAltGlyphItem(); + } + + /** + * Creates an AnimateColorElement for animating color properties in SVG graphics. + * + * @return An instance of AnimateColorElement. + */ + public static AnimateColorElement svgAnimateColor() { + return svgElements.svgAnimateColor(); + } + + /** + * Creates an AnimateElement, used in SVG for general-purpose animation of attributes. + * + * @return An instance of AnimateElement. + */ + public static AnimateElement svgAnimate() { + return svgElements.svgAnimate(); + } + + /** + * Creates an AnimateMotionElement for animating motion of elements in SVG. + * + * @return An instance of AnimateMotionElement. + */ + public static AnimateMotionElement svgAnimateMotion() { + return svgElements.svgAnimateMotion(); + } + + /** + * Creates an AnimateTransformElement for animating transformations in SVG elements. + * + * @return An instance of AnimateTransformElement. + */ + public static AnimateTransformElement svgAnimateTransform() { + return svgElements.svgAnimateTransform(); + } + + /** + * Creates an AnimationElement, used for defining animations in SVG. + * + * @return An instance of AnimationElement. + */ + public static AnimationElement svgAnimation() { + return svgElements.svgAnimation(); + } + + /** + * Creates a CircleElement, representing a circle in SVG. + * + * @return An instance of CircleElement. + */ + public static CircleElement svgCircle() { + return svgElements.svgCircle(); + } + + /** + * Creates a ClipPathElement, used in SVG to define a clipping path. + * + * @return An instance of ClipPathElement. + */ + public static ClipPathElement svgClipPath() { + return svgElements.svgClipPath(); + } + + /** + * Creates a ComponentTransferFunctionElement for component-wise remapping of colors in SVG. + * + * @return An instance of ComponentTransferFunctionElement. + */ + public static ComponentTransferFunctionElement svgComponentTransferFunction() { + return svgElements.svgComponentTransferFunction(); + } + + /** + * Creates a CursorElement, used in SVG to define a custom cursor. + * + * @return An instance of CursorElement. + */ + public static CursorElement svgCursor() { + return svgElements.svgCursor(); + } + + /** + * Creates a DefsElement, used in SVG to define objects for reuse. + * + * @return An instance of DefsElement. + */ + public static DefsElement svgDefs() { + return svgElements.svgDefs(); + } + + /** + * Creates a DescElement, providing a description for an SVG container or element. + * + * @return An instance of DescElement. + */ + public static DescElement svgDesc() { + return svgElements.svgDesc(); + } + + /** + * Creates an EllipseElement, representing an ellipse in SVG. + * + * @return An instance of EllipseElement. + */ + public static EllipseElement svgEllipse() { + return svgElements.svgEllipse(); + } + + /** + * Creates an FEBlendElement for defining blend effects in SVG filters. + * + * @return An instance of FEBlendElement. + */ + public static FEBlendElement svgFeBlend() { + return svgElements.svgFeBlend(); + } + + /** + * Creates an FEColorMatrixElement for applying color matrix effects in SVG filters. + * + * @return An instance of FEColorMatrixElement. + */ + public static FEColorMatrixElement svgFeColorMatrix() { + return svgElements.svgFeColorMatrix(); + } + + /** + * Creates an FEComponentTransferElement for component-wise reassignment of colors in SVG filters. + * + * @return An instance of FEComponentTransferElement. + */ + public static FEComponentTransferElement svgFeComponentTransfer() { + return svgElements.svgFeComponentTransfer(); + } + + /** + * Creates an FECompositeElement, used for compositing operations in SVG filters. + * + * @return An instance of FECompositeElement. + */ + public static FECompositeElement svgFeComposite() { + return svgElements.svgFeComposite(); + } + + /** + * Creates an FEConvolveMatrixElement for applying convolution matrix effects in SVG filters. + * + * @return An instance of FEConvolveMatrixElement. + */ + public static FEConvolveMatrixElement svgFeConvolveMatrix() { + return svgElements.svgFeConvolveMatrix(); + } + + /** + * Creates an FEDiffuseLightingElement for diffuse lighting effects in SVG filters. + * + * @return An instance of FEDiffuseLightingElement. + */ + public static FEDiffuseLightingElement svgFeDiffuseLighting() { + return svgElements.svgFeDiffuseLighting(); + } + + /** + * Creates an FEDisplacementMapElement for displacement mapping in SVG filters. + * + * @return An instance of FEDisplacementMapElement. + */ + public static FEDisplacementMapElement svgFeDisplacementMap() { + return svgElements.svgFeDisplacementMap(); + } + + /** + * Creates an FEDistantLightElement for defining distant light sources in SVG filters. + * + * @return An instance of FEDistantLightElement. + */ + public static FEDistantLightElement svgFeDistantLight() { + return svgElements.svgFeDistantLight(); + } + + /** + * Creates an FEDropShadowElement for drop shadow effects in SVG. + * + * @return An instance of FEDropShadowElement. + */ + public static FEDropShadowElement svgFeDropShadow() { + return svgElements.svgFeDropShadow(); + } + + /** + * Creates an FEFloodElement for flood fill effects in SVG filters. + * + * @return An instance of FEFloodElement. + */ + public static FEFloodElement svgFeFlood() { + return svgElements.svgFeFlood(); + } + + /** + * Creates an FEFuncAElement for manipulating the alpha component of a color in SVG filters. + * + * @return An instance of FEFuncAElement. + */ + public static FEFuncAElement svgFeFuncA() { + return svgElements.svgFeFuncA(); + } + + /** + * Creates an FEFuncBElement for manipulating the blue component of a color in SVG filters. + * + * @return An instance of FEFuncBElement. + */ + public static FEFuncBElement svgFeFuncB() { + return svgElements.svgFeFuncB(); + } + + /** + * Creates an FEFuncGElement for manipulating the green component of a color in SVG filters. + * + * @return An instance of FEFuncGElement. + */ + public static FEFuncGElement svgFeFuncG() { + return svgElements.svgFeFuncG(); + } + + /** + * Creates an FEFuncRElement for manipulating the red component of a color in SVG filters. + * + * @return An instance of FEFuncRElement. + */ + public static FEFuncRElement svgFeFuncR() { + return svgElements.svgFeFuncR(); + } + + /** + * Creates an FEGaussianBlurElement for Gaussian blur effects in SVG filters. + * + * @return An instance of FEGaussianBlurElement. + */ + public static FEGaussianBlurElement svgFeGaussianBlur() { + return svgElements.svgFeGaussianBlur(); + } + + /** + * Creates an FEImageElement for embedding images in SVG filters. + * + * @return An instance of FEImageElement. + */ + public static FEImageElement svgFeImage() { + return svgElements.svgFeImage(); + } + + /** + * Creates an FEMergeElement for merging multiple input filters in SVG. + * + * @return An instance of FEMergeElement. + */ + public static FEMergeElement svgFeMerge() { + return svgElements.svgFeMerge(); + } + + /** + * Creates an FEMergeNodeElement, representing a single input in an FEMergeElement in SVG filters. + * + * @return An instance of FEMergeNodeElement. + */ + public static FEMergeNodeElement svgFeMergeNode() { + return svgElements.svgFeMergeNode(); + } + + /** + * Creates an FEMorphologyElement for applying morphological operations in SVG filters. + * + * @return An instance of FEMorphologyElement. + */ + public static FEMorphologyElement svgFeMorphology() { + return svgElements.svgFeMorphology(); + } + + /** + * Creates an FEOffsetElement for applying offset effects in SVG filters. + * + * @return An instance of FEOffsetElement. + */ + public static FEOffsetElement svgFeOffset() { + return svgElements.svgFeOffset(); + } + + /** + * Creates an FEPointLightElement for defining a point light source in SVG filters. + * + * @return An instance of FEPointLightElement. + */ + public static FEPointLightElement svgFePointLight() { + return svgElements.svgFePointLight(); + } + + /** + * Creates an FESpecularLightingElement for applying specular lighting effects in SVG filters. + * + * @return An instance of FESpecularLightingElement. + */ + public static FESpecularLightingElement svgFeSpecularLighting() { + return svgElements.svgFeSpecularLighting(); + } + + /** + * Creates an FESpotLightElement for defining a spot light source in SVG filters. + * + * @return An instance of FESpotLightElement. + */ + public static FESpotLightElement svgFeSpotLight() { + return svgElements.svgFeSpotLight(); + } + + /** + * Creates an FETileElement for filling a target rectangle with a tiled pattern in SVG filters. + * + * @return An instance of FETileElement. + */ + public static FETileElement svgFeTile() { + return svgElements.svgFeTile(); + } + + /** + * Creates an FETurbulenceElement for creating turbulence effects in SVG filters. + * + * @return An instance of FETurbulenceElement. + */ + public static FETurbulenceElement svgFeTurbulence() { + return svgElements.svgFeTurbulence(); + } + + /** + * Creates a FilterElement, a container for SVG filter primitives. + * + * @return An instance of FilterElement. + */ + public static FilterElement svgFilter() { + return svgElements.svgFilter(); + } + + /** + * Creates a FontElement for defining a font in SVG. + * + * @return An instance of FontElement. + */ + public static FontElement svgFont() { + return svgElements.svgFont(); + } + + /** + * Creates a FontFaceElement for defining font face properties in SVG. + * + * @return An instance of FontFaceElement. + */ + public static FontFaceElement svgFontFace() { + return svgElements.svgFontFace(); + } + + /** + * Creates a FontFaceFormatElement for defining font formats in SVG. + * + * @return An instance of FontFaceFormatElement. + */ + public static FontFaceFormatElement svgFontFaceFormat() { + return svgElements.svgFontFaceFormat(); + } + + /** + * Creates a FontFaceNameElement for defining font names in SVG. + * + * @return An instance of FontFaceNameElement. + */ + public static FontFaceNameElement svgFontFaceName() { + return svgElements.svgFontFaceName(); + } + + /** + * Creates a FontFaceUriElement for defining font URIs in SVG. + * + * @return An instance of FontFaceUriElement. + */ + public static FontFaceUriElement svgFontFaceUri() { + return svgElements.svgFontFaceUri(); + } + + /** + * Creates a ForeignObjectElement for embedding external content in SVG. + * + * @return An instance of ForeignObjectElement. + */ + public static ForeignObjectElement svgForeignObject() { + return svgElements.svgForeignObject(); + } + + /** + * Creates a GElement, a container used to group SVG elements. + * + * @return An instance of GElement. + */ + public static GElement svgG() { + return svgElements.svgG(); + } + + /** + * Creates a GlyphElement for defining glyphs in SVG fonts. + * + * @return An instance of GlyphElement. + */ + public static GlyphElement svgGlyph() { + return svgElements.svgGlyph(); + } + + /** + * Creates a GlyphRefElement for referencing a glyph defined elsewhere in SVG fonts. + * + * @return An instance of GlyphRefElement. + */ + public static GlyphRefElement svgGlyphRef() { + return svgElements.svgGlyphRef(); + } + + /** + * Creates a GradientElement for defining gradients in SVG. + * + * @return An instance of GradientElement. + */ + public static GradientElement svgGradient() { + return svgElements.svgGradient(); + } + + /** + * Creates a GraphicsElement, a base class for SVG graphical elements. + * + * @return An instance of GraphicsElement. + */ + public static GraphicsElement svgGraphics() { + return svgElements.svgGraphics(); + } + + /** + * Creates an HKernElement for defining horizontal kerning in SVG fonts. + * + * @return An instance of HKernElement. + */ + public static HKernElement svgHkern() { + return svgElements.svgHkern(); + } + + /** + * Creates an ImageElement for embedding images in SVG. + * + * @return An instance of ImageElement. + */ + public static org.dominokit.domino.ui.elements.svg.ImageElement svgImage() { + return svgElements.svgImage(); + } + + /** + * Creates a LinearGradientElement for defining linear gradients in SVG. + * + * @return An instance of LinearGradientElement. + */ + public static LinearGradientElement svgLinearGradient() { + return svgElements.svgLinearGradient(); + } + + /** + * Creates a LineElement, representing a line in SVG. + * + * @return An instance of LineElement. + */ + public static LineElement svgLine() { + return svgElements.svgLine(); + } + + /** + * Creates a MarkerElement for defining marker graphics in SVG. + * + * @return An instance of MarkerElement. + */ + public static MarkerElement svgMarker() { + return svgElements.svgMarker(); + } + + /** + * Creates a MaskElement, used for defining an alpha mask in SVG. + * + * @return An instance of MaskElement. + */ + public static MaskElement svgMask() { + return svgElements.svgMask(); + } + + /** + * Creates a MetadataElement for embedding metadata within an SVG document. + * + * @return An instance of MetadataElement. + */ + public static MetadataElement svgMetadata() { + return svgElements.svgMetadata(); + } + + /** + * Creates a MissingGlyphElement for specifying fallback glyphs in SVG fonts. + * + * @return An instance of MissingGlyphElement. + */ + public static MissingGlyphElement svgMissingGlyph() { + return svgElements.svgMissingGlyph(); + } + + /** + * Creates an MPathElement for defining motion paths in SVG animations. + * + * @return An instance of MPathElement. + */ + public static MPathElement svgMpath() { + return svgElements.svgMpath(); + } + + /** + * Creates a PathElement, representing a path in SVG. + * + * @return An instance of PathElement. + */ + public static PathElement svgPath() { + return svgElements.svgPath(); + } + + /** + * Creates a PatternElement for defining patterns used in fill and stroke operations in SVG. + * + * @return An instance of PatternElement. + */ + public static PatternElement svgPattern() { + return svgElements.svgPattern(); + } + + /** + * Creates a PolygonElement, representing a polygon in SVG. + * + * @return An instance of PolygonElement. + */ + public static PolygonElement svgPolygon() { + return svgElements.svgPolygon(); + } + + /** + * Creates a PolyLineElement, representing a polyline in SVG. + * + * @return An instance of PolyLineElement. + */ + public static PolyLineElement svgPolyLine() { + return svgElements.svgPolyLine(); + } + + /** + * Creates a RadialGradientElement for defining radial gradients in SVG. + * + * @return An instance of RadialGradientElement. + */ + public static RadialGradientElement svgRadialGradient() { + return svgElements.svgRadialGradient(); + } + + /** + * Creates a RectElement, representing a rectangle in SVG. + * + * @return An instance of RectElement. + */ + public static RectElement svgRect() { + return svgElements.svgRect(); + } + + /** + * Creates a ScriptElement for embedding scripts in SVG documents. + * + * @return An instance of ScriptElement. + */ + public static org.dominokit.domino.ui.elements.svg.ScriptElement svgScript() { + return svgElements.svgScript(); + } + + /** + * Creates a SetElement for defining discrete animations in SVG. + * + * @return An instance of SetElement. + */ + public static SetElement svgSet() { + return svgElements.svgSet(); + } + + /** + * Creates a StopElement for defining color stops in SVG gradient elements. + * + * @return An instance of StopElement. + */ + public static StopElement svgStop() { + return svgElements.svgStop(); + } + + /** + * Creates a StyleElement for embedding style information in SVG documents. + * + * @return An instance of StyleElement. + */ + public static StyleElement svgStyle() { + return svgElements.svgStyle(); + } + + /** + * Creates a SwitchElement for conditional processing in SVG documents. + * + * @return An instance of SwitchElement. + */ + public static SwitchElement svgSwitch_() { + return svgElements.svgSwitch_(); + } + + /** + * Creates a SymbolElement, used for defining graphical template objects in SVG. + * + * @return An instance of SymbolElement. + */ + public static SymbolElement svgSymbol() { + return svgElements.svgSymbol(); + } + + /** + * Creates a TextContentElement, a base class for elements containing text in SVG. + * + * @return An instance of TextContentElement. + */ + public static TextContentElement svgTextContent() { + return svgElements.svgTextContent(); + } + + /** + * Creates a TextElement, representing text in SVG. + * + * @return An instance of TextElement. + */ + public static TextElement svgText() { + return svgElements.svgText(); + } + + /** + * Creates a TextPathElement for aligning text along a path in SVG. + * + * @return An instance of TextPathElement. + */ + public static TextPathElement svgTextPath() { + return svgElements.svgTextPath(); + } + + /** + * Creates a TextPositioningElement for advanced text positioning in SVG. + * + * @return An instance of TextPositioningElement. + */ + public static TextPositioningElement svgTextPositioning() { + return svgElements.svgTextPositioning(); + } + + /** + * Creates a TitleElement for adding descriptive titles to SVG elements. + * + * @return An instance of TitleElement. + */ + public static TitleElement svgTitle() { + return svgElements.svgTitle(); + } + + /** + * Creates a TRefElement for referencing other text in SVG documents. + * + * @return An instance of TRefElement. + */ + public static TRefElement svgTref() { + return svgElements.svgTref(); + } + + /** + * Creates a TSpanElement for defining text spans in SVG text. + * + * @return An instance of TSpanElement. + */ + public static TSpanElement svgTspan() { + return svgElements.svgTspan(); + } + + /** + * Creates a UseElement for reusing existing SVG elements. + * + * @return An instance of UseElement. + */ + public static UseElement svgUse() { + return svgElements.svgUse(); + } + + /** + * Creates a ViewElement for defining views in SVG. + * + * @return An instance of ViewElement. + */ + public static ViewElement svgView() { + return svgElements.svgView(); + } + + /** + * Creates a VKernElement for defining vertical kerning in SVG fonts. + * + * @return An instance of VKernElement. + */ + public static VKernElement svgVkern() { + return svgElements.svgVkern(); + } +} diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoDocument.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoDocument.java index c3b30028d..7a010fa6a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoDocument.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoDocument.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import elemental2.dom.HTMLDocument; import jsinterop.annotations.JsPackage; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoElement.java index 23d4ac237..6c43d61a8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.*; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoNavigator.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoNavigator.java index e6ef02318..3cdcb9424 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoNavigator.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoNavigator.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Navigator; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoStyleSheet.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoStyleSheet.java index c7df10f5c..f97e28d59 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoStyleSheet.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoStyleSheet.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.utils; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.CSSStyleSheet; import elemental2.dom.DomGlobal; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoWindow.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoWindow.java index b34385d9c..d9116834b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoWindow.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DominoWindow.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.CSSStyleDeclaration; import elemental2.dom.Element; import elemental2.dom.Window; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DynamicStyleSheet.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DynamicStyleSheet.java index 51d1d2545..7d3edf8c8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DynamicStyleSheet.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DynamicStyleSheet.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.utils; import static elemental2.dom.DomGlobal.document; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.CSSStyleSheet; import elemental2.dom.DomGlobal; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementObserver.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementObserver.java index 97050d8fb..ab54a22a3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementObserver.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementObserver.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** An interface for observing changes in an HTML element. */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementUtil.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementUtil.java index 75910c7b9..b8516802d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementUtil.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementUtil.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.utils; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.*; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementsFactory.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementsFactory.java index 8dc1fc085..46cc6fe4d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementsFactory.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementsFactory.java @@ -16,98 +16,14 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; import elemental2.dom.Text; import elemental2.svg.SVGElement; import java.util.Optional; import org.dominokit.domino.ui.IsElement; -import org.dominokit.domino.ui.elements.ABBRElement; -import org.dominokit.domino.ui.elements.AddressElement; -import org.dominokit.domino.ui.elements.AnchorElement; -import org.dominokit.domino.ui.elements.AreaElement; -import org.dominokit.domino.ui.elements.ArticleElement; -import org.dominokit.domino.ui.elements.AsideElement; -import org.dominokit.domino.ui.elements.AudioElement; -import org.dominokit.domino.ui.elements.BElement; -import org.dominokit.domino.ui.elements.BRElement; -import org.dominokit.domino.ui.elements.BlockquoteElement; -import org.dominokit.domino.ui.elements.BodyElement; -import org.dominokit.domino.ui.elements.ButtonElement; -import org.dominokit.domino.ui.elements.CanvasElement; -import org.dominokit.domino.ui.elements.CiteElement; -import org.dominokit.domino.ui.elements.CodeElement; -import org.dominokit.domino.ui.elements.ColElement; -import org.dominokit.domino.ui.elements.ColGroupElement; -import org.dominokit.domino.ui.elements.DDElement; -import org.dominokit.domino.ui.elements.DFNElement; -import org.dominokit.domino.ui.elements.DListElement; -import org.dominokit.domino.ui.elements.DTElement; -import org.dominokit.domino.ui.elements.DataListElement; -import org.dominokit.domino.ui.elements.DelElement; -import org.dominokit.domino.ui.elements.DivElement; -import org.dominokit.domino.ui.elements.EMElement; -import org.dominokit.domino.ui.elements.EmbedElement; -import org.dominokit.domino.ui.elements.FieldSetElement; -import org.dominokit.domino.ui.elements.FigCaptionElement; -import org.dominokit.domino.ui.elements.FigureElement; -import org.dominokit.domino.ui.elements.FooterElement; -import org.dominokit.domino.ui.elements.FormElement; -import org.dominokit.domino.ui.elements.HGroupElement; -import org.dominokit.domino.ui.elements.HRElement; -import org.dominokit.domino.ui.elements.HeaderElement; -import org.dominokit.domino.ui.elements.HeadingElement; -import org.dominokit.domino.ui.elements.IElement; -import org.dominokit.domino.ui.elements.IFrameElement; -import org.dominokit.domino.ui.elements.ImageElement; -import org.dominokit.domino.ui.elements.InputElement; -import org.dominokit.domino.ui.elements.InsElement; -import org.dominokit.domino.ui.elements.KBDElement; -import org.dominokit.domino.ui.elements.LIElement; -import org.dominokit.domino.ui.elements.LabelElement; -import org.dominokit.domino.ui.elements.LegendElement; -import org.dominokit.domino.ui.elements.MainElement; -import org.dominokit.domino.ui.elements.MapElement; -import org.dominokit.domino.ui.elements.MarkElement; -import org.dominokit.domino.ui.elements.MeterElement; -import org.dominokit.domino.ui.elements.NavElement; -import org.dominokit.domino.ui.elements.NoScriptElement; -import org.dominokit.domino.ui.elements.OListElement; -import org.dominokit.domino.ui.elements.ObjectElement; -import org.dominokit.domino.ui.elements.OptGroupElement; -import org.dominokit.domino.ui.elements.OptionElement; -import org.dominokit.domino.ui.elements.OutputElement; -import org.dominokit.domino.ui.elements.ParagraphElement; -import org.dominokit.domino.ui.elements.ParamElement; -import org.dominokit.domino.ui.elements.PictureElement; -import org.dominokit.domino.ui.elements.PreElement; -import org.dominokit.domino.ui.elements.ProgressElement; -import org.dominokit.domino.ui.elements.QuoteElement; -import org.dominokit.domino.ui.elements.ScriptElement; -import org.dominokit.domino.ui.elements.SectionElement; -import org.dominokit.domino.ui.elements.SelectElement; -import org.dominokit.domino.ui.elements.SmallElement; -import org.dominokit.domino.ui.elements.SourceElement; -import org.dominokit.domino.ui.elements.SpanElement; -import org.dominokit.domino.ui.elements.StrongElement; -import org.dominokit.domino.ui.elements.SubElement; -import org.dominokit.domino.ui.elements.SupElement; -import org.dominokit.domino.ui.elements.SvgElement; -import org.dominokit.domino.ui.elements.TBodyElement; -import org.dominokit.domino.ui.elements.TDElement; -import org.dominokit.domino.ui.elements.TFootElement; -import org.dominokit.domino.ui.elements.THElement; -import org.dominokit.domino.ui.elements.THeadElement; -import org.dominokit.domino.ui.elements.TableCaptionElement; -import org.dominokit.domino.ui.elements.TableElement; -import org.dominokit.domino.ui.elements.TableRowElement; -import org.dominokit.domino.ui.elements.TextAreaElement; -import org.dominokit.domino.ui.elements.TimeElement; -import org.dominokit.domino.ui.elements.TrackElement; -import org.dominokit.domino.ui.elements.UElement; -import org.dominokit.domino.ui.elements.UListElement; -import org.dominokit.domino.ui.elements.VarElement; -import org.dominokit.domino.ui.elements.VideoElement; -import org.dominokit.domino.ui.elements.WBRElement; +import org.dominokit.domino.ui.elements.*; import org.dominokit.domino.ui.elements.svg.CircleElement; import org.dominokit.domino.ui.elements.svg.LineElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementsFactoryDelegate.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementsFactoryDelegate.java index ca384fb87..c1aefff31 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementsFactoryDelegate.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ElementsFactoryDelegate.java @@ -21,6 +21,7 @@ import static java.util.Objects.nonNull; import static jsinterop.base.Js.cast; import static org.dominokit.domino.ui.utils.DomElements.dom; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FillerElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FillerElement.java index 3e6089ded..668588869 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FillerElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FillerElement.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; import org.dominokit.domino.ui.elements.SpanElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FollowOnScroll.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FollowOnScroll.java index dd9ff0caa..a66fcce4c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FollowOnScroll.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FollowOnScroll.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.utils; import static elemental2.dom.DomGlobal.document; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FooterContent.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FooterContent.java index 959e2eb5a..3a34bc10b 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FooterContent.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/FooterContent.java @@ -16,6 +16,9 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.elementOf; + import elemental2.dom.Element; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasChildren.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasChildren.java index 36e379d05..cc1740dd3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasChildren.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasChildren.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Node; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasClickableElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasClickableElement.java index 2cf2dc436..9c00a43b8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasClickableElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasClickableElement.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.HTMLElement; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasWavesElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasWavesElement.java index 2c1c595cb..c87fd5c82 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasWavesElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HasWavesElement.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Element; /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HeaderContent.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HeaderContent.java index c7c24eccb..f167bd919 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HeaderContent.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/HeaderContent.java @@ -16,6 +16,9 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.elementOf; + import elemental2.dom.Element; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/KeyboardNavigation.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/KeyboardNavigation.java index 9131c86a1..a60c5e3c9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/KeyboardNavigation.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/KeyboardNavigation.java @@ -18,6 +18,7 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementUtil.isArrowDown; import static org.dominokit.domino.ui.utils.ElementUtil.isArrowUp; import static org.dominokit.domino.ui.utils.ElementUtil.isEnterKey; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/LazyChild.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/LazyChild.java index 48414ebc0..637eabf44 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/LazyChild.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/LazyChild.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PopupsCloser.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PopupsCloser.java index 22422d162..eac01bb62 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PopupsCloser.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PopupsCloser.java @@ -17,6 +17,7 @@ package org.dominokit.domino.ui.utils; import static elemental2.dom.DomGlobal.document; +import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.Element; import elemental2.dom.HTMLElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PostfixAddOn.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PostfixAddOn.java index 746fd43c5..fd3bdab80 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PostfixAddOn.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PostfixAddOn.java @@ -16,6 +16,10 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.dui_postfix_addon; +import static org.dominokit.domino.ui.utils.Domino.elementOf; + import elemental2.dom.Element; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PrefixAddOn.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PrefixAddOn.java index ce41d0631..837a2b979 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PrefixAddOn.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PrefixAddOn.java @@ -16,6 +16,10 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.dui_prefix_addon; +import static org.dominokit.domino.ui.utils.Domino.elementOf; + import elemental2.dom.Element; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PrimaryAddOn.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PrimaryAddOn.java index c67d52932..f4666f259 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PrimaryAddOn.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/PrimaryAddOn.java @@ -16,6 +16,10 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.dui_primary_addon; +import static org.dominokit.domino.ui.utils.Domino.elementOf; + import elemental2.dom.Element; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ResizeObserver.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ResizeObserver.java index e66805660..6f547260d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ResizeObserver.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ResizeObserver.java @@ -16,6 +16,8 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.core.JsArray; import elemental2.dom.Element; import jsinterop.annotations.JsFunction; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ResizeObserverEntry.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ResizeObserverEntry.java index d69fd6d6a..e70ce5ef7 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ResizeObserverEntry.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/ResizeObserverEntry.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.core.JsArray; import elemental2.dom.DOMRect; import elemental2.dom.Element; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SVGFactory.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SVGFactory.java index 9a685d9ae..c5847fec4 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SVGFactory.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SVGFactory.java @@ -15,11 +15,15 @@ */ package org.dominokit.domino.ui.utils; -import elemental2.svg.*; import org.dominokit.domino.ui.elements.svg.*; +/** + * The SVGFactory interface provides methods for creating various SVG elements. This interface + * serves as a centralized factory for creating all types of SVG elements used within the Domino UI + * framework. + */ public interface SVGFactory { - SVGFactory elements = new SVGFactory() {}; + SVGFactory svgElements = new SVGFactory() {}; /** * Provides access to the delegate that implements the SVGFactory interface. @@ -30,339 +34,760 @@ default SVGFactoryDelegate delegate() { return DominoUIConfig.CONFIG.getSVGFactory(); } - default AElement a() { + /** + * Creates an AElement, representing an anchor element in SVG. This element can define a hyperlink + * to a specified location. + * + * @return An instance of AElement. + */ + default AElement svgA() { return delegate().a(); } - default AltGlyphDefElement altGlyphDef() { + /** + * Creates an AltGlyphDefElement, used in SVG to define alternative glyph definitions. + * + * @return An instance of AltGlyphDefElement. + */ + default AltGlyphDefElement svgAltGlyphDef() { return delegate().altGlyphDef(); } - default AltGlyphElement altGlyph() { + /** + * Creates an AltGlyphElement, which allows for advanced glyph substitution in SVG text. + * + * @return An instance of AltGlyphElement. + */ + default AltGlyphElement svgAltGlyph() { return delegate().altGlyph(); } - default AltGlyphItemElement altGlyphItem() { + /** + * Creates an AltGlyphItemElement, part of SVG's advanced text layout features. + * + * @return An instance of AltGlyphItemElement. + */ + default AltGlyphItemElement svgAltGlyphItem() { return delegate().altGlyphItem(); } - default AnimateColorElement animateColor() { + /** + * Creates an AnimateColorElement for animating color properties in SVG graphics. + * + * @return An instance of AnimateColorElement. + */ + default AnimateColorElement svgAnimateColor() { return delegate().animateColor(); } - default AnimateElement animate() { + /** + * Creates an AnimateElement, used in SVG for general-purpose animation of attributes. + * + * @return An instance of AnimateElement. + */ + default AnimateElement svgAnimate() { return delegate().animate(); } - default AnimateMotionElement animateMotion() { + /** + * Creates an AnimateMotionElement for animating motion of elements in SVG. + * + * @return An instance of AnimateMotionElement. + */ + default AnimateMotionElement svgAnimateMotion() { return delegate().animateMotion(); } - default AnimateTransformElement animateTransform() { + /** + * Creates an AnimateTransformElement for animating transformations in SVG elements. + * + * @return An instance of AnimateTransformElement. + */ + default AnimateTransformElement svgAnimateTransform() { return delegate().animateTransform(); } - default AnimationElement animation() { + /** + * Creates an AnimationElement, used for defining animations in SVG. + * + * @return An instance of AnimationElement. + */ + default AnimationElement svgAnimation() { return delegate().animation(); } - default CircleElement circle() { + /** + * Creates a CircleElement, representing a circle in SVG. + * + * @return An instance of CircleElement. + */ + default CircleElement svgCircle() { return delegate().circle(); } - default ClipPathElement clipPath() { + /** + * Creates a ClipPathElement, used in SVG to define a clipping path. + * + * @return An instance of ClipPathElement. + */ + default ClipPathElement svgClipPath() { return delegate().clipPath(); } - default ComponentTransferFunctionElement componentTransferFunction() { + /** + * Creates a ComponentTransferFunctionElement for component-wise remapping of colors in SVG. + * + * @return An instance of ComponentTransferFunctionElement. + */ + default ComponentTransferFunctionElement svgComponentTransferFunction() { return delegate().componentTransferFunction(); } - default CursorElement cursor() { + /** + * Creates a CursorElement, used in SVG to define a custom cursor. + * + * @return An instance of CursorElement. + */ + default CursorElement svgCursor() { return delegate().cursor(); } - default DefsElement defs() { + /** + * Creates a DefsElement, used in SVG to define objects for reuse. + * + * @return An instance of DefsElement. + */ + default DefsElement svgDefs() { return delegate().defs(); } - default DescElement desc() { + /** + * Creates a DescElement, providing a description for an SVG container or element. + * + * @return An instance of DescElement. + */ + default DescElement svgDesc() { return delegate().desc(); } - default EllipseElement ellipse() { + /** + * Creates an EllipseElement, representing an ellipse in SVG. + * + * @return An instance of EllipseElement. + */ + default EllipseElement svgEllipse() { return delegate().ellipse(); } - default FEBlendElement feBlend() { + /** + * Creates an FEBlendElement for defining blend effects in SVG filters. + * + * @return An instance of FEBlendElement. + */ + default FEBlendElement svgFeBlend() { return delegate().feBlend(); } - default FEColorMatrixElement feColorMatrix() { + /** + * Creates an FEColorMatrixElement for applying color matrix effects in SVG filters. + * + * @return An instance of FEColorMatrixElement. + */ + default FEColorMatrixElement svgFeColorMatrix() { return delegate().feColorMatrix(); } - default FEComponentTransferElement feComponentTransfer() { + /** + * Creates an FEComponentTransferElement for component-wise reassignment of colors in SVG filters. + * + * @return An instance of FEComponentTransferElement. + */ + default FEComponentTransferElement svgFeComponentTransfer() { return delegate().feComponentTransfer(); } - default FECompositeElement feComposite() { + /** + * Creates an FECompositeElement, used for compositing operations in SVG filters. + * + * @return An instance of FECompositeElement. + */ + default FECompositeElement svgFeComposite() { return delegate().feComposite(); } - default FEConvolveMatrixElement feConvolveMatrix() { + /** + * Creates an FEConvolveMatrixElement for applying convolution matrix effects in SVG filters. + * + * @return An instance of FEConvolveMatrixElement. + */ + default FEConvolveMatrixElement svgFeConvolveMatrix() { return delegate().feConvolveMatrix(); } - default FEDiffuseLightingElement feDiffuseLighting() { + /** + * Creates an FEDiffuseLightingElement for diffuse lighting effects in SVG filters. + * + * @return An instance of FEDiffuseLightingElement. + */ + default FEDiffuseLightingElement svgFeDiffuseLighting() { return delegate().feDiffuseLighting(); } - default FEDisplacementMapElement feDisplacementMap() { + /** + * Creates an FEDisplacementMapElement for displacement mapping in SVG filters. + * + * @return An instance of FEDisplacementMapElement. + */ + default FEDisplacementMapElement svgFeDisplacementMap() { return delegate().feDisplacementMap(); } - default FEDistantLightElement feDistantLight() { + /** + * Creates an FEDistantLightElement for defining distant light sources in SVG filters. + * + * @return An instance of FEDistantLightElement. + */ + default FEDistantLightElement svgFeDistantLight() { return delegate().feDistantLight(); } - default FEDropShadowElement feDropShadow() { + /** + * Creates an FEDropShadowElement for drop shadow effects in SVG. + * + * @return An instance of FEDropShadowElement. + */ + default FEDropShadowElement svgFeDropShadow() { return delegate().feDropShadow(); } - default FEFloodElement feFlood() { + /** + * Creates an FEFloodElement for flood fill effects in SVG filters. + * + * @return An instance of FEFloodElement. + */ + default FEFloodElement svgFeFlood() { return delegate().feFlood(); } - default FEFuncAElement feFuncA() { + /** + * Creates an FEFuncAElement for manipulating the alpha component of a color in SVG filters. + * + * @return An instance of FEFuncAElement. + */ + default FEFuncAElement svgFeFuncA() { return delegate().feFuncA(); } - default FEFuncBElement feFuncB() { + /** + * Creates an FEFuncBElement for manipulating the blue component of a color in SVG filters. + * + * @return An instance of FEFuncBElement. + */ + default FEFuncBElement svgFeFuncB() { return delegate().feFuncB(); } - default FEFuncGElement feFuncG() { + /** + * Creates an FEFuncGElement for manipulating the green component of a color in SVG filters. + * + * @return An instance of FEFuncGElement. + */ + default FEFuncGElement svgFeFuncG() { return delegate().feFuncG(); } - default FEFuncRElement feFuncR() { + /** + * Creates an FEFuncRElement for manipulating the red component of a color in SVG filters. + * + * @return An instance of FEFuncRElement. + */ + default FEFuncRElement svgFeFuncR() { return delegate().feFuncR(); } - default FEGaussianBlurElement feGaussianBlur() { + /** + * Creates an FEGaussianBlurElement for Gaussian blur effects in SVG filters. + * + * @return An instance of FEGaussianBlurElement. + */ + default FEGaussianBlurElement svgFeGaussianBlur() { return delegate().feGaussianBlur(); } - default FEImageElement feImage() { + /** + * Creates an FEImageElement for embedding images in SVG filters. + * + * @return An instance of FEImageElement. + */ + default FEImageElement svgFeImage() { return delegate().feImage(); } - default FEMergeElement feMerge() { + /** + * Creates an FEMergeElement for merging multiple input filters in SVG. + * + * @return An instance of FEMergeElement. + */ + default FEMergeElement svgFeMerge() { return delegate().feMerge(); } - default FEMergeNodeElement feMergeNode() { + /** + * Creates an FEMergeNodeElement, representing a single input in an FEMergeElement in SVG filters. + * + * @return An instance of FEMergeNodeElement. + */ + default FEMergeNodeElement svgFeMergeNode() { return delegate().feMergeNode(); } - default FEMorphologyElement feMorphology() { + /** + * Creates an FEMorphologyElement for applying morphological operations in SVG filters. + * + * @return An instance of FEMorphologyElement. + */ + default FEMorphologyElement svgFeMorphology() { return delegate().feMorphology(); } - default FEOffsetElement feOffset() { + /** + * Creates an FEOffsetElement for applying offset effects in SVG filters. + * + * @return An instance of FEOffsetElement. + */ + default FEOffsetElement svgFeOffset() { return delegate().feOffset(); } - default FEPointLightElement fePointLight() { + /** + * Creates an FEPointLightElement for defining a point light source in SVG filters. + * + * @return An instance of FEPointLightElement. + */ + default FEPointLightElement svgFePointLight() { return delegate().fePointLight(); } - default FESpecularLightingElement feSpecularLighting() { + /** + * Creates an FESpecularLightingElement for applying specular lighting effects in SVG filters. + * + * @return An instance of FESpecularLightingElement. + */ + default FESpecularLightingElement svgFeSpecularLighting() { return delegate().feSpecularLighting(); } - default FESpotLightElement feSpotLight() { + /** + * Creates an FESpotLightElement for defining a spot light source in SVG filters. + * + * @return An instance of FESpotLightElement. + */ + default FESpotLightElement svgFeSpotLight() { return delegate().feSpotLight(); } - default FETileElement feTile() { + /** + * Creates an FETileElement for filling a target rectangle with a tiled pattern in SVG filters. + * + * @return An instance of FETileElement. + */ + default FETileElement svgFeTile() { return delegate().feTile(); } - default FETurbulenceElement feTurbulence() { + /** + * Creates an FETurbulenceElement for creating turbulence effects in SVG filters. + * + * @return An instance of FETurbulenceElement. + */ + default FETurbulenceElement svgFeTurbulence() { return delegate().feTurbulence(); } - default FilterElement filter() { + /** + * Creates a FilterElement, a container for SVG filter primitives. + * + * @return An instance of FilterElement. + */ + default FilterElement svgFilter() { return delegate().filter(); } - default FontElement font() { + /** + * Creates a FontElement for defining a font in SVG. + * + * @return An instance of FontElement. + */ + default FontElement svgFont() { return delegate().font(); } - default FontFaceElement fontFace() { + /** + * Creates a FontFaceElement for defining font face properties in SVG. + * + * @return An instance of FontFaceElement. + */ + default FontFaceElement svgFontFace() { return delegate().fontFace(); } - default FontFaceFormatElement fontFaceFormat() { + /** + * Creates a FontFaceFormatElement for defining font formats in SVG. + * + * @return An instance of FontFaceFormatElement. + */ + default FontFaceFormatElement svgFontFaceFormat() { return delegate().fontFaceFormat(); } - default FontFaceNameElement fontFaceName() { + /** + * Creates a FontFaceNameElement for defining font names in SVG. + * + * @return An instance of FontFaceNameElement. + */ + default FontFaceNameElement svgFontFaceName() { return delegate().fontFaceName(); } - default FontFaceUriElement fontFaceUri() { + /** + * Creates a FontFaceUriElement for defining font URIs in SVG. + * + * @return An instance of FontFaceUriElement. + */ + default FontFaceUriElement svgFontFaceUri() { return delegate().fontFaceUri(); } - default ForeignObjectElement foreignObject() { + /** + * Creates a ForeignObjectElement for embedding external content in SVG. + * + * @return An instance of ForeignObjectElement. + */ + default ForeignObjectElement svgForeignObject() { return delegate().foreignObject(); } - default GElement g() { + /** + * Creates a GElement, a container used to group SVG elements. + * + * @return An instance of GElement. + */ + default GElement svgG() { return delegate().g(); } - default GlyphElement glyph() { + /** + * Creates a GlyphElement for defining glyphs in SVG fonts. + * + * @return An instance of GlyphElement. + */ + default GlyphElement svgGlyph() { return delegate().glyph(); } - default GlyphRefElement glyphRef() { + /** + * Creates a GlyphRefElement for referencing a glyph defined elsewhere in SVG fonts. + * + * @return An instance of GlyphRefElement. + */ + default GlyphRefElement svgGlyphRef() { return delegate().glyphRef(); } - default GradientElement gradient() { + /** + * Creates a GradientElement for defining gradients in SVG. + * + * @return An instance of GradientElement. + */ + default GradientElement svgGradient() { return delegate().gradient(); } - default GraphicsElement graphics() { + /** + * Creates a GraphicsElement, a base class for SVG graphical elements. + * + * @return An instance of GraphicsElement. + */ + default GraphicsElement svgGraphics() { return delegate().graphics(); } - default HKernElement hkern() { + /** + * Creates an HKernElement for defining horizontal kerning in SVG fonts. + * + * @return An instance of HKernElement. + */ + default HKernElement svgHkern() { return delegate().hkern(); } - default ImageElement image() { + /** + * Creates an ImageElement for embedding images in SVG. + * + * @return An instance of ImageElement. + */ + default ImageElement svgImage() { return delegate().image(); } - default LinearGradientElement linearGradient() { + /** + * Creates a LinearGradientElement for defining linear gradients in SVG. + * + * @return An instance of LinearGradientElement. + */ + default LinearGradientElement svgLinearGradient() { return delegate().linearGradient(); } - default LineElement line() { + /** + * Creates a LineElement, representing a line in SVG. + * + * @return An instance of LineElement. + */ + default LineElement svgLine() { return delegate().line(); } - default MarkerElement marker() { + /** + * Creates a MarkerElement for defining marker graphics in SVG. + * + * @return An instance of MarkerElement. + */ + default MarkerElement svgMarker() { return delegate().marker(); } - default MaskElement mask() { + /** + * Creates a MaskElement, used for defining an alpha mask in SVG. + * + * @return An instance of MaskElement. + */ + default MaskElement svgMask() { return delegate().mask(); } - default MetadataElement metadata() { + /** + * Creates a MetadataElement for embedding metadata within an SVG document. + * + * @return An instance of MetadataElement. + */ + default MetadataElement svgMetadata() { return delegate().metadata(); } - default MissingGlyphElement missingGlyph() { + /** + * Creates a MissingGlyphElement for specifying fallback glyphs in SVG fonts. + * + * @return An instance of MissingGlyphElement. + */ + default MissingGlyphElement svgMissingGlyph() { return delegate().missingGlyph(); } - default MPathElement mpath() { + /** + * Creates an MPathElement for defining motion paths in SVG animations. + * + * @return An instance of MPathElement. + */ + default MPathElement svgMpath() { return delegate().mpath(); } - default PathElement path() { + /** + * Creates a PathElement, representing a path in SVG. + * + * @return An instance of PathElement. + */ + default PathElement svgPath() { return delegate().path(); } - default PatternElement pattern() { + /** + * Creates a PatternElement for defining patterns used in fill and stroke operations in SVG. + * + * @return An instance of PatternElement. + */ + default PatternElement svgPattern() { return delegate().pattern(); } - default PolygonElement polygon() { + /** + * Creates a PolygonElement, representing a polygon in SVG. + * + * @return An instance of PolygonElement. + */ + default PolygonElement svgPolygon() { return delegate().polygon(); } - default PolyLineElement polyLine() { + /** + * Creates a PolyLineElement, representing a polyline in SVG. + * + * @return An instance of PolyLineElement. + */ + default PolyLineElement svgPolyLine() { return delegate().polyLine(); } - default RadialGradientElement radialGradient() { + /** + * Creates a RadialGradientElement for defining radial gradients in SVG. + * + * @return An instance of RadialGradientElement. + */ + default RadialGradientElement svgRadialGradient() { return delegate().radialGradient(); } - default RectElement rect() { + /** + * Creates a RectElement, representing a rectangle in SVG. + * + * @return An instance of RectElement. + */ + default RectElement svgRect() { return delegate().rect(); } - default ScriptElement script() { + /** + * Creates a ScriptElement for embedding scripts in SVG documents. + * + * @return An instance of ScriptElement. + */ + default ScriptElement svgScript() { return delegate().script(); } - default SetElement set() { + /** + * Creates a SetElement for defining discrete animations in SVG. + * + * @return An instance of SetElement. + */ + default SetElement svgSet() { return delegate().set(); } - default StopElement stop() { + /** + * Creates a StopElement for defining color stops in SVG gradient elements. + * + * @return An instance of StopElement. + */ + default StopElement svgStop() { return delegate().stop(); } - default StyleElement style() { + /** + * Creates a StyleElement for embedding style information in SVG documents. + * + * @return An instance of StyleElement. + */ + default StyleElement svgStyle() { return delegate().style(); } - default SwitchElement switch_() { + /** + * Creates a SwitchElement for conditional processing in SVG documents. + * + * @return An instance of SwitchElement. + */ + default SwitchElement svgSwitch_() { return delegate().switch_(); } - default SymbolElement symbol() { + /** + * Creates a SymbolElement, used for defining graphical template objects in SVG. + * + * @return An instance of SymbolElement. + */ + default SymbolElement svgSymbol() { return delegate().symbol(); } - default TextContentElement textContent() { + /** + * Creates a TextContentElement, a base class for elements containing text in SVG. + * + * @return An instance of TextContentElement. + */ + default TextContentElement svgTextContent() { return delegate().textContent(); } - default TextElement text() { + /** + * Creates a TextElement, representing text in SVG. + * + * @return An instance of TextElement. + */ + default TextElement svgText() { return delegate().text(); } - default TextPathElement textPath() { + /** + * Creates a TextPathElement for aligning text along a path in SVG. + * + * @return An instance of TextPathElement. + */ + default TextPathElement svgTextPath() { return delegate().textPath(); } - default TextPositioningElement textPositioning() { + /** + * Creates a TextPositioningElement for advanced text positioning in SVG. + * + * @return An instance of TextPositioningElement. + */ + default TextPositioningElement svgTextPositioning() { return delegate().textPositioning(); } - default TitleElement title() { + /** + * Creates a TitleElement for adding descriptive titles to SVG elements. + * + * @return An instance of TitleElement. + */ + default TitleElement svgTitle() { return delegate().title(); } - default TRefElement tref() { + /** + * Creates a TRefElement for referencing other text in SVG documents. + * + * @return An instance of TRefElement. + */ + default TRefElement svgTref() { return delegate().tref(); } - default TSpanElement tspan() { + /** + * Creates a TSpanElement for defining text spans in SVG text. + * + * @return An instance of TSpanElement. + */ + default TSpanElement svgTspan() { return delegate().tspan(); } - default UseElement use() { + /** + * Creates a UseElement for reusing existing SVG elements. + * + * @return An instance of UseElement. + */ + default UseElement svgUse() { return delegate().use(); } - default ViewElement view() { + /** + * Creates a ViewElement for defining views in SVG. + * + * @return An instance of ViewElement. + */ + default ViewElement svgView() { return delegate().view(); } - default VKernElement vkern() { + /** + * Creates a VKernElement for defining vertical kerning in SVG fonts. + * + * @return An instance of VKernElement. + */ + default VKernElement svgVkern() { return delegate().vkern(); } } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/Separator.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/Separator.java index b3d0a24a9..1f63c5aa7 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/Separator.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/Separator.java @@ -16,6 +16,10 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.dui_separator; +import static org.dominokit.domino.ui.utils.Domino.li; + import elemental2.dom.HTMLLIElement; import org.dominokit.domino.ui.elements.LIElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SubheaderAddon.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SubheaderAddon.java index 9d51318e4..c1f3050f8 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SubheaderAddon.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SubheaderAddon.java @@ -16,6 +16,10 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.Domino.dui_subheader_addon; +import static org.dominokit.domino.ui.utils.Domino.elementOf; + import elemental2.dom.Element; import org.dominokit.domino.ui.IsElement; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SwipeUtil.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SwipeUtil.java index fc0d315d1..f13e432f0 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SwipeUtil.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/SwipeUtil.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; import static org.dominokit.domino.ui.utils.SwipeUtil.SwipeDirection.*; import elemental2.dom.*; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/URL.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/URL.java index 22b1cc9ef..9e23c1839 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/URL.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/URL.java @@ -15,6 +15,8 @@ */ package org.dominokit.domino.ui.utils; +import static org.dominokit.domino.ui.utils.Domino.*; + import elemental2.dom.Blob; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; From d0190e1c06dad0c785f9f77b888b062e7b7962e7 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 15 Nov 2023 19:40:34 +0300 Subject: [PATCH 08/18] fix #881 Wrong position for some DropDirections with body having margins --- .../direction/BottomMiddleDropDirection.java | 54 ++++++++----------- .../menu/direction/TopLeftDropDirection.java | 6 --- .../direction/TopMiddleDropDirection.java | 47 ++++++++-------- 3 files changed, 42 insertions(+), 65 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java index eb5bbf611..8b665939f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java @@ -21,10 +21,7 @@ import static org.dominokit.domino.ui.utils.Unit.px; import elemental2.dom.DOMRect; -import elemental2.dom.DomGlobal; import elemental2.dom.Element; -import elemental2.dom.HTMLElement; -import jsinterop.base.Js; import org.dominokit.domino.ui.style.Style; /** BottomMiddleDropDirection class. */ @@ -42,42 +39,33 @@ public void position(Element source, Element target) { .style .setProperty("top", px.of((targetRect.top + window.pageYOffset) + targetRect.height + 1)); - Style.of(source).style.setProperty("left", "0"); + Style.of(source).style.setProperty("left", targetRect.left + "px"); dui_dd_bottom_middle.apply(source); - DomGlobal.console.info( - "source.offsetLeft : " + Js.uncheckedCast(source).offsetLeft); - DomGlobal.setTimeout( - p0 -> { - DOMRect newRect = source.getBoundingClientRect(); - DOMRect newTargetRect = target.getBoundingClientRect(); + DOMRect newRect = source.getBoundingClientRect(); + DOMRect newTargetRect = target.getBoundingClientRect(); - int innerWidth = window.innerWidth; + int innerWidth = window.innerWidth; - double delta = 0; - double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; - if (availableSpace < (newRect.width / 2)) { - delta = (newRect.width / 2) - availableSpace; - } + double delta = 0; + double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; + if (availableSpace < (newRect.width / 2)) { + delta = (newRect.width / 2) - availableSpace; + } - elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); + elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); - Style.of(source) - .style - .setProperty( - "left", - px.of( - newTargetRect.left - - (newRect.width / 2) - + (newTargetRect.width / 2) - + window.pageXOffset - - delta - - elements.body().element().getBoundingClientRect().left)); - - newRect = source.getBoundingClientRect(); - newTargetRect = target.getBoundingClientRect(); - }, - 0); + Style.of(source) + .style + .setProperty( + "left", + px.of( + newTargetRect.left + - (newRect.width / 2) + + (newTargetRect.width / 2) + + window.pageXOffset + - delta + - elements.body().element().getBoundingClientRect().left)); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java index b52c01f97..0bc1f9963 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java @@ -22,8 +22,6 @@ import elemental2.dom.DOMRect; import elemental2.dom.Element; -import elemental2.dom.HTMLElement; -import jsinterop.base.Js; import org.dominokit.domino.ui.style.Style; /** TopLeftDropDirection class. */ @@ -40,10 +38,6 @@ public void position(Element source, Element target) { if (availableSpace < sourceRect.width) { delta = sourceRect.width - availableSpace; } - double baseLeft = targetRect.left; - if (target instanceof HTMLElement) { - baseLeft = Math.min(targetRect.left, Js.uncheckedCast(target).offsetLeft); - } Style.of(source) .style diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java index 65fc56565..a972aa44a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java @@ -21,7 +21,6 @@ import static org.dominokit.domino.ui.utils.Unit.px; import elemental2.dom.DOMRect; -import elemental2.dom.DomGlobal; import elemental2.dom.Element; import org.dominokit.domino.ui.style.Style; @@ -41,35 +40,31 @@ public void position(Element source, Element target) { .style .setProperty("top", px.of((targetRect.top + window.pageYOffset) - sourceRect.height - 1)); - Style.of(source).style.setProperty("left", "0"); + Style.of(source).style.setProperty("left", px.of(targetRect.left)); dui_dd_top_middle.apply(source); - DomGlobal.setTimeout( - p0 -> { - int innerWidth = window.innerWidth; - DOMRect newRect = source.getBoundingClientRect(); - DOMRect newTargetRect = target.getBoundingClientRect(); + int innerWidth = window.innerWidth; + DOMRect newRect = source.getBoundingClientRect(); + DOMRect newTargetRect = target.getBoundingClientRect(); - double delta = 0; - double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; - if (availableSpace < (newRect.width / 2)) { - delta = (newRect.width / 2) - availableSpace; - } - elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); + double delta = 0; + double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; + if (availableSpace < (newRect.width / 2)) { + delta = (newRect.width / 2) - availableSpace; + } + elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); - Style.of(source) - .style - .setProperty( - "left", - px.of( - newTargetRect.left - - (newRect.width / 2) - + (newTargetRect.width / 2) - + window.pageXOffset - - delta - - elements.body().element().getBoundingClientRect().left)); - }, - 0); + Style.of(source) + .style + .setProperty( + "left", + px.of( + newTargetRect.left + - (newRect.width / 2) + + (newTargetRect.width / 2) + + window.pageXOffset + - delta + - elements.body().element().getBoundingClientRect().left)); } /** {@inheritDoc} */ From 824dfce8aded79a3ae056be46ff5a02649236163 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Thu, 16 Nov 2023 19:23:08 +0300 Subject: [PATCH 09/18] fix #885 Add the ability to insert a menu item(s) in a specific index --- .../ui/forms/suggest/AbstractSelect.java | 119 +++++++++++++++++- .../org/dominokit/domino/ui/menu/Menu.java | 115 ++++++++++++++++- 2 files changed, 231 insertions(+), 3 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java index fa4e98cfd..a26452065 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java @@ -231,6 +231,20 @@ public C appendChild(O option) { return (C) this; } + /** + * Insert the specified option in the specified index. + * + * @param index The desired location index. + * @param option The option to be added to the select. + * @return an instance of the concrete class. + */ + public C insertChild(int index, O option) { + if (nonNull(option)) { + optionsMenu.insertChild(index, option.getMenuItem()); + } + return (C) this; + } + /** * Appends a collection of options to the select. * @@ -244,6 +258,25 @@ public C appendOptions(Collection options) { return (C) this; } + /** + * Insert a collection of options starting from the provided index. + * + * @param index The insert starting index + * @param options The collection of options to be added to the select. + * @return an instance of the concrete class. + */ + public C insertOptions(int index, Collection options) { + if (nonNull(options)) { + int[] i = new int[] {index}; + options.forEach( + o -> { + insertChild(i[0], o); + i[0] = i[0]++; + }); + } + return (C) this; + } + /** * Appends a series of options to the select. * @@ -257,6 +290,20 @@ public C appendOptions(O... options) { return (C) this; } + /** + * Insert a series of options to the select at the provided index. + * + * @param index The starting insert index. + * @param options The options to be added to the select. + * @return an instance of the concrete class. + */ + public C insertOptions(int index, O... options) { + if (nonNull(options)) { + insertOptions(index, Arrays.asList(options)); + } + return (C) this; + } + /** * Maps the specified item using the provided mapper function and appends it as an option to the * select. @@ -269,6 +316,18 @@ public C appendItem(Function mapper, I item) { return appendChild(mapper.apply(item)); } + /** + * Maps the specified item using the provided mapper function and insert it at the provided index + * + * @param index The index + * @param mapper The function to map the item to an option. + * @param item The item to be mapped and added as an option to the select. + * @return an instance of the concrete class. + */ + public C insertItem(int index, Function mapper, I item) { + return insertChild(index, mapper.apply(item)); + } + /** * Maps each item in the provided collection using the given mapper function and appends them as * options to the select. @@ -282,6 +341,25 @@ public C appendItems(Function mapper, Collection items) { return (C) this; } + /** + * Maps each item in the provided collection using the given mapper function and insert them + * starting from the provided index. + * + * @param index The starting insert index. + * @param mapper The function to map each item to an option. + * @param items The collection of items to be mapped and added as options to the select. + * @return an instance of the concrete class. + */ + public C insertItems(int index, Function mapper, Collection items) { + int[] i = new int[] {index}; + items.forEach( + item -> { + insertItem(i[0], mapper, item); + i[0] = i[0]++; + }); + return (C) this; + } + /** * Maps each item in the provided series using the given mapper function and appends them as * options to the select. @@ -295,6 +373,20 @@ public C appendItems(Function mapper, I... items) { return (C) this; } + /** + * Maps each item in the provided series using the given mapper function and insert them starting + * from the provided index. + * + * @param index insert starting index. + * @param mapper The function to map each item to an option. + * @param items The items to be mapped and added as options to the select. + * @return an instance of the concrete class. + */ + public C insertItems(int index, Function mapper, I... items) { + insertItems(index, mapper, Arrays.asList(items)); + return (C) this; + } + /** * Appends the specified separator to the select. * @@ -306,6 +398,18 @@ public C appendChild(Separator separator) { return (C) this; } + /** + * insert the specified separator to the select at the provided index. + * + * @param index the insert index. + * @param separator The separator to be added between options in the select. + * @return an instance of the concrete class. + */ + public C insertChild(int index, Separator separator) { + optionsMenu.insertChild(index, separator); + return (C) this; + } + /** * Retrieves the current placeholder text from the select. * @@ -1001,7 +1105,9 @@ public C withOptionsMenu(ChildHandler> handler) { public C setMissingItemHandler(MissingOptionHandler missingOptionHandler) { if (nonNull(missingOptionHandler)) { optionsMenu.setMissingItemHandler( - (token, menu) -> missingOptionHandler.onMissingItem((C) this, token, menu::appendChild)); + (token, menu) -> + missingOptionHandler.onMissingItem( + (C) this, token, option -> appendChild((O) option))); } else { optionsMenu.setMissingItemHandler(null); } @@ -1029,6 +1135,17 @@ public C removeOption(O option) { return (C) this; } + /** + * Removes a specified option from the select component. + * + * @param index the index of the option to be removed. + * @return an instance of the concrete class. + */ + public C removeOptionAt(int index) { + AbstractMenuItem menuItem = optionsMenu.getMenuItems().get(index); + return removeOption(OptionMeta.get(menuItem).get().getOption()); + } + /** * Removes a collection of options from the select component. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java index 0f072fdae..da0e03ade 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java @@ -412,12 +412,47 @@ public Menu appendChild(AbstractMenuItem menuItem) { if (nonNull(menuItem)) { menuItemsList.appendChild(menuItem); menuItems.add(menuItem); - menuItem.setParent(this); - onItemAdded(menuItem); + afterAddItem(menuItem); } return this; } + /** + * Inserts a menu item to the menu at the specified index, the index should be within the valid + * range otherwise an exception is thrown. + * + * @param index The index to insert the menu item at. + * @param menuItem The menu item to be added. + * @return The current Menu instance. + */ + public Menu insertChild(int index, AbstractMenuItem menuItem) { + if (nonNull(menuItem)) { + if (index < 0 || (index > 0 && index >= menuItemsList.getChildElementCount())) { + throw new IndexOutOfBoundsException( + "Could not insert menu item at index [" + + index + + "], index out of range [0," + + (menuItemsList.getChildElementCount() - 1) + + "]"); + } + if (menuItemsList.getChildElementCount() > 0) { + DominoElement elementDominoElement = menuItemsList.childElements().get(index); + menuItemsList.insertBefore(menuItem, elementDominoElement); + menuItems.add(index, menuItem); + } else { + menuItemsList.appendChild(menuItem); + menuItems.add(menuItem); + } + afterAddItem(menuItem); + } + return this; + } + + private void afterAddItem(AbstractMenuItem menuItem) { + menuItem.setParent(this); + onItemAdded(menuItem); + } + void onItemAdded(AbstractMenuItem menuItem) { onAddItemHandlers.forEach(handler -> handler.onAdded(this, menuItem)); } @@ -441,6 +476,42 @@ public > Menu appendGroup( return this; } + /** + * Inserts a menu items group to the menu at the specified index, the index should be within the + * valid range otherwise an exception is thrown. + * + * @param index The index to insert the menu items group at. + * @param The type of the abstract menu item. + * @param menuGroup The menu items group to be added. + * @param groupHandler The handler for the menu items group. + * @return The current Menu instance. + */ + public > Menu insertGroup( + int index, MenuItemsGroup menuGroup, MenuItemsGroupHandler groupHandler) { + if (nonNull(menuGroup)) { + + if (index < 0 || (index > 0 && index >= menuItemsList.getChildElementCount())) { + throw new IndexOutOfBoundsException( + "Could not insert menu item at index [" + + index + + "], index out of range [0," + + (menuItemsList.getChildElementCount() - 1) + + "]"); + } + if (menuItemsList.getChildElementCount() > 0) { + DominoElement elementDominoElement = menuItemsList.childElements().get(index); + menuItemsList.insertBefore(menuGroup, elementDominoElement); + menuItems.add(index, menuGroup); + } else { + menuItemsList.appendChild(menuGroup); + menuItems.add(menuGroup); + } + menuGroup.setParent(this); + groupHandler.handle(menuGroup); + } + return this; + } + /** * Removes a menu item from the menu. * @@ -455,6 +526,16 @@ public Menu removeItem(AbstractMenuItem menuItem) { return this; } + /** + * Removes a menu item from the menu at the specified index. + * + * @param index the index of the menu item to be removed. + * @return The current Menu instance. + */ + public Menu removeItemAt(int index) { + return removeItem(menuItems.get(index)); + } + /** * Removes all items and sub-items from the menu. * @@ -479,6 +560,36 @@ public Menu appendChild(Separator separator) { return this; } + /** + * Inserts a separator to the menu at the specified index, the index should be within the valid + * range otherwise an exception is thrown. + * + * @param index The index to insert the separator at. + * @param separator The separator to be added. + * @return The current Menu instance. + */ + public Menu insertChild(int index, Separator separator) { + if (nonNull(separator)) { + if (index < 0 || (index > 0 && index >= menuItemsList.getChildElementCount())) { + throw new IndexOutOfBoundsException( + "Could not insert menu item at index [" + + index + + "], index out of range [0," + + (menuItemsList.getChildElementCount() - 1) + + "]"); + } + + if (menuItemsList.getChildElementCount() > 0) { + DominoElement elementDominoElement = menuItemsList.childElements().get(index); + menuItemsList.insertBefore(separator, elementDominoElement); + } else { + this.menuItemsList.appendChild(separator.addCss(dui_menu_separator)); + } + } + + return this; + } + /** * {@inheritDoc} * From 47f0727ba9ff1f4e422c9b7cd062b2247a3e709a Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Tue, 28 Nov 2023 17:36:01 +0300 Subject: [PATCH 10/18] fix #887 setHeaderTextAlignment is not respected on empty DataTable --- domino-ui/pom.xml | 4 ++++ .../domino/ui/datatable/ColumnConfig.java | 4 ++++ .../domino/ui/datatable/TableConfig.java | 24 +++++++++++++++++++ .../domino/ui/datatable/TableRow.java | 18 ++++++++++++-- domino-ui/src/main/module.gwt.xml | 1 + .../dui-components/domino-ui-forms.css | 6 ++++- pom.xml | 14 ++++++++++- 7 files changed, 67 insertions(+), 4 deletions(-) diff --git a/domino-ui/pom.xml b/domino-ui/pom.xml index 655e1d89b..ef01cc082 100644 --- a/domino-ui/pom.xml +++ b/domino-ui/pom.xml @@ -18,6 +18,10 @@ domino-ui-shared ${project.version} + + org.dominokit + gwt-validation-api + org.gwtproject.core gwt-core diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnConfig.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnConfig.java index 00aa0e311..490b9116c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnConfig.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/ColumnConfig.java @@ -1008,6 +1008,10 @@ private ColumnHeader createColumnElement(TableConfig tableConfig) { this.headElement.addCss("dui-column-group"); } + if (nonNull(getHeaderTextAlign())) { + this.headElement.addCss(getHeaderTextAlign()); + } + ColumnCssRuleMeta.get(this) .ifPresent( meta -> diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableConfig.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableConfig.java index d44b1bbe5..f679f5871 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableConfig.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableConfig.java @@ -16,10 +16,12 @@ package org.dominokit.domino.ui.datatable; +import static java.util.Objects.isNull; import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import java.util.*; +import java.util.function.Consumer; import java.util.stream.Collectors; import org.dominokit.domino.ui.datatable.plugins.DataTablePlugin; import org.dominokit.domino.ui.datatable.plugins.column.ResizeColumnMeta; @@ -65,6 +67,8 @@ public class TableConfig private String maxWidth; private String minWidth; + private Consumer> onRowEditHandler = (tableRow) -> {}; + private final ColumnConfig pluginUtilityColumn = ColumnConfig.create("plugin-utility-column") .setShowTooltip(false) @@ -558,6 +562,26 @@ SaveDirtyRecordHandler getSaveDirtyRecordHandler() { return saveDirtyRecordHandler; } + /** + * Use this to set a handler that will be called when ever a row is being edited. + * + * @param handler The handler to be called. + * @return same TableConfig instance. + */ + public TableConfig setOnRowEditHandler(Consumer> handler) { + if (isNull(handler)) { + this.onRowEditHandler = tableRow -> {}; + } else { + this.onRowEditHandler = handler; + } + return this; + } + + /** @return the handler to be called when a row is being edited. */ + Consumer> getOnRowEditHandler() { + return onRowEditHandler; + } + /** A functional interface defining the behavior for appending rows. */ @FunctionalInterface public interface RowAppender { diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableRow.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableRow.java index 67f2b130d..c002422f9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableRow.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/TableRow.java @@ -24,10 +24,10 @@ import java.util.*; import org.dominokit.domino.ui.datatable.events.RowRecordUpdatedEvent; import org.dominokit.domino.ui.datatable.events.TableDataUpdatedEvent; +import org.dominokit.domino.ui.forms.FieldsGrouping; import org.dominokit.domino.ui.forms.validations.ValidationResult; import org.dominokit.domino.ui.style.BooleanCssClass; import org.dominokit.domino.ui.utils.BaseDominoElement; -import org.dominokit.domino.ui.utils.HasSelectionHandler.SelectionHandler; import org.dominokit.domino.ui.utils.HasSelectionListeners; import org.dominokit.domino.ui.utils.Selectable; @@ -51,7 +51,6 @@ public class TableRow extends BaseDominoElement flags = new HashMap<>(); private HTMLTableRowElement element = tr().element(); - private List> selectionHandlers = new ArrayList<>(); private List> listeners = new ArrayList<>(); private boolean editable = false; @@ -65,6 +64,8 @@ public class TableRow extends BaseDominoElement(); private boolean selectable; + private FieldsGrouping rowFieldsGroup = FieldsGrouping.create(); + /** * Constructs a table row with the given record, index, and parent table. * @@ -567,7 +568,9 @@ public interface RowListener { */ public void edit() { setEditable(true); + this.rowFieldsGroup.removeAllFormElements(); updateRow(); + this.dataTable.getTableConfig().getOnRowEditHandler().accept(this); } /** @@ -583,6 +586,7 @@ public void save() { .saveDirtyRecord(record, getDirtyRecord()); this.setEditable(false); updateRow(); + rowFieldsGroup.removeAllFormElements(); } } @@ -593,6 +597,7 @@ public void save() { public void cancelEditing() { this.setEditable(false); updateRow(); + rowFieldsGroup.removeAllFormElements(); } /** @@ -711,6 +716,15 @@ public boolean isRoot() { return isNull(parent); } + /** + * Use this field grouping to group the row fields when it is in edit mode. + * + * @return The default fields group for this row. + */ + public FieldsGrouping getRowFieldsGroup() { + return rowFieldsGroup; + } + /** * Represents a function to render a TableRow. * diff --git a/domino-ui/src/main/module.gwt.xml b/domino-ui/src/main/module.gwt.xml index 86281a42e..bd4d14e35 100644 --- a/domino-ui/src/main/module.gwt.xml +++ b/domino-ui/src/main/module.gwt.xml @@ -26,6 +26,7 @@ + diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css index f7d37fd01..a7d48951b 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css @@ -256,7 +256,11 @@ fieldset.dui { min-height: var(--dui-form-field-fixed-messages-height); } -.dui-form-field:not(.dui-form-messages-fixed) .dui-field-messages-wrapper:empty { +.dui-form-messages-fixed .dui-field-messages-wrapper:empty{ + display: flex; +} + +.dui-field-messages-wrapper:empty { display: none; } diff --git a/pom.xml b/pom.xml index 3f49dcbf4..e2f4b916f 100644 --- a/pom.xml +++ b/pom.xml @@ -85,9 +85,10 @@ UTF-8 1.2.1 2.10.0 - 1.0.1 + 1.0.3 1.0.1 1.0.0 + 1.0.1 @@ -97,6 +98,17 @@ org.gwtproject.editor gwt-editor 1.0.0-RC1 + + + javax.validation + validation-api + + + + + org.dominokit + gwt-validation-api + ${gwt.validation.api.version} org.gwtproject.core From c92a2b3c134436bbcc0a35a7a29328211c820f86 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 29 Nov 2023 09:14:53 +0300 Subject: [PATCH 11/18] fix #893 Allow moving carousel slides programatically --- .../domino/ui/carousel/Carousel.java | 108 +++++++++++++----- 1 file changed, 77 insertions(+), 31 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Carousel.java b/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Carousel.java index 2590a2e2e..470b24dc1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Carousel.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/carousel/Carousel.java @@ -40,10 +40,6 @@ * @see BaseDominoElement */ public class Carousel extends BaseDominoElement { - /** Constant NEXT="next" */ - public static final String NEXT = "next"; - /** CSS class for previous indicator */ - public static final String PREV = "prev"; private final OListElement indicatorsElement; private final DivElement slidesElement; @@ -62,6 +58,15 @@ public class Carousel extends BaseDominoElement { private int autoSlideDuration = 3000; private boolean attached = false; + /** + * Factory method to create an empty Carousel + * + * @return new instance + */ + public static Carousel create() { + return new Carousel(); + } + /** Creates and empty Carousel */ public Carousel() { @@ -76,12 +81,7 @@ public Carousel() { .appendChild( Icons.chevron_left() .addCss(GenericCss.dui_vertical_center, dui_font_size_12)) - .addEventListener( - "click", - evt -> { - resetTimer(); - prevSlide(); - })) + .addEventListener("click", evt -> previous())) .appendChild( nextElement = a().addCss(slide_right, carousel_control) @@ -92,8 +92,7 @@ public Carousel() { .addEventListener( "click", evt -> { - resetTimer(); - nextSlide(); + next(); })) .addCss(carousel); timer = @@ -108,6 +107,52 @@ public void run() { init(this); } + /** + * Programmatically move to the next slide and reset the slide timer + * + * @return Same Carousel instance + */ + public Carousel next() { + resetTimer(); + nextSlide(); + return this; + } + + /** + * Programmatically move to the previous slide and reset the slide timer + * + * @return Same Carousel instance + */ + public Carousel previous() { + resetTimer(); + prevSlide(); + return this; + } + + /** + * Programmatically move to the specified slide sliding to the provided direction and reset the + * slide timer + * + * @return Same Carousel instance + */ + public Carousel gotToSlide(Slide slide, SlideDirection direction) { + resetTimer(); + goToSlide(slide, direction); + return this; + } + + /** + * Programmatically move to the slide of the specified index sliding to the provided direction and + * reset the slide timer + * + * @return Same Carousel instance + */ + public Carousel gotToSlide(int index, SlideDirection direction) { + resetTimer(); + goToSlide(slides.get(index), direction); + return this; + } + private void resetTimer() { if (autoSlide) { timer.cancel(); @@ -137,15 +182,6 @@ private void addAttachListener() { }); } - /** - * Factory method to create an empty Carousel - * - * @return new instance - */ - public static Carousel create() { - return new Carousel(); - } - /** * Adds new {@link org.dominokit.domino.ui.carousel.Slide} to this Carousel * @@ -161,7 +197,7 @@ public Carousel appendChild(Slide slide) { "click", evt -> { resetTimer(); - goToSlide(slide, ""); + goToSlide(slide, SlideDirection.NONE); }); slide.element().addEventListener("webkitTransitionEnd", evt -> removeMotionStyles()); @@ -189,7 +225,7 @@ private void nextSlide() { nextSlide = slides.get(0); } - goToSlide(nextSlide, NEXT); + goToSlide(nextSlide, SlideDirection.NEXT); } private void prevSlide() { @@ -200,10 +236,10 @@ private void prevSlide() { prevSlide = slides.get(slides.size() - 1); } - goToSlide(prevSlide, PREV); + goToSlide(prevSlide, SlideDirection.PREV); } - private void goToSlide(Slide slide, String source) { + private void goToSlide(Slide slide, SlideDirection source) { if (!slide.isActive()) { this.targetSlide = slide; slide.getIndicatorElement().addCss(dui_active); @@ -222,18 +258,20 @@ private void goToSlide(Slide slide, String source) { } } - private CssClass getPositionStyle(Slide target, String source) { - if ((slides.indexOf(target) > slides.indexOf(activeSlide) && !PREV.equals(source)) - || (NEXT.equals(source))) { + private CssClass getPositionStyle(Slide target, SlideDirection source) { + if ((slides.indexOf(target) > slides.indexOf(activeSlide) + && !SlideDirection.PREV.equals(source)) + || (SlideDirection.NEXT.equals(source))) { return slide_next; } else { return slide_prev; } } - private CssClass getDirectionStyle(Slide target, String source) { - if ((slides.indexOf(target) > slides.indexOf(activeSlide) && !PREV.equals(source)) - || (NEXT.equals(source))) { + private CssClass getDirectionStyle(Slide target, SlideDirection source) { + if ((slides.indexOf(target) > slides.indexOf(activeSlide) + && !SlideDirection.PREV.equals(source)) + || (SlideDirection.NEXT.equals(source))) { return slide_left; } else { return slide_right; @@ -367,4 +405,12 @@ public List getSlides() { public Slide getActiveSlide() { return activeSlide; } + + public enum SlideDirection { + NONE, + /** CSS class for previous indicator */ + PREV, + /** Constant NEXT="next" */ + NEXT + } } From e9540d6883e0eb8ccc03b07ab9cd5addc6b67329 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Thu, 30 Nov 2023 11:48:48 +0300 Subject: [PATCH 12/18] fix #886 Select component improvements --- .../domino/ui/elements/InputElement.java | 16 +++ .../domino/ui/forms/FormsStyles.java | 2 + .../ui/forms/suggest/AbstractSelect.java | 71 ++++++++++- .../domino/ui/keyboard/AcceptKeyEvents.java | 36 +++++- .../ui/keyboard/KeyEventHandlerContext.java | 23 +++- .../ui/keyboard/KeyboardKeyListener.java | 47 ++++++- .../domino/ui/menu/AbstractMenuItem.java | 26 ++++ .../domino/ui/menu/CustomMenuItem.java | 8 +- .../org/dominokit/domino/ui/menu/Menu.java | 115 +++++++++++++++--- .../dominokit/domino/ui/menu/MenuItem.java | 22 +++- .../dominokit/domino/ui/menu/MenuStyles.java | 1 + .../dominokit/domino/ui/search/SearchBox.java | 9 +- .../domino/ui/utils/DelayedTextInput.java | 15 ++- .../domino/ui/utils/KeyboardNavigation.java | 53 +++++++- .../dui-components/domino-ui-forms.css | 23 ++++ .../dui-components/domino-ui-menu.css | 25 ++-- 16 files changed, 444 insertions(+), 48 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InputElement.java b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InputElement.java index 27f94ea9f..400b5dce5 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InputElement.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/elements/InputElement.java @@ -86,4 +86,20 @@ public InputElement setName(String name) { element.element().name = name; return this; } + + /** @return The String value of the input element */ + public String getValue() { + return element.element().value; + } + + /** + * Set the value for this input element. + * + * @param value String value + * @return Same InputElement instance + */ + public InputElement setValue(String value) { + element.element().value = value; + return this; + } } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FormsStyles.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FormsStyles.java index 5a95964cb..876c06102 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FormsStyles.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/FormsStyles.java @@ -83,6 +83,8 @@ public interface FormsStyles { /** CSS class for a hidden input element within a form field. */ CssClass dui_hidden_input = () -> "dui-field-input-hidden"; + CssClass dui_auto_type_input = () -> "dui-auto-type-input"; + /** CSS class for a form switch component. */ CssClass dui_switch = () -> "dui-form-switch"; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java index a26452065..9ed020c2a 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java @@ -20,8 +20,10 @@ import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.DomGlobal; +import elemental2.dom.Event; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLInputElement; +import elemental2.dom.KeyboardEvent; import java.util.*; import java.util.function.Consumer; import java.util.function.Function; @@ -29,6 +31,7 @@ import jsinterop.base.Js; import org.dominokit.domino.ui.IsElement; import org.dominokit.domino.ui.elements.DivElement; +import org.dominokit.domino.ui.elements.InputElement; import org.dominokit.domino.ui.elements.SpanElement; import org.dominokit.domino.ui.forms.AbstractFormElement; import org.dominokit.domino.ui.forms.AutoValidator; @@ -75,7 +78,8 @@ public abstract class AbstractSelect< protected Menu optionsMenu; protected DivElement fieldInput; private SpanElement placeHolderElement; - private DominoElement inputElement; + private InputElement inputElement; + private InputElement typingElement; /** * Default constructor which initializes the underlying structures, sets up event listeners, and @@ -85,12 +89,58 @@ public AbstractSelect() { placeHolderElement = span(); addCss(dui_form_select); wrapperElement + .addCss(dui_relative) .appendChild( fieldInput = div() .addCss(dui_field_input) .appendChild(placeHolderElement.addCss(dui_field_placeholder))) - .appendChild(inputElement = input(getType()).addCss(dui_hidden_input).toDominoElement()); + .appendChild(inputElement = input(getType()).addCss(dui_hidden_input)) + .appendChild( + typingElement = + input("text") + .addCss(dui_auto_type_input, dui_hidden) + .setTabIndex(-1) + .onKeyPress(keyEvents -> keyEvents.alphanumeric(Event::stopPropagation))); + + DelayedTextInput.create(typingElement, 1000) + .setDelayedAction( + () -> { + optionsMenu + .findOptionStarsWith(typingElement.getValue()) + .flatMap(OptionMeta::get) + .ifPresent( + meta -> onOptionSelected((O) meta.getOption(), isChangeListenersPaused())); + optionsMenu.focusFirstMatch(typingElement.getValue()); + typingElement.setValue(null).addCss(dui_hidden); + focus(); + }) + .setOnEnterAction( + () -> { + openOptionMenu(false); + String token = typingElement.getValue(); + typingElement.setValue(null).addCss(dui_hidden); + DomGlobal.setTimeout(p0 -> optionsMenu.focusFirstMatch(token), 0); + }); + + onKeyPress( + keyEvents -> { + keyEvents.alphanumeric( + evt -> { + KeyboardEvent keyboardEvent = Js.uncheckedCast(evt); + keyboardEvent.stopPropagation(); + keyboardEvent.preventDefault(); + String key = keyboardEvent.key; + if (nonNull(key) + && !optionsMenu.isOpened() + && (isNull(typingElement.getValue()) || typingElement.getValue().isEmpty())) { + typingElement.removeCss(dui_hidden); + typingElement.element().value = key; + typingElement.element().focus(); + } + }); + }); + labelForId(inputElement.getDominoId()); optionsMenu = @@ -123,7 +173,8 @@ public AbstractSelect() { getInputElement() .onKeyDown( keyEvents -> - keyEvents.onEnter(evt -> openOptionMenu()).onSpace(evt -> openOptionMenu())); + keyEvents.onEnter(evt -> openOptionMenu()).onSpace(evt -> openOptionMenu())) + .onKeyUp(keyEvents -> keyEvents.onArrowDown(evt -> openOptionMenu())); appendChild( PrimaryAddOn.of( @@ -163,13 +214,23 @@ public AbstractSelect() { * disabled. */ private void openOptionMenu() { + openOptionMenu(true); + } + + /** + * Opens the options menu allowing user to select an option, unless the select is read-only or + * disabled. + * + * @param focus a flag to decide if the menu should be focused on first element or not. + */ + private void openOptionMenu(boolean focus) { if (isReadOnly() || isDisabled()) { return; } if (optionsMenu.isOpened() && !optionsMenu.isContextMenu()) { optionsMenu.close(); } else { - optionsMenu.open(true); + optionsMenu.open(focus); } } @@ -439,7 +500,7 @@ public C setPlaceholder(String placeholder) { */ @Override public DominoElement getInputElement() { - return inputElement; + return inputElement.toDominoElement(); } /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/AcceptKeyEvents.java b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/AcceptKeyEvents.java index 2634c1eec..1163e04fa 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/AcceptKeyEvents.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/AcceptKeyEvents.java @@ -15,9 +15,9 @@ */ package org.dominokit.domino.ui.keyboard; -import static org.dominokit.domino.ui.utils.Domino.*; - import elemental2.dom.EventListener; +import elemental2.dom.KeyboardEvent; +import java.util.function.Predicate; /** * The {@code AcceptKeyEvents} interface defines methods for handling keyboard events. @@ -246,7 +246,7 @@ public interface AcceptKeyEvents { AcceptKeyEvents on(String key, EventListener handler); /** - * Registers an event listener be called when ctrl + any key is pressed with options. + * Registers an event listener be called when any key is pressed with options. * * @param options The {@link org.dominokit.domino.ui.keyboard.KeyboardEventOptions}. * @param handler The {@link elemental2.dom.EventListener} to call when the event occurs. @@ -254,6 +254,36 @@ public interface AcceptKeyEvents { */ AcceptKeyEvents any(KeyboardEventOptions options, EventListener handler); + /** + * Registers an event listener be called when any alphanumeric key is pressed with options. + * + * @param options The {@link org.dominokit.domino.ui.keyboard.KeyboardEventOptions}. + * @param handler The {@link elemental2.dom.EventListener} to call when the event occurs. + * @return The same instance of {@code AcceptKeyEvents}. + */ + AcceptKeyEvents alphanumeric(KeyboardEventOptions options, EventListener handler); + + /** + * Registers an event listener be called when any alphanumeric key is pressed with default + * options. + * + * @param handler The {@link elemental2.dom.EventListener} to call when the event occurs. + * @return The same instance of {@code AcceptKeyEvents}. + */ + AcceptKeyEvents alphanumeric(EventListener handler); + + /** + * Registers an event listener be called when any key is pressed with options if the predicate + * condition is matched. + * + * @param options The {@link org.dominokit.domino.ui.keyboard.KeyboardEventOptions}. + * @param handler The {@link elemental2.dom.EventListener} to call when the event occurs. + * @param predicate A predicate to be executed to decide if the handler will be triggered or not. + * @return The same instance of {@code AcceptKeyEvents}. + */ + AcceptKeyEvents any( + KeyboardEventOptions options, EventListener handler, Predicate predicate); + /** * Registers an event listener be called when ctrl + any key is pressed. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyEventHandlerContext.java b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyEventHandlerContext.java index 3d8a3acab..1deaaedbc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyEventHandlerContext.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyEventHandlerContext.java @@ -15,9 +15,9 @@ */ package org.dominokit.domino.ui.keyboard; -import static org.dominokit.domino.ui.utils.Domino.*; - import elemental2.dom.EventListener; +import elemental2.dom.KeyboardEvent; +import java.util.function.Predicate; import java.util.function.Supplier; /** @@ -37,6 +37,8 @@ class KeyEventHandlerContext { /** The supplier for {@link KeyboardEventOptions} associated with this context. */ final Supplier options; + final Predicate predicate; + /** * Constructs a new {@code KeyEventHandlerContext} with the specified event listener handler and * options supplier. @@ -47,5 +49,22 @@ class KeyEventHandlerContext { public KeyEventHandlerContext(EventListener handler, Supplier options) { this.handler = handler; this.options = options; + this.predicate = keyboardEvent -> true; + } + + /** + * Constructs a new {@code KeyEventHandlerContext} with the specified event listener handler and + * options supplier. + * + * @param handler The event listener handler. + * @param options The supplier for {@link KeyboardEventOptions}. + */ + public KeyEventHandlerContext( + EventListener handler, + Supplier options, + Predicate predicate) { + this.handler = handler; + this.options = options; + this.predicate = predicate; } } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardKeyListener.java b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardKeyListener.java index 0c70e53ac..4d38f9e02 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardKeyListener.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/keyboard/KeyboardKeyListener.java @@ -15,8 +15,9 @@ */ package org.dominokit.domino.ui.keyboard; -import static org.dominokit.domino.ui.utils.Domino.*; +import static java.util.Objects.nonNull; +import elemental2.core.JsRegExp; import elemental2.dom.Event; import elemental2.dom.EventListener; import elemental2.dom.KeyboardEvent; @@ -24,6 +25,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.function.Predicate; import java.util.function.Supplier; import jsinterop.base.Js; import org.dominokit.domino.ui.events.HasDefaultEventOptions; @@ -106,7 +108,8 @@ private void callHandlers(List keyEventHandlerContexts, keyEventHandlerContexts.stream() .filter( context -> - context.options.get().withCtrlKey == keyboardEvent.ctrlKey + context.predicate.test(keyboardEvent) + && context.options.get().withCtrlKey == keyboardEvent.ctrlKey && context.options.get().withAltKey == keyboardEvent.altKey && context.options.get().withShiftKey == keyboardEvent.shiftKey && context.options.get().withMetaKey == keyboardEvent.metaKey @@ -273,6 +276,39 @@ public AcceptKeyEvents any(KeyboardEventOptions options, EventListener handler) return addGlobalHandler(contextOf(handler, () -> options)); } + /** {@inheritDoc} */ + @Override + public AcceptKeyEvents alphanumeric(KeyboardEventOptions options, EventListener handler) { + return any( + options, + handler, + keyboardEvent -> + nonNull(keyboardEvent.key) + && new JsRegExp( + "^[a-zA-Z0-9\\u0600-\\u06FF\\u0660-\\u0669\\u06F0-\\u06F9 _.-]{1}$", "g") + .test(keyboardEvent.key)); + } + + /** {@inheritDoc} */ + @Override + public AcceptKeyEvents alphanumeric(EventListener handler) { + return any( + hasDefaultEventOptions.getOptions(), + handler, + keyboardEvent -> + nonNull(keyboardEvent.key) + && new JsRegExp( + "^[a-zA-Z0-9\\u0600-\\u06FF\\u0660-\\u0669\\u06F0-\\u06F9 _.-]{1}$", "g") + .test(keyboardEvent.key)); + } + + /** {@inheritDoc} */ + @Override + public AcceptKeyEvents any( + KeyboardEventOptions options, EventListener handler, Predicate predicate) { + return addGlobalHandler(contextOf(handler, () -> options, predicate)); + } + /** {@inheritDoc} */ @Override public AcceptKeyEvents any(EventListener handler) { @@ -297,6 +333,13 @@ private KeyEventHandlerContext contextOf( return new KeyEventHandlerContext(handler, options); } + private KeyEventHandlerContext contextOf( + EventListener handler, + Supplier options, + Predicate predicate) { + return new KeyEventHandlerContext(handler, options, predicate); + } + /** {@inheritDoc} */ @Override public AcceptKeyEvents clearAll() { diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java index 81970669e..b6b40a267 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java @@ -79,6 +79,8 @@ public class AbstractMenuItem extends BaseDominoElement false; + /** Default constructor to create a menu item. */ public AbstractMenuItem() { root = li().addCss(dui_menu_item); @@ -580,6 +582,30 @@ public > T appendChild(PrefixAddOn prefixAddOn) return (T) this; } + /** + * Retrieves the current {@link MenuSearchFilter} used for search operations. + * + * @return the current {@link MenuSearchFilter} + */ + public MenuSearchFilter getSearchFilter() { + return searchFilter; + } + + /** + * Sets the {@link MenuSearchFilter} to be used during search operations. + * + * @param searchFilter the search filter to set + * @return this Menu item instance for chaining + */ + public > T setSearchFilter(MenuSearchFilter searchFilter) { + this.searchFilter = searchFilter; + return (T) this; + } + + public boolean startsWith(String character) { + return false; + } + /** * Returns the underlying DOM element. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/CustomMenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/CustomMenuItem.java index 33e393c7c..e624643ee 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/CustomMenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/CustomMenuItem.java @@ -33,8 +33,6 @@ */ public class CustomMenuItem extends AbstractMenuItem { - private MenuSearchFilter searchFilter = (token, caseSensitive) -> false; - /** * Creates a new instance of {@link CustomMenuItem}. * @@ -44,12 +42,16 @@ public static CustomMenuItem create() { return new CustomMenuItem<>(); } + public CustomMenuItem() { + this.searchFilter = (token, caseSensitive) -> false; + } + /** * Invoked during a search operation. Displays the menu item if the token is found using the * provided {@link MenuSearchFilter}. * * @param token the search token - * @param caseSensitive indicates if the search should be case sensitive or not + * @param caseSensitive indicates if the search should be case-sensitive or not * @return true if the token matches; false otherwise */ @Override diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java index da0e03ade..e6930ed7d 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java @@ -76,6 +76,7 @@ public class Menu extends BaseDominoElement> private final LazyChild menuSubHeader; private final UListElement menuItemsList; private final DivElement menuBody; + private final LazyChild menuFooter; private final LazyChild createMissingElement; private final LazyChild backIcon; private LazyChild noResultElement; @@ -183,13 +184,31 @@ public Menu() { addClickListener(evt -> evt.stopPropagation()); + onKeyDown( + keyEvents -> { + keyEvents.alphanumeric( + evt -> { + KeyboardEvent keyboardEvent = Js.uncheckedCast(evt); + focusFirstMatch(keyboardEvent.key); + }); + }); + + menuSubHeader = LazyChild.of(div().addCss(dui_menu_sub_header), menuElement); + + menuItemsList = ul().addCss(dui_menu_items_list); + noResultElement = LazyChild.of(li().addCss(dui_menu_no_results, dui_order_last), menuItemsList); + menuBody = div().addCss(dui_menu_body); + menuElement.appendChild(menuBody.appendChild(menuItemsList)); + + menuFooter = LazyChild.of(div().addCss(dui_menu_footer), menuBody); + createMissingElement = LazyChild.of( a("#") .setAttribute("tabindex", "0") .setAttribute("aria-expanded", "true") .addCss(dui_menu_create_missing), - menuSearchContainer); + menuFooter); createMissingElement.whenInitialized( () -> { createMissingElement @@ -207,10 +226,28 @@ public Menu() { .onTab(evt -> keyboardNavigation.focusTopFocusableItem()) .onArrowDown( evt -> { - keyboardNavigation.focusTopFocusableItem(); + evt.stopPropagation(); + evt.preventDefault(); + if (isSearchable()) { + this.searchBox + .get() + .getTextBox() + .getInputElement() + .element() + .focus(); + } else { + keyboardNavigation.focusTopFocusableItem(); + } + }) + .onArrowUp( + evt -> { + evt.stopPropagation(); + evt.preventDefault(); + keyboardNavigation.focusBottomFocusableItem(); }); }); }); + searchBox.whenInitialized( () -> { searchBox.element().addSearchListener(this::onSearch); @@ -223,27 +260,38 @@ public Menu() { keyEvents .onArrowDown( evt -> { - String searchToken = searchBox.element().getTextBox().getValue(); - boolean tokenPresent = - nonNull(searchToken) && !searchToken.trim().isEmpty(); + evt.stopPropagation(); + evt.preventDefault(); + Optional> topFocusableItem = + keyboardNavigation.getTopFocusableItem(); + if (topFocusableItem.isPresent()) { + keyboardNavigation.focusTopFocusableItem(); + } else { + if (isAllowCreateMissing() + && createMissingElement.element().isAttached()) { + createMissingElement.get().element().focus(); + } + } + }) + .onArrowUp( + evt -> { + evt.stopPropagation(); + evt.preventDefault(); if (isAllowCreateMissing() - && createMissingElement.element().isAttached() - && tokenPresent) { + && createMissingElement.element().isAttached()) { createMissingElement.get().element().focus(); } else { - keyboardNavigation.focusTopFocusableItem(); + keyboardNavigation.focusBottomFocusableItem(); } }) - .onEscape(evt -> close())); + .onEscape(evt -> close()) + .onEnter( + evt -> + keyboardNavigation + .getTopFocusableItem() + .ifPresent(AbstractMenuItem::select))); }); - menuSubHeader = LazyChild.of(div().addCss(dui_menu_sub_header), menuElement); - - menuItemsList = ul().addCss(dui_menu_items_list); - noResultElement = LazyChild.of(li().addCss(dui_menu_no_results, dui_order_last), menuItemsList); - menuBody = div().addCss(dui_menu_body); - menuElement.appendChild(menuBody.appendChild(menuItemsList)); - keyboardNavigation = KeyboardNavigation.create(menuItems) .setTabOptions(new KeyboardNavigation.EventOptions(false, true)) @@ -280,7 +328,29 @@ public Menu() { item.focus(); } }) - .onEscape(this::close); + .onEscape(this::close) + .setOnEndReached( + navigation -> { + if (isAllowCreateMissing() && createMissingElement.element().isAttached()) { + createMissingElement.get().element().focus(); + } else if (isSearchable()) { + this.searchBox.get().getTextBox().getInputElement().element().focus(); + } else { + navigation.focusTopFocusableItem(); + } + }) + .setOnStartReached( + navigation -> { + if (isSearchable()) { + this.searchBox.get().getTextBox().getInputElement().element().focus(); + } else if (isAllowCreateMissing() + && createMissingElement.element().isAttached()) { + createMissingElement.get().element().focus(); + } else { + navigation.focusBottomFocusableItem(); + } + }); + ; element.addEventListener("keydown", keyboardNavigation); @@ -333,6 +403,17 @@ public Menu() { }; } + public void focusFirstMatch(String token) { + findOptionStarsWith(token).ifPresent(AbstractMenuItem::focus); + } + + public Optional> findOptionStarsWith(String token) { + return this.menuItems.stream() + .filter(menuItem -> !menuItem.isGrouped()) + .filter(dropDownItem -> dropDownItem.startsWith(token)) + .findFirst(); + } + /** * Handles the behavior when an expected menu item is missing. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java index f1783ca61..41734ffd2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java @@ -67,6 +67,8 @@ public MenuItem(String text) { textElement = span().addCss(dui_menu_item_content).setTextContent(text); appendChild(textElement); } + + this.searchFilter = this::containsToken; } /** @@ -84,6 +86,20 @@ public MenuItem(String text, String description) { } } + @Override + public boolean startsWith(String character) { + String textContent = + Arrays.asList(Optional.ofNullable(textElement), Optional.ofNullable(descriptionElement)) + .stream() + .filter(Optional::isPresent) + .map(element -> element.get().getTextContent()) + .collect(Collectors.joining(" ")); + if (isNull(textContent) || textContent.isEmpty()) { + return false; + } + return textContent.toLowerCase().startsWith(character.toLowerCase()); + } + /** * Retrieves the description element of the menu item. * @@ -111,11 +127,15 @@ public SpanElement getTextElement() { */ @Override public boolean onSearch(String token, boolean caseSensitive) { + return onSearch(token, caseSensitive, getSearchFilter()); + } + + private boolean onSearch(String token, boolean caseSensitive, MenuSearchFilter searchFilter) { if (isNull(token) || token.isEmpty()) { this.show(); return true; } - if (searchable && containsToken(token, caseSensitive)) { + if (searchable && searchFilter.onSearch(token, caseSensitive)) { if (this.isHidden()) { this.show(); } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuStyles.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuStyles.java index be55ca2f0..927331d65 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuStyles.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuStyles.java @@ -29,6 +29,7 @@ public interface MenuStyles { CssClass dui_menu_search_box = () -> "dui-menu-search-box"; CssClass dui_menu_sub_header = () -> "dui-menu-subheader"; CssClass dui_menu_body = () -> "dui-menu-body"; + CssClass dui_menu_footer = () -> "dui-menu-footer"; CssClass dui_menu_items_list = () -> "dui-menu-items-list"; CssClass dui_menu_item = () -> "dui-menu-item"; CssClass dui_menu_item_anchor = () -> "dui-menu-item-anchor"; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/search/SearchBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/search/SearchBox.java index b053a4804..5d3ccca96 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/search/SearchBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/search/SearchBox.java @@ -129,7 +129,14 @@ public SearchBox() { .setPlaceholder(getLabels().defaultQuickSearchPlaceHolder()) .appendChild(PrefixAddOn.of(searchIcon)) .appendChild(PostfixAddOn.of(clearIcon)) - .addCss(dui_m_0); + .addCss(dui_m_0) + .withInputElement( + (parent, input) -> { + input.onKeyDown( + keyEvents -> + keyEvents.any( + KeyboardEventOptions.create().setStopPropagation(true), evt -> {})); + }); root.appendChild(textBox.element()); diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DelayedTextInput.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DelayedTextInput.java index cd71081e8..f21244c57 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DelayedTextInput.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/DelayedTextInput.java @@ -16,10 +16,10 @@ package org.dominokit.domino.ui.utils; import static java.util.Objects.isNull; -import static org.dominokit.domino.ui.utils.Domino.*; import elemental2.dom.HTMLInputElement; import jsinterop.base.Js; +import org.dominokit.domino.ui.elements.InputElement; import org.dominokit.domino.ui.events.EventType; import org.gwtproject.timer.client.Timer; @@ -84,6 +84,18 @@ public static DelayedTextInput create(DominoElement inputEleme return create(inputElement.element(), delay); } + /** + * Creates a {@code DelayedTextInput} instance for the given InputElement with a specified delay. + * + * @param inputElement The DominoElement wrapping the HTML input element to monitor for text input + * changes. + * @param delay The delay in milliseconds before triggering the action. + * @return A {@code DelayedTextInput} instance. + */ + public static DelayedTextInput create(InputElement inputElement, int delay) { + return create(inputElement.element(), delay); + } + /** * Constructs a {@code DelayedTextInput} instance for the given HTML input element with a * specified delay. @@ -133,6 +145,7 @@ public void run() { EventType.keypress.getName(), evt -> { if (ElementUtil.isEnterKey(Js.uncheckedCast(evt))) { + autoActionTimer.cancel(); DelayedTextInput.this.onEnterAction.doAction(); } }); diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/KeyboardNavigation.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/KeyboardNavigation.java index a60c5e3c9..a6744ccc9 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/KeyboardNavigation.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/KeyboardNavigation.java @@ -34,6 +34,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Optional; +import java.util.function.Consumer; import jsinterop.base.Js; import org.dominokit.domino.ui.IsElement; @@ -58,6 +60,9 @@ public class KeyboardNavigation> implements EventListener private EventOptions enterOptions = new EventOptions(true, true); private EventOptions tabOptions = new EventOptions(true, true); private EventOptions spaceOptions = new EventOptions(true, true); + private Consumer> onEndReached = (navigation) -> focusTopFocusableItem(); + private Consumer> onStartReached = + (navigation) -> focusBottomFocusableItem(); /** * Creates a new `KeyboardNavigation` instance for the given list of items. @@ -266,7 +271,7 @@ public void focusNext(V item) { int nextIndex = items.indexOf(item) + 1; int size = items.size(); if (nextIndex >= size) { - focusTopFocusableItem(); + onEndReached.accept(this); } else { for (int i = nextIndex; i < size; i++) { V itemToFocus = items.get(i); @@ -275,7 +280,7 @@ public void focusNext(V item) { return; } } - focusTopFocusableItem(); + onEndReached.accept(this); } } @@ -311,8 +316,22 @@ public void focusTopFocusableItem() { } } + /** + * Get the first focusable item oif exists + * + * @return Optional of the first focusable item. + */ + public Optional getTopFocusableItem() { + for (V item : items) { + if (shouldFocus(item)) { + return Optional.of(item); + } + } + return Optional.empty(); + } + /** Focuses on the last focusable item in the list. */ - private void focusBottomFocusableItem() { + public void focusBottomFocusableItem() { for (int i = items.size() - 1; i >= 0; i--) { V itemToFocus = items.get(i); if (shouldFocus(itemToFocus)) { @@ -330,7 +349,7 @@ private void focusBottomFocusableItem() { public void focusPrevious(V item) { int nextIndex = items.indexOf(item) - 1; if (nextIndex < 0) { - focusBottomFocusableItem(); + onStartReached.accept(this); } else { for (int i = nextIndex; i >= 0; i--) { V itemToFocus = items.get(i); @@ -339,7 +358,7 @@ public void focusPrevious(V item) { return; } } - focusBottomFocusableItem(); + onStartReached.accept(this); } } @@ -400,6 +419,30 @@ public KeyboardNavigation removeNavigationHandler( return this; } + /** + * Use to change the behavior of navigating to the next item when navigating away from the last + * item down by default this will focus the first focusable item in the list + * + * @param onEndReached a function for the new desired behavior. + * @return Same KeyboardNavigation instance + */ + public KeyboardNavigation setOnEndReached(Consumer> onEndReached) { + this.onEndReached = onEndReached; + return this; + } + + /** + * Use to change the behavior of navigating to the previous item when navigating away from the + * first up item by default this will focus the last focusable item in the list + * + * @param onStartReached a function for the new desired behavior. + * @return Same KeyboardNavigation instance + */ + public KeyboardNavigation setOnStartReached(Consumer> onStartReached) { + this.onStartReached = onStartReached; + return this; + } + /** * A functional interface for handling focus on items. * diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css index a7d48951b..a7cd59269 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css @@ -698,4 +698,27 @@ textarea.dui-field-input { } .dui-form-field.dui-form-text-area .dui-field-input:not([data-scroll='0']) { border-top: var(--dui-form-scrolled-text-area-border); +} + +.dui-auto-type-input { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: inherit; + max-width: 100%; + min-height: var(--dui-form-field-input-height); + border: none; + border-radius: var(--dui-form-field-wrapper-radius); + font: var(--dui-form-field-input-line-font); + line-height: var(--dui-form-field-input-line-hieght); + overflow: var(--dui-form-input-overflow, hidden); + white-space: nowrap; + text-overflow: ellipsis; + background-color: var(--dui-bg); + color: inherit; +} + +.dui-auto-type-input:focus{ + outline: none; } \ No newline at end of file diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css index bca65a192..71b6819c3 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css @@ -30,15 +30,15 @@ } .dui-menu-back { - order: 1; + order: 10; } .dui-menu-icon { - order: 2; + order: 20; } .dui-menu-title { - order: 3; + order: 30; flex-grow: 1; } @@ -47,7 +47,7 @@ } .dui-menu-search { - order: 2; + order: 20; padding: var(--dui-menu-search-box-padding); border-width: var(--dui-menu-search-bar-border-width); border-style: var(--dui-menu-search-bar-border-style); @@ -65,7 +65,7 @@ } .dui-menu-subheader { - order: 3; + order: 30; padding: var(--dui-menu-subheader-padding); border-width: var(--dui-menu-subheader-border-width); border-style: var(--dui-menu-subheader-border-style); @@ -77,7 +77,7 @@ } .dui-menu-body { - order: 4; + order: 40; flex-grow: 1; } @@ -129,12 +129,12 @@ } .dui-menu-item-icon { - order: 1; + order: 10; min-width: var(--dui-menu-item-icon-min-height); } .dui-menu-item-utility { - order: 3; + order: 30; } .dui-menu-indicator { @@ -268,4 +268,13 @@ a.dui-menu-group-header:focus, a.dui-menu-group-header { text-decoration: none; outline: none; +} + +.dui-menu-items-list .li:last-child { + border-bottom-right-radius: var(--dui-menu-radius); + border-bottom-left-radius: var(--dui-menu-radius); +} + +.dui-menu-footer { + order: 50; } \ No newline at end of file From a2e213c63dea49be135ae64c86c37fae90c17552 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Thu, 30 Nov 2023 18:00:11 +0300 Subject: [PATCH 13/18] fix minor popups positioning issues --- .../main/java/org/dominokit/domino/ui/dialogs/Window.java | 6 +++--- .../src/main/java/org/dominokit/domino/ui/menu/Menu.java | 4 ++-- .../dominokit/domino/ui/menu/direction/DropDirection.java | 2 -- .../public/css/domino-ui/dui-components/domino-ui-menu.css | 5 ++++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/Window.java b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/Window.java index a479f9253..5d30e42b1 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/Window.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/dialogs/Window.java @@ -16,6 +16,7 @@ package org.dominokit.domino.ui.dialogs; import static org.dominokit.domino.ui.utils.Domino.*; +import static org.dominokit.domino.ui.utils.ElementsFactory.elements; import elemental2.dom.*; import jsinterop.base.Js; @@ -61,7 +62,6 @@ public class Window extends AbstractDialog { private boolean draggable = true; private boolean fixed; - private boolean maximizing = false; private NavBar navHeader; @@ -185,12 +185,14 @@ private void updatePosition() { modalElement.element().style.left = windowLeft - ((windowLeft + initialWidth) - windowWidth - DomGlobal.window.pageXOffset) + - elements.body().element().getBoundingClientRect().left + "px"; } } else { modalElement.element().style.left = ((windowWidth - initialWidth) / 2) + ((fixed ? 0 : DomGlobal.window.pageXOffset)) + - elements.body().element().getBoundingClientRect().left + "px"; } @@ -284,13 +286,11 @@ public Window setDraggable(boolean draggable) { * @return The current instance of the Window. */ public Window maximize() { - maximizing = true; maximizeIcon.collapse(); restoreIcon.expand(); maximized = true; updatePosition(); addCss(dui_maximized); - maximizing = false; return this; } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java index e6930ed7d..3a5707950 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java @@ -1384,12 +1384,12 @@ private void position() { Optional menuTarget = getTarget(); menuTarget.ifPresent( target -> { - getEffectiveDropDirection() - .position(element.element(), target.getTargetElement().element()); if (fitToTargetWidth) { element.setWidth( target.getTargetElement().element().getBoundingClientRect().width + "px"); } + getEffectiveDropDirection() + .position(element.element(), target.getTargetElement().element()); }); } } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/DropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/DropDirection.java index a8732551a..bdeaa5bad 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/DropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/DropDirection.java @@ -15,8 +15,6 @@ */ package org.dominokit.domino.ui.menu.direction; -import static org.dominokit.domino.ui.utils.Domino.*; - import elemental2.dom.Element; import elemental2.dom.Event; import org.dominokit.domino.ui.style.CssClass; diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css index 71b6819c3..02735fe01 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css @@ -125,7 +125,8 @@ align-items: start; gap: var(--dui-menu-item-anchor-gap); text-decoration: none; - flex-wrap: wrap; + flex-wrap: nowrap; + flex-basis: 24px; } .dui-menu-item-icon { @@ -158,6 +159,7 @@ .dui-menu-drop .dui-menu-items-list { max-height: calc(100vh - 50vh); overflow-y: auto; + overflow-x: hidden; } .dui-menu-no-results { @@ -220,6 +222,7 @@ flex-direction: column; order: 30; flex-grow: 1; + max-width: calc(100% - 32px); } .dui-menu-item-postfix:empty { From cf84362b66ff97eca362ccb786b2a1a0ee7291aa Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Sun, 3 Dec 2023 18:57:13 +0300 Subject: [PATCH 14/18] fix #894 Dependency to gwt-time-emul and break the project compilation in Eclipse --- domino-ui/src/main/module.gwt.xml | 1 - pom.xml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/domino-ui/src/main/module.gwt.xml b/domino-ui/src/main/module.gwt.xml index bd4d14e35..86281a42e 100644 --- a/domino-ui/src/main/module.gwt.xml +++ b/domino-ui/src/main/module.gwt.xml @@ -26,7 +26,6 @@ - diff --git a/pom.xml b/pom.xml index e2f4b916f..df3f16317 100644 --- a/pom.xml +++ b/pom.xml @@ -86,9 +86,9 @@ 1.2.1 2.10.0 1.0.3 - 1.0.1 + 1.0.2 1.0.0 - 1.0.1 + 1.0.3 From 843a21e34d38e3ccd172066314e5ae933719bec8 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 6 Dec 2023 18:31:35 +0300 Subject: [PATCH 15/18] fix #896 #808 TextArea improvements --- .../dominokit/domino/ui/style/SpacingCss.java | 8 ++ .../domino/ui/forms/TextAreaBox.java | 55 ++++++++----- .../domino/ui/utils/IntersectionObserver.java | 81 +++++++++++++++++++ .../ui/utils/IntersectionObserverEntry.java | 58 +++++++++++++ .../ui/utils/IntersectionObserverOptions.java | 53 ++++++++++++ .../dui-components/domino-ui-forms.css | 6 +- .../dui-components/domino-ui-spacing.css | 16 ++++ 7 files changed, 256 insertions(+), 21 deletions(-) create mode 100644 domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserver.java create mode 100644 domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserverEntry.java create mode 100644 domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserverOptions.java diff --git a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/SpacingCss.java b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/SpacingCss.java index d214ccd00..fdb271160 100644 --- a/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/SpacingCss.java +++ b/domino-ui-shared/src/main/java/org/dominokit/domino/ui/style/SpacingCss.java @@ -548,6 +548,8 @@ public interface SpacingCss { CssClass dui_h_full = () -> "dui-h-full"; + CssClass dui_h_inherit = () -> "dui-h-inherit"; + CssClass dui_h_px = () -> "dui-h-px"; CssClass dui_inset_0_5 = () -> "dui-inset-0_5"; @@ -3034,6 +3036,8 @@ public interface SpacingCss { CssClass dui_w_full = () -> "dui-w-full"; + CssClass dui_w_inherit = () -> "dui-w-inherit"; + CssClass dui_w_px = () -> "dui-w-px"; CssClass dui_z_0 = () -> "dui-z-0"; @@ -3774,6 +3778,10 @@ public interface SpacingCss { CssClass dui_whitespace_pre_wrap = () -> "dui-whitespace-pre-wrap"; + CssClass dui_whitespace_unset = () -> "dui-whitespace-unset"; + + CssClass dui_whitespace_break_spaces = () -> "dui-whitespace-break-spaces"; + CssClass dui_break_normal = () -> "dui-break-normal"; CssClass dui_break_words = () -> "dui-break-words"; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java index 74314647e..cf1b913bc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/TextAreaBox.java @@ -25,6 +25,9 @@ import org.dominokit.domino.ui.elements.SpanElement; import org.dominokit.domino.ui.utils.DominoElement; import org.dominokit.domino.ui.utils.FillerElement; +import org.dominokit.domino.ui.utils.IntersectionObserver; +import org.dominokit.domino.ui.utils.IntersectionObserverEntry; +import org.dominokit.domino.ui.utils.IntersectionObserverOptions; import org.dominokit.domino.ui.utils.LazyChild; import org.dominokit.domino.ui.utils.PostfixAddOn; import org.dominokit.domino.ui.utils.PrefixAddOn; @@ -55,6 +58,7 @@ public class TextAreaBox extends CountableInputFormField headerFiller; + private IntersectionObserver intersectionObserver; /** * Factory method to create a new instance of {@link TextAreaBox}. @@ -79,19 +83,23 @@ public static TextAreaBox create(String label) { public TextAreaBox() { setRows(4); addCss(dui_form_text_area); - wrapperElement.appendChild( - header = - div() - .addCss( - dui_form_text_area_header, - dui_hide_empty, - dui_flex, - dui_items_center, - dui_order_first)); + wrapperElement + .appendChild( + header = + div() + .addCss( + dui_form_text_area_header, + dui_hide_empty, + dui_flex, + dui_items_center, + dui_order_first)) + .addCss(dui_h_inherit); + bodyElement.addCss(dui_h_inherit); + headerFiller = LazyChild.of(FillerElement.create().addCss(dui_order_30), header); onAttached(mutationRecord -> adjustHeight()); setDefaultValue(""); - getInputElement().setAttribute("data-scroll", "0"); + getInputElement().addCss(dui_h_inherit).setAttribute("data-scroll", "0"); getInputElement() .addEventListener( "scroll", @@ -99,6 +107,19 @@ public TextAreaBox() { getInputElement() .element() .setAttribute("data-scroll", getInputElement().element().scrollTop)); + + intersectionObserver = + new IntersectionObserver( + entries -> { + IntersectionObserverEntry entry = entries.asList().get(0); + if (entry.getIsIntersecting()) { + adjustHeight(); + intersectionObserver.unobserve(this.element()); + intersectionObserver.disconnect(); + } + }, + IntersectionObserverOptions.create()); + intersectionObserver.observe(this.element()); } @Override @@ -197,12 +218,10 @@ protected DominoElement createInputElement(String type) { protected void doSetValue(String value) { if (nonNull(value)) { getInputElement().element().value = value; - if (isAttached()) { - adjustHeight(); - } } else { getInputElement().element().value = ""; } + nowOrWhenAttached(this::adjustHeight); updateCounter(getLength(), getMaxCount()); } @@ -235,13 +254,11 @@ public TextAreaBox fixedSize() { /** Adjusts the height of the text area based on its content. */ private void adjustHeight() { - getInputElement().style().setHeight("auto"); - int scrollHeight = getInputElement().element().scrollHeight; - if (scrollHeight < 30) { - scrollHeight = 28; - } + if (autoSize) { - getInputElement().style().setHeight(scrollHeight + "px"); + getInputElement().style().setHeight("auto"); + int scrollHeight = getInputElement().element().scrollHeight; + getInputElement().style().setHeight(Math.max(scrollHeight, 28) + "px"); } } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserver.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserver.java new file mode 100644 index 000000000..31a4934b4 --- /dev/null +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserver.java @@ -0,0 +1,81 @@ +/* + * 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.utils; + +import elemental2.core.JsArray; +import elemental2.dom.Element; +import jsinterop.annotations.JsFunction; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +/** + * provides a way to asynchronously observe changes in the intersection of a target element with an + * ancestor element or with a top-level document's viewport. + * + * @see MDN Web Docs + * (IntersectionObserver) + */ +@JsType(isNative = true, namespace = JsPackage.GLOBAL) +public class IntersectionObserver { + + /** + * Disconnects the {@code IntersectionObserver} instance, stopping it from tracking changes in + * element intersection. + */ + public native void disconnect(); + + /** + * Begins observing the specified {@link Element} for intersection changes. + * + * @param target The DOM element to observe for intersection changes. + */ + public native void observe(Element target); + + /** + * Stops observing the specified {@link Element} for intersection changes. + * + * @param target The DOM element to stop observing. + */ + public native void unobserve(Element target); + + public native JsArray takeRecords(); + + /** + * A functional interface representing a callback function to be invoked when intersection changes + * are observed. + */ + @JsFunction + public interface IntersectionObserverCallbackFn { + /** + * Invoked when element intersection with viewport is observed. + * + * @param entries An array of {@link IntersectionObserverEntry} objects describing the observed + * intersection changes. + */ + void onInvoke(JsArray entries); + } + + /** + * Constructs a {@code IntersectionObserver} instance with the specified callback function. + * + * @param callback The callback function to be invoked when size changes are observed. + * @param options The {@link IntersectionObserverOptions} to configure the IntersectionObserver + */ + public IntersectionObserver( + IntersectionObserver.IntersectionObserverCallbackFn callback, + IntersectionObserverOptions options) {} +} diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserverEntry.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserverEntry.java new file mode 100644 index 000000000..cbdfe3ca3 --- /dev/null +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserverEntry.java @@ -0,0 +1,58 @@ +/* + * 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.utils; + +import elemental2.dom.DOMRect; +import elemental2.dom.Element; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsProperty; +import jsinterop.annotations.JsType; + +/** + * The IntersectionObserverEntry interface of the Intersection Observer API describes the + * intersection between the target element and its root container at a specific moment of + * transition. + * + * @see MDN Web + * Docs (IntersectionObserverEntry) + */ +@JsType(isNative = true, namespace = JsPackage.GLOBAL) +public interface IntersectionObserverEntry { + + @JsProperty + DOMRect getBoundingClientRect(); + + @JsProperty + double getIntersectionRatio(); + + @JsProperty + DOMRect getIntersectionRect(); + + @JsProperty + boolean getIsIntersecting(); + + @JsProperty + boolean getIsVisible(); + + @JsProperty + DOMRect getRootBounds(); + + @JsProperty + Element getTarget(); + + @JsProperty + double getTime(); +} diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserverOptions.java b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserverOptions.java new file mode 100644 index 000000000..b29a90d4d --- /dev/null +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/utils/IntersectionObserverOptions.java @@ -0,0 +1,53 @@ +/* + * 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.utils; + +import elemental2.core.JsArray; +import elemental2.dom.Element; +import jsinterop.annotations.JsOverlay; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; +import jsinterop.base.Js; +import jsinterop.base.JsPropertyMap; + +/** + * An optional object which customizes the observer. If options isn't specified, the observer uses + * the document's viewport as the root, with no margin, and a 0% threshold (meaning that even a + * one-pixel change is enough to trigger a callback). You can provide any combination of the + * following options: + * + * @see MDN + * Web Docs (IntersectionObserver) + */ +@JsType(isNative = true, namespace = JsPackage.GLOBAL) +public class IntersectionObserverOptions { + + /** + * Creates a new instance of {@code ResizeObserverOptions} with default settings. + * + * @return A {@code ResizeObserverOptions} instance with default settings. + */ + @JsOverlay + public static IntersectionObserverOptions create() { + return Js.uncheckedCast(JsPropertyMap.of()); + } + + public Element root; + public String rootMargin; + public JsArray threshold; +} diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css index a7cd59269..78b038ff4 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css @@ -13,6 +13,7 @@ fieldset.dui { margin-inline: 0; max-inline-size: 100%; min-inline-size:0; + --dui-form-field-input-whitespace: nowrap; } .dui-grid-col > .dui-form-field { @@ -202,7 +203,7 @@ fieldset.dui { font: var(--dui-form-field-input-line-font); line-height: var(--dui-form-field-input-line-hieght); overflow: var(--dui-form-input-overflow, hidden); - white-space: nowrap; + white-space: var(--dui-form-field-input-whitespace); text-overflow: ellipsis; align-items: center; background-color: inherit; @@ -211,7 +212,8 @@ fieldset.dui { } .dui-form-text-area { - --dui-form-input-overflow: auto + --dui-form-input-overflow: auto; + --dui-form-field-input-whitespace:unset; } .dui-field-input:focus { diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-spacing.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-spacing.css index a1eeafbd5..5317e9675 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-spacing.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-spacing.css @@ -6214,6 +6214,10 @@ width: var(--dui-spc-full); } +.dui.dui-w-inherit { + width: inherit; +} + .dui.dui-w-auto { width: auto; } @@ -6230,6 +6234,10 @@ height: var(--dui-spc-full); } +.dui.dui-h-inherit { + height: inherit; +} + .dui.dui-max-h-full { max-height: var(--dui-spc-full); } @@ -8094,6 +8102,14 @@ white-space: pre-wrap; } +.dui.dui-whitespace-unset { + white-space: unset; +} + +.dui.dui-whitespace-break-spaces { + white-space: break-spaces; +} + .dui.dui-break-normal { overflow-wrap: normal; word-break: normal; From f6a22d931912f6efd80bf9f1377b9ef41a2128c9 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Thu, 7 Dec 2023 11:37:16 +0300 Subject: [PATCH 16/18] fix #897 add BestRight{Up/Down}DropDirection --- .../domino/ui/menu/AbstractMenuItem.java | 6 +++++ .../domino/ui/menu/CustomMenuItem.java | 15 ++++++++++++ .../dominokit/domino/ui/menu/MenuItem.java | 13 ++++++++++ .../domino/ui/menu/MenuItemsGroup.java | 17 ++++++++++++- .../dominokit/domino/ui/menu/MenuStyles.java | 1 + .../direction/BottomLeftDropDirection.java | 13 ++++------ .../direction/BottomMiddleDropDirection.java | 24 +++++++++---------- .../direction/BottomRightDropDirection.java | 8 ++----- .../menu/direction/LeftDownDropDirection.java | 21 +++++++--------- .../direction/LeftMiddleDropDirection.java | 12 +++------- .../menu/direction/LeftUpDropDirection.java | 21 +++++++--------- .../direction/RightDownDropDirection.java | 19 +++++++-------- .../direction/RightMiddleDropDirection.java | 19 +++++++-------- .../menu/direction/RightUpDropDirection.java | 19 +++++++-------- .../menu/direction/TopLeftDropDirection.java | 13 ++++------ .../direction/TopMiddleDropDirection.java | 24 +++++++++---------- .../menu/direction/TopRightDropDirection.java | 8 ++----- .../dui-components/domino-ui-menu.css | 6 +++++ 18 files changed, 138 insertions(+), 121 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java index b6b40a267..f0f2de8ca 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java @@ -602,6 +602,12 @@ public > T setSearchFilter(MenuSearchFilter search return (T) this; } + /** + * Check if the menu item text starts with a specific string + * + * @param character the text to check against. + * @return boolean, true if the menu item starts with the text, false otherwise. + */ public boolean startsWith(String character) { return false; } diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/CustomMenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/CustomMenuItem.java index e624643ee..7ab925b34 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/CustomMenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/CustomMenuItem.java @@ -18,6 +18,9 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; +import org.dominokit.domino.ui.elements.AnchorElement; +import org.dominokit.domino.ui.utils.ChildHandler; + /** * A custom menu item that extends the {@link AbstractMenuItem} with the capability to apply custom * search filters to menu items. @@ -46,6 +49,18 @@ public CustomMenuItem() { this.searchFilter = (token, caseSensitive) -> false; } + /** + * Applies a custom child handler to the link element of this menu item + * + * @param handler The child handler to apply. + * @return This menu item instance. + */ + public CustomMenuItem withClickableElement( + ChildHandler, AnchorElement> handler) { + handler.apply(this, linkElement); + return this; + } + /** * Invoked during a search operation. Displays the menu item if the token is found using the * provided {@link MenuSearchFilter}. diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java index 41734ffd2..b4469d30c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItem.java @@ -22,8 +22,10 @@ import java.util.Arrays; import java.util.Optional; import java.util.stream.Collectors; +import org.dominokit.domino.ui.elements.AnchorElement; import org.dominokit.domino.ui.elements.SmallElement; import org.dominokit.domino.ui.elements.SpanElement; +import org.dominokit.domino.ui.utils.ChildHandler; /** * Represents a menu item that can be added to a menu. Each menu item can have a text and an @@ -71,6 +73,17 @@ public MenuItem(String text) { this.searchFilter = this::containsToken; } + /** + * Applies a custom child handler to the link element of this menu item + * + * @param handler The child handler to apply. + * @return This menu item instance. + */ + public MenuItem withClickableElement(ChildHandler, AnchorElement> handler) { + handler.apply(this, linkElement); + return this; + } + /** * Constructs a menu item with the specified text and description. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItemsGroup.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItemsGroup.java index 7fe6a24e4..9f5c647fd 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItemsGroup.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuItemsGroup.java @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; +import org.dominokit.domino.ui.elements.AnchorElement; import org.dominokit.domino.ui.elements.DivElement; import org.dominokit.domino.ui.elements.UListElement; import org.dominokit.domino.ui.layout.NavBar; @@ -62,7 +63,9 @@ public MenuItemsGroup(Menu menu) { linkElement.removeCss(dui_menu_item_anchor); linkElement.addCss(dui_menu_group_header); root.appendChild(groupElement = div().addCss(dui_flex, dui_flex_col)); - groupHeader = LazyChild.of(NavBar.create().addCss(dui_order_first), bodyElement); + groupHeader = + LazyChild.of( + NavBar.create().addCss(dui_menu_group_header_nav).addCss(dui_order_first), bodyElement); itemsListElement = LazyChild.of(ul().addCss(dui_menu_items_list, dui_order_last), groupElement); } @@ -129,6 +132,18 @@ public MenuItemsGroup withItemsMenu(ChildHandler, UListElem return this; } + /** + * Applies a custom child handler to the link element of this menu item + * + * @param handler The child handler to apply. + * @return This menu item instance. + */ + public MenuItemsGroup withClickableElement( + ChildHandler, AnchorElement> handler) { + handler.apply(this, linkElement); + return this; + } + /** * Invoked during a search operation across all the menu items in this group. * diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuStyles.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuStyles.java index 927331d65..0861fd416 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuStyles.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/MenuStyles.java @@ -44,6 +44,7 @@ public interface MenuStyles { CssClass dui_menu_item_hint = () -> "dui-menu-item-hint"; CssClass dui_menu_group = () -> "dui-menu-group"; CssClass dui_menu_group_header = () -> "dui-menu-group-header"; + CssClass dui_menu_group_header_nav = () -> "dui-menu-group-header-nav"; CssClass dui_menu_drop = () -> "dui-menu-drop"; CssClass dui_menu_item_prefix = () -> "dui-menu-item-prefix"; diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java index 2daf358e2..7bf7aab13 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomLeftDropDirection.java @@ -48,14 +48,11 @@ public void position(Element source, Element target) { delta = newRect.width - availableSpace; } - Style.of(source) - .style - .setProperty( - "left", - px.of( - (targetRect.left - (newRect.left - targetRect.left)) - - (sourceRect.width - targetRect.width) - + delta)); + double left = + (targetRect.left - (newRect.left - targetRect.left)) + - (sourceRect.width - targetRect.width) + + delta; + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java index 6a643fb96..4adebef9f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomMiddleDropDirection.java @@ -49,24 +49,22 @@ public void position(Element source, Element target) { int innerWidth = window.innerWidth; double delta = 0; - double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; + double availableSpace = + innerWidth - newTargetRect.right + (newTargetRect.width / 2) - window.pageXOffset; if (availableSpace < (newRect.width / 2)) { - delta = (newRect.width / 2) - availableSpace; + delta = (newRect.width / 2) - (newTargetRect.width / 2) - availableSpace; } elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); + double left = + newTargetRect.left + - (newRect.width / 2) + + (newTargetRect.width / 2) + + window.pageXOffset + - Math.abs(delta) + - elements.body().element().getBoundingClientRect().left; - Style.of(source) - .style - .setProperty( - "left", - px.of( - newTargetRect.left - - (newRect.width / 2) - + (newTargetRect.width / 2) - + window.pageXOffset - - delta - - elements.body().element().getBoundingClientRect().left)); + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomRightDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomRightDropDirection.java index 0741804c9..79ed4ebad 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomRightDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/BottomRightDropDirection.java @@ -47,12 +47,8 @@ public void position(Element source, Element target) { dui_dd_bottom_right.apply(source); elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - (targetRect.left - (newRect.left - targetRect.left)) + window.pageXOffset - delta)); + double left = (targetRect.left - (newRect.left - targetRect.left)) + window.pageXOffset - delta; + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java index 82b9465c8..1c9a15e66 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftDownDropDirection.java @@ -51,18 +51,15 @@ public void position(Element source, Element target) { elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - targetRect.left - - (newRect.left - targetRect.left) - + window.pageXOffset - - sourceRect.width - - (source.hasAttribute("dui-position-x-offset") - ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) - : 0))); + double left = + targetRect.left + - (newRect.left - targetRect.left) + + window.pageXOffset + - sourceRect.width + - (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0); + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java index 5b32693d7..399d5e5bc 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftMiddleDropDirection.java @@ -45,15 +45,9 @@ public void position(Element source, Element target) { delta = ((sourceRect.height / 2) - availableUpSpace); } - Style.of(source) - .style - .setProperty( - "top", - px.of( - targetRect.top - + window.pageYOffset - - ((sourceRect.height - targetRect.height) / 2) - + delta)); + double left = + targetRect.top + window.pageYOffset - ((sourceRect.height - targetRect.height) / 2) + delta; + Style.of(source).style.setProperty("top", px.of(Math.max(left, 0))); Style.of(source).style.setProperty("left", px.of(targetRect.left)); diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java index ead0d1eaf..3ae18d7ba 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/LeftUpDropDirection.java @@ -51,18 +51,15 @@ public void position(Element source, Element target) { elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - targetRect.left - - (newRect.left - targetRect.left) - + window.pageXOffset - - sourceRect.width - - (source.hasAttribute("dui-position-x-offset") - ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) - : 0))); + double left = + targetRect.left + - (newRect.left - targetRect.left) + + window.pageXOffset + - sourceRect.width + - (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0); + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java index 06671924d..3bc29ec54 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightDownDropDirection.java @@ -52,17 +52,14 @@ public void position(Element source, Element target) { elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - (targetRect.left - (newRect.left - targetRect.left)) - + window.pageXOffset - + targetRect.width - + (source.hasAttribute("dui-position-x-offset") - ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) - : 0))); + double left = + (targetRect.left - (newRect.left - targetRect.left)) + + window.pageXOffset + + targetRect.width + + (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0); + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java index 2a47e9898..85c02ecd2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightMiddleDropDirection.java @@ -64,17 +64,14 @@ public void position(Element source, Element target) { elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - (targetRect.left - (newRect.left - targetRect.left)) - + window.pageXOffset - + targetRect.width - + (source.hasAttribute("dui-position-x-offset") - ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) - : 0))); + double left = + (targetRect.left - (newRect.left - targetRect.left)) + + window.pageXOffset + + targetRect.width + + (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0); + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java index 652097227..d2ef386ff 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/RightUpDropDirection.java @@ -59,17 +59,14 @@ public void position(Element source, Element target) { .setCssProperty("--dui-dd-position-delta", ((targetRect.top - sourceRect.top)) + "px"); elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - (targetRect.left - (newRect.left - targetRect.left)) - + window.pageXOffset - + targetRect.width - + (source.hasAttribute("dui-position-x-offset") - ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) - : 0))); + double left = + (targetRect.left - (newRect.left - targetRect.left)) + + window.pageXOffset + + targetRect.width + + (source.hasAttribute("dui-position-x-offset") + ? Double.parseDouble(source.getAttribute("dui-position-x-offset")) + : 0); + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java index 0d3c511ad..be8eee7b3 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopLeftDropDirection.java @@ -50,14 +50,11 @@ public void position(Element source, Element target) { elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - (targetRect.left - (newRect.left - targetRect.left)) - - (sourceRect.width - targetRect.width) - + delta)); + double left = + (targetRect.left - (newRect.left - targetRect.left)) + - (sourceRect.width - targetRect.width) + + delta; + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java index ee5154e18..eed771caf 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopMiddleDropDirection.java @@ -49,23 +49,21 @@ public void position(Element source, Element target) { DOMRect newTargetRect = target.getBoundingClientRect(); double delta = 0; - double availableSpace = innerWidth - newTargetRect.right - window.pageXOffset; + double availableSpace = + innerWidth - newTargetRect.right + (newTargetRect.width / 2) - window.pageXOffset; if (availableSpace < (newRect.width / 2)) { - delta = (newRect.width / 2) - availableSpace; + delta = (newRect.width / 2) - (newTargetRect.width / 2) - availableSpace; } elements.elementOf(source).setCssProperty("--dui-menu-drop-pin-offset", delta + "px"); - Style.of(source) - .style - .setProperty( - "left", - px.of( - newTargetRect.left - - (newRect.width / 2) - + (newTargetRect.width / 2) - + window.pageXOffset - - delta - - elements.body().element().getBoundingClientRect().left)); + double left = + newTargetRect.left + - (newRect.width / 2) + + (newTargetRect.width / 2) + + window.pageXOffset + - Math.abs(delta) + - elements.body().element().getBoundingClientRect().left; + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopRightDropDirection.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopRightDropDirection.java index 9183cdf46..79306dab2 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopRightDropDirection.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/direction/TopRightDropDirection.java @@ -49,12 +49,8 @@ public void position(Element source, Element target) { dui_dd_top_right.apply(source); elements.elementOf(source).setCssProperty("--dui-menu-drop-min-width", targetRect.width + "px"); DOMRect newRect = source.getBoundingClientRect(); - Style.of(source) - .style - .setProperty( - "left", - px.of( - (targetRect.left - (newRect.left - targetRect.left)) + window.pageXOffset - delta)); + double left = (targetRect.left - (newRect.left - targetRect.left)) + window.pageXOffset - delta; + Style.of(source).style.setProperty("left", px.of(Math.max(left, 0))); } /** {@inheritDoc} */ diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css index 02735fe01..a0184db50 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-menu.css @@ -271,6 +271,12 @@ a.dui-menu-group-header:focus, a.dui-menu-group-header { text-decoration: none; outline: none; + display: inherit; +} + +.dui-menu-group-header-nav { + border: none; + --dui-menu-header-border-width: 0; } .dui-menu-items-list .li:last-child { From 9da3e1fe67ddb1aabba86fa00f4b631034fb0fa0 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Sun, 10 Dec 2023 15:32:09 +0300 Subject: [PATCH 17/18] upgrade domino-jackson dependency --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df3f16317..00f8614f2 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ UTF-8 1.2.1 2.10.0 - 1.0.3 + 1.0.4 1.0.2 1.0.0 1.0.3 From f06d1f06bbf6932a97a52c50fcf3d68d0d1eb474 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Sun, 10 Dec 2023 15:42:29 +0300 Subject: [PATCH 18/18] 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-webjar/pom.xml | 2 +- domino-ui/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/domino-ui-shared/pom.xml b/domino-ui-shared/pom.xml index 1f341d698..0be9789e9 100644 --- a/domino-ui-shared/pom.xml +++ b/domino-ui-shared/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - HEAD-SNAPSHOT + 2.0.0-RC5 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 178f2d8e9..d82797bbf 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 + 2.0.0-RC5 4.0.0 diff --git a/domino-ui-tools/pom.xml b/domino-ui-tools/pom.xml index 83024dce5..d947b6bd5 100644 --- a/domino-ui-tools/pom.xml +++ b/domino-ui-tools/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - HEAD-SNAPSHOT + 2.0.0-RC5 4.0.0 diff --git a/domino-ui-webjar/pom.xml b/domino-ui-webjar/pom.xml index 6485a5624..e99ed88c8 100644 --- a/domino-ui-webjar/pom.xml +++ b/domino-ui-webjar/pom.xml @@ -5,7 +5,7 @@ domino-ui-parent org.dominokit - HEAD-SNAPSHOT + 2.0.0-RC5 jar 4.0.0 diff --git a/domino-ui/pom.xml b/domino-ui/pom.xml index ef01cc082..496268166 100644 --- a/domino-ui/pom.xml +++ b/domino-ui/pom.xml @@ -6,7 +6,7 @@ org.dominokit domino-ui-parent - HEAD-SNAPSHOT + 2.0.0-RC5 domino-ui diff --git a/pom.xml b/pom.xml index 00f8614f2..23b667079 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.dominokit domino-ui-parent - HEAD-SNAPSHOT + 2.0.0-RC5 pom domino-ui-parent