Skip to content

Commit

Permalink
Merge branch 'release/1.0.2' into 1.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
vegegoku committed Sep 11, 2023
2 parents fb618ea + 927c2db commit 23d2e3f
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 109 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>1.0.1</version>
<version>1.0.2</version>
</parent>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
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>1.0.1</version>
<version>1.0.2</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>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion domino-ui-tools/theme-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>1.0.1</version>
<version>1.0.2</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>1.0.1</version>
<version>1.0.2</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>1.0.1</version>
<version>1.0.2</version>
</parent>

<artifactId>domino-ui</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
import elemental2.dom.HTMLTableCellElement;
import elemental2.dom.HTMLTableRowElement;
import elemental2.dom.HTMLTableSectionElement;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.dominokit.domino.ui.datatable.*;
import org.dominokit.domino.ui.datatable.events.SearchClearedEvent;
import org.dominokit.domino.ui.datatable.events.TableEvent;
Expand All @@ -48,8 +46,8 @@
*/
public class ColumnHeaderFilterPlugin<T> implements DataTablePlugin<T> {

private final Map<String, HeaderFilter> headerFilters = new HashMap<>();
private DominoElement<HTMLTableRowElement> filtersRowElement = DominoElement.of(tr());
private DataTable<T> datatable;

/**
* Create a new instance
Expand All @@ -61,6 +59,11 @@ public static <T> ColumnHeaderFilterPlugin<T> create() {
return new ColumnHeaderFilterPlugin<>();
}

@Override
public void init(DataTable<T> dataTable) {
this.datatable = dataTable;
}

/** {@inheritDoc} */
@Override
public void onAfterAddHeaders(DataTable<T> dataTable) {
Expand Down Expand Up @@ -97,12 +100,6 @@ public void onAfterAddHeaders(DataTable<T> dataTable) {
meta.getHeaderFilter().init(dataTable.getSearchContext(), columnConfig);
th.add(meta.getHeaderFilter());
});
if (headerFilters.containsKey(columnConfig.getName())) {
headerFilters
.get(columnConfig.getName())
.init(dataTable.getSearchContext(), columnConfig);
th.add(headerFilters.get(columnConfig.getName()));
}
ColumnHeaderMeta.get(columnConfig)
.ifPresent(columnHeaderMeta -> columnHeaderMeta.addExtraHeadElement(th));

Expand Down Expand Up @@ -130,26 +127,21 @@ private String bestFitWidth(ColumnConfig<T> columnConfig) {
}
}

/**
* Adds a new header filter to the plugin
*
* @param columnName String, the name of the column we are adding the header filter to.
* @param headerFilter the {@link HeaderFilter}
* @return same instance
* @deprecated use {@link ColumnConfig#applyMeta(org.dominokit.domino.ui.utils.ComponentMeta)} and
* pass {@link ColumnFilterMeta}
*/
@Deprecated
public ColumnHeaderFilterPlugin<T> addHeaderFilter(String columnName, HeaderFilter headerFilter) {
headerFilters.put(columnName, headerFilter);
return this;
}

/** {@inheritDoc} */
@Override
public void handleEvent(TableEvent event) {
if (SearchClearedEvent.SEARCH_EVENT_CLEARED.equals(event.getType())) {
headerFilters.values().forEach(HeaderFilter::clear);
this.datatable
.getTableConfig()
.getFlattenColumns()
.forEach(
col -> {
ColumnFilterMeta.get(col)
.ifPresent(
meta -> {
meta.getHeaderFilter().clear();
});
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,30 @@ public void onHeaderAdded(DataTable<T> dataTable, ColumnConfig<T> column) {
.getHeaderLayout()
.appendChild(FlexItem.create().setOrder(100).appendChild(sortContainer.sortElement));
column.getHeadElement().addCss(Styles.cursor_pointer, Styles.disable_selection);

final boolean[] moving = new boolean[] {false};
column
.getHeadElement()
.addEventListener(
EventType.mousemove.getName(),
evt -> {
moving[0] = true;
})
.addEventListener(
EventType.mousedown.getName(),
evt -> {
moving[0] = false;
});
column
.getHeadElement()
.addEventListener(
EventType.click.getName(),
evt -> {
updateStyles(sortContainer);
fireSortEvent(currentContainer.sortDirection, column);
if (!moving[0]) {
updateStyles(sortContainer);
fireSortEvent(currentContainer.sortDirection, column);
}
moving[0] = false;
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ public T value(V value) {
return (T) this;
}

@Override
public T clear(boolean silent) {
super.clear(silent);
updateCharacterCount();
return (T) this;
}

/** Updates the character count based on field string value */
protected void updateCharacterCount() {
if (maxLength > 0 || minLength > 0) {
Expand Down
67 changes: 0 additions & 67 deletions domino-ui/src/main/java/org/dominokit/domino/ui/layout/Layout.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@
import elemental2.dom.*;
import java.util.ArrayList;
import java.util.List;
import java.util.OptionalInt;
import java.util.function.Consumer;
import jsinterop.base.Js;
import org.dominokit.domino.ui.icons.BaseIcon;
import org.dominokit.domino.ui.mediaquery.MediaQuery;
import org.dominokit.domino.ui.modals.ModalBackDrop;
import org.dominokit.domino.ui.style.ColorScheme;
import org.dominokit.domino.ui.style.Style;
import org.dominokit.domino.ui.themes.Theme;
Expand Down Expand Up @@ -142,70 +139,6 @@ && isFooterVisible()) {
getRightPanel().setZIndex(config().getZindexManager().getNextZIndex());
getNavigationBar().setZIndex(config().getZindexManager().getNextZIndex());
getLeftPanel().setZIndex(config().getZindexManager().getNextZIndex());

config()
.getZindexManager()
.addZIndexListener(
(zInfo) -> {
OptionalInt minModalZIndex =
document.body.querySelectorAll(".modal").asList().stream()
.mapToInt(e -> DominoElement.of(Js.<HTMLElement>uncheckedCast(e)).getZIndex())
.filter(value -> value > -1)
.min();
if (ModalBackDrop.INSTANCE.isAttached()) {
getRightPanel()
.setZIndex(
Math.max(
1,
ModalBackDrop.INSTANCE.getZIndex()
- (config().getZindexIncrement() * 2)));
getNavigationBar()
.setZIndex(
Math.max(
1, ModalBackDrop.INSTANCE.getZIndex() - config().getZindexIncrement()));
if (DominoElement.body().containsCss("l-panel-span-up")) {
getLeftPanel()
.setZIndex(
Math.max(
1,
ModalBackDrop.INSTANCE.getZIndex() - config().getZindexIncrement()));
} else {
getLeftPanel()
.setZIndex(
Math.max(
1,
ModalBackDrop.INSTANCE.getZIndex()
- (config().getZindexIncrement() * 2)));
}
} else if (minModalZIndex.isPresent()) {
getRightPanel()
.setZIndex(
Math.max(
1, minModalZIndex.getAsInt() - (config().getZindexIncrement() * 2)));
getNavigationBar()
.setZIndex(
Math.max(1, minModalZIndex.getAsInt() - config().getZindexIncrement()));
if (DominoElement.body().containsCss("l-panel-span-up")) {
getLeftPanel()
.setZIndex(
Math.max(1, minModalZIndex.getAsInt() - config().getZindexIncrement()));
} else {
getLeftPanel()
.setZIndex(
Math.max(
1, minModalZIndex.getAsInt() - (config().getZindexIncrement() * 2)));
}
} else {
Integer sidePanelsIndex = config().getZindexManager().getNextZIndex();
getRightPanel().setZIndex(sidePanelsIndex);
getNavigationBar().setZIndex(config().getZindexManager().getNextZIndex());
if (DominoElement.body().containsCss("l-panel-span-up")) {
getLeftPanel().setZIndex(config().getZindexManager().getNextZIndex());
} else {
getLeftPanel().setZIndex(sidePanelsIndex);
}
}
});
}

/** @return new Layout instance without a title in the header */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public void flush() {

public DominoCSSRule insertRule(String cssClass) {
String ruleName = cssPrefix + cssClass;
String selector = "." + cssPrefix + target.getDominoId() + " ." + ruleName;
String selector =
"." + cssPrefix + target.getDominoId() + " ." + cssPrefix + DomGlobal.CSS.escape(cssClass);

DominoCSSRule dominoCSSRule = new DominoCSSRule(selector, ruleName);
dominoStyleSheet.addCssRule(dominoCSSRule);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ table th[class*="col-"] {

.table-responsive thead:not([class*="bg-"]),
.table-responsive thead tr:not([class*="bg-"]),
.table-responsive table:not(.table-striped) tbody tr:not([class*="bg-"]),
.table-responsive tbody:not([class*="bg-"]) {
background-color: white;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ body.modal-open {
outline: 0;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
max-height: calc(100vh);
max-height: calc(100vh - 60px);
}

.modal-backdrop {
Expand Down
10 changes: 3 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.dominokit</groupId>
<artifactId>domino-ui-parent</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<packaging>pom</packaging>

<name>domino-ui-parent</name>
Expand Down Expand Up @@ -67,8 +67,8 @@
</modules>

<properties>
<snapshot.version>1.0.1-SNAPSHOT</snapshot.version>
<next.release.version>1.0.1</next.release.version>
<snapshot.version>1.0.2-SNAPSHOT</snapshot.version>
<next.release.version>1.0.2</next.release.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

Expand Down Expand Up @@ -297,10 +297,6 @@
since everything set in the file can't be overwritten via command line -->
<versionDigitToIncrement>${bump.digit}</versionDigitToIncrement>

<!-- Execute mvn verify before release -->
<preReleaseGoals>verify</preReleaseGoals>
<preHotfixGoals>verify</preHotfixGoals>

<!-- Configure branches -->
<gitFlowConfig>
<productionBranch>1.x.x</productionBranch>
Expand Down

0 comments on commit 23d2e3f

Please sign in to comment.