Skip to content

Commit

Permalink
Merge branch 'release/2.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
vegegoku committed Oct 16, 2024
2 parents 849d66b + 96967ff commit bdbb865
Show file tree
Hide file tree
Showing 128 changed files with 3,631 additions and 749 deletions.
2 changes: 1 addition & 1 deletion domino-ui-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-parent</artifactId>
<groupId>org.dominokit</groupId>
<version>2.0.2</version>
<version>2.0.3</version>
</parent>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3848,23 +3848,23 @@ public interface SpacingCss {

CssClass dui_rounded_none = () -> "dui-rounded-none";

CssClass dui_rounded_inherit = () -> "dui_rounded_inherit";
CssClass dui_rounded_inherit = () -> "dui-rounded-inherit";

CssClass dui_rounded_t_inherit = () -> "dui_rounded_t_inherit";
CssClass dui_rounded_t_inherit = () -> "dui-rounded-t-inherit";

CssClass dui_rounded_b_inherit = () -> "dui_rounded_b_inherit";
CssClass dui_rounded_b_inherit = () -> "dui-rounded-b-inherit";

CssClass dui_rounded_l_inherit = () -> "dui_rounded_l_inherit";
CssClass dui_rounded_l_inherit = () -> "dui-rounded-l-inherit";

CssClass dui_rounded_r_inherit = () -> "dui_rounded_r_inherit";
CssClass dui_rounded_r_inherit = () -> "dui-rounded-r-inherit";

CssClass dui_rounded_tl_inherit = () -> "dui_rounded_tl_inherit";
CssClass dui_rounded_tl_inherit = () -> "dui-rounded-tl-inherit";

CssClass dui_rounded_tr_inherit = () -> "dui_rounded_tr_inherit";
CssClass dui_rounded_tr_inherit = () -> "dui-rounded-tr-inherit";

CssClass dui_rounded_br_inherit = () -> "dui_rounded_br_inherit";
CssClass dui_rounded_br_inherit = () -> "dui-rounded-br-inherit";

CssClass dui_rounded_bl_inherit = () -> "dui_rounded_bl_inherit";
CssClass dui_rounded_bl_inherit = () -> "dui-rounded-bl-inherit";

CssClass dui_rounded_sm = () -> "dui-rounded-sm";

Expand Down
2 changes: 1 addition & 1 deletion domino-ui-tools/mdi-icons-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-tools</artifactId>
<groupId>org.dominokit</groupId>
<version>2.0.2</version>
<version>2.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion domino-ui-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-parent</artifactId>
<groupId>org.dominokit</groupId>
<version>2.0.2</version>
<version>2.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion domino-ui-webjar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-parent</artifactId>
<groupId>org.dominokit</groupId>
<version>2.0.2</version>
<version>2.0.3</version>
</parent>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion domino-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.dominokit</groupId>
<artifactId>domino-ui-parent</artifactId>
<version>2.0.2</version>
<version>2.0.3</version>
</parent>

<artifactId>domino-ui</artifactId>
Expand Down
16 changes: 13 additions & 3 deletions domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public Card withIcon(ChildHandler<CardHeader, Icon<?>> handler) {
* @return same card instance
*/
public Card appendChild(PostfixAddOn<?> postfix) {
header.get().appendChild(postfix);
getPostfixElement().appendChild(postfix);
return this;
}

Expand All @@ -513,18 +513,28 @@ public Card appendChild(PostfixAddOn<?> postfix) {
* @return same card instance
*/
public Card appendChild(PrefixAddOn<?> prefix) {
header.get().appendChild(prefix);
getPrefixElement().appendChild(prefix);
return this;
}

@Override
public PostfixElement getPostfixElement() {
return PostfixElement.of(header.get().element());
}

@Override
public PrefixElement getPrefixElement() {
return PrefixElement.of(header.get().element());
}

/**
* Appends an element to the right side of the card header.
*
* @param postfix A {@link org.dominokit.domino.ui.utils.PostfixAddOn} wrapped element
* @return same card instance
*/
public Card withUtility(PostfixAddOn<?> postfix) {
header.get().appendChild(postfix);
getPostfixElement().appendChild(postfix);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public CardHeader withIcon(ChildHandler<CardHeader, Icon<?>> handler) {
* @return same CardHeader instance
*/
public CardHeader appendChild(PostfixAddOn<?> postfixAddOn) {
mainHeader.get().appendChild(postfixAddOn);
getPostfixElement().appendChild(postfixAddOn);
return this;
}

Expand All @@ -445,10 +445,20 @@ public CardHeader appendChild(PostfixAddOn<?> postfixAddOn) {
* @return same card instance
*/
public CardHeader appendChild(PrefixAddOn<?> prefixAddOn) {
mainHeader.get().appendChild(prefixAddOn);
getPrefixElement().appendChild(prefixAddOn);
return this;
}

@Override
public PostfixElement getPostfixElement() {
return PostfixElement.of(mainHeader.get().element());
}

@Override
public PrefixElement getPrefixElement() {
return PrefixElement.of(mainHeader.get().element());
}

/** @dominokit-site-ignore {@inheritDoc} */
@Override
public HTMLDivElement element() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import elemental2.dom.HTMLDivElement;
import elemental2.dom.WheelEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import jsinterop.base.Js;
import org.dominokit.domino.ui.config.CarouselConfig;
Expand Down Expand Up @@ -234,6 +235,11 @@ public Carousel appendChild(Slide slide) {
return this;
}

public Carousel appendChild(Slide... slides) {
Arrays.asList(slides).forEach(this::appendChild);
return this;
}

private void nextSlide() {
Slide nextSlide;
if (slides.indexOf(activeSlide) < slides.size() - 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ public ChipsGroup appendChild(Chip chip) {
return this;
}

public ChipsGroup appendChild(Chip... chips) {
Arrays.asList(chips).forEach(this::appendChild);
return this;
}

/** Enables chips selection */
@Override
public ChipsGroup enable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import elemental2.dom.HTMLDivElement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import org.dominokit.domino.ui.elements.DivElement;
Expand Down Expand Up @@ -79,6 +80,11 @@ public Accordion appendChild(AccordionPanel panel) {
return this;
}

public Accordion appendChild(AccordionPanel... panels) {
Arrays.asList(panels).forEach(this::appendChild);
return this;
}

/**
* Only if the provided AccordionPanel is one of the panels in this accordion toggle the Accordion
* panel open state. if it is open it will be closed and if closed it will open
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static org.dominokit.domino.ui.utils.Domino.*;

import elemental2.dom.*;
import java.util.Arrays;
import org.dominokit.domino.ui.config.AccordionConfig;
import org.dominokit.domino.ui.config.HasComponentConfig;
import org.dominokit.domino.ui.elements.DivElement;
Expand Down Expand Up @@ -104,10 +105,15 @@ public HTMLElement getAppendTarget() {
* @see NavBar
*/
public AccordionPanel appendChild(PostfixAddOn<?> element) {
headerElement.get().appendChild(element.addCss(dui_panel_utility));
getPostfixElement().appendChild(element.addCss(dui_panel_utility));
return this;
}

@Override
public PostfixElement getPostfixElement() {
return PostfixElement.of(headerElement.get().element());
}

/**
* Appends a component or element to the content body header section This will initialize and
* append the content header section if not yet initialized.
Expand All @@ -121,6 +127,11 @@ public AccordionPanel appendChild(HeaderContent<?> element) {
return this;
}

public AccordionPanel appendChild(HeaderContent<?>... elements) {
Arrays.asList(elements).forEach(this::appendChild);
return this;
}

/**
* Appends a component or element to the content body footer section This will initialize and
* append the content footer section if not yet initialized.
Expand All @@ -134,6 +145,11 @@ public AccordionPanel appendChild(FooterContent<?> element) {
return this;
}

public AccordionPanel appendChild(FooterContent<?>... elements) {
Arrays.asList(elements).forEach(this::appendChild);
return this;
}

/** @dominokit-site-ignore {@inheritDoc} */
@Override
public HTMLElement getCollapsibleElement() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.dominokit.domino.ui.forms.IntegerBox;
import org.dominokit.domino.ui.forms.LongBox;
import org.dominokit.domino.ui.forms.ShortBox;
import org.dominokit.domino.ui.icons.Icon;
import org.dominokit.domino.ui.icons.lib.Icons;

/**
* Implementations of this interface can be used to configure defaults for form fields components
Expand Down Expand Up @@ -123,6 +125,15 @@ default boolean isTabFocusSelectArrowEnabled() {
return false;
}

/**
* Use this method to change the default icon for clearable form fields.
*
* @return Icon for clearable fields clear value action.
*/
default Icon<?> clearableInputDefaultIcon() {
return Icons.delete();
}

/**
* Use this method to define the default position of the field label, top or left
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* 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.config;

import java.util.Arrays;
import java.util.Collection;
import org.dominokit.domino.ui.richtext.RichTextActions;

public interface RichTextConfig extends ComponentConfig {

default Collection<RichTextActions> getDefaultRichTextActions() {
return Arrays.asList(RichTextActions.values());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* 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.config;

import org.dominokit.domino.ui.sliders.SliderStyles;
import org.dominokit.domino.ui.style.CssClass;

public interface SlidersConfig extends ComponentConfig {

/**
* @return the default sliders thumb style, one of {@link SliderStyles#dui_slider_thumb_rounded}
* or {@link SliderStyles#dui_slider_thumb_flat}
*/
default CssClass getDefaultSliderThumbStyle() {
return SliderStyles.dui_slider_thumb_rounded;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.function.Supplier;
import org.dominokit.domino.ui.icons.Icon;
import org.dominokit.domino.ui.icons.lib.Icons;
import org.dominokit.domino.ui.tabs.TabsOverflow;

/**
* Implementations of this interface can be used to configure defaults for {@link
Expand All @@ -35,4 +36,14 @@ public interface TabsConfig extends ComponentConfig {
default Supplier<Icon<?>> getDefaultTabCloseIcon() {
return Icons::close;
}

/**
* Use this method to implement the default Tabs overflow behavior. check {@link TabsOverflow} to
* see available behaviors, default to {@link TabsOverflow#WRAP}
*
* @return TabsOverflow behavior.
*/
default TabsOverflow getTabsDefaultOverflowHandler() {
return TabsOverflow.WRAP;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ public interface UIConfig
TimePickerConfig,
DelayedActionConfig,
DatatableConfig,
CarouselConfig {}
CarouselConfig,
RichTextConfig,
SlidersConfig {}
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,11 @@ public ColumnConfig<T> appendChild(IsElement<?> element) {
return this;
}

public ColumnConfig<T> appendChild(IsElement<?>... elements) {
Arrays.asList(elements).forEach(this::appendChild);
return this;
}

/**
* Removes the specified child node from the header element of this column if it is a direct
* child.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.dominokit.domino.ui.utils.Domino.*;

import elemental2.dom.HTMLElement;
import java.util.Arrays;
import org.dominokit.domino.ui.datatable.ColumnConfig;
import org.dominokit.domino.ui.datatable.model.Category;
import org.dominokit.domino.ui.datatable.model.Filter;
Expand Down Expand Up @@ -76,6 +77,11 @@ public SelectHeaderFilter<T> appendChild(SelectOption<String> selectOption) {
return this;
}

public SelectHeaderFilter<T> appendChild(SelectOption<String>... options) {
Arrays.asList(options).forEach(this::appendChild);
return this;
}

/**
* Initializes the header filter and adds event listeners.
*
Expand Down
Loading

0 comments on commit bdbb865

Please sign in to comment.