Skip to content

Commit 6aa4444

Browse files
authored
Merge pull request #414 from GwtMaterialDesign/release_2.4.0
Release 2.4.0
2 parents ac9836d + abd6b63 commit 6aa4444

File tree

232 files changed

+45192
-14269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+45192
-14269
lines changed

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,20 @@ cache:
88
- $HOME/.m2
99
before_install:
1010
# install the gwt-material-jquery library before we build the demo
11-
- git clone -b release_2.3 https://github.com/GwtMaterialDesign/gwt-material-jquery.git
11+
- git clone -b release_2.4.0 https://github.com/GwtMaterialDesign/gwt-material-jquery.git
1212
- cd gwt-material-jquery
1313
- mvn install -DskipTests=true -DdryRun=true
1414
- cd ..
1515
# install the gwt-material library before we build the demo
16-
- git clone -b release_2.3 https://github.com/GwtMaterialDesign/gwt-material.git
16+
- git clone -b release_2.4.0 https://github.com/GwtMaterialDesign/gwt-material.git
1717
- cd gwt-material
1818
- mvn install -DskipTests=true -DdryRun=true
1919
- cd ..
20+
# install the gwt-material-table library before we build the demo
21+
- git clone -b release_2.4.0 https://github.com/GwtMaterialDesign/gwt-material-table.git
22+
- cd gwt-material-table
23+
- mvn install -DskipTests=true -DdryRun=true
24+
- cd ..
2025
install: true
2126
before_script:
2227
- chmod +x .utility/*

.utility/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
set -ev
3-
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "release_2.3" ]; then
3+
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "release_2.4.0" ]; then
44
echo "<settings><servers><server><id>ossrh</id><username>\${env.OSSRH_USER}</username><password>\${env.OSSRH_PASS}</password></server></servers></settings>" > ~/settings.xml
55
mvn deploy -DskipTests --settings ~/settings.xml
66
fi

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66

77
Gwt Material Design Extra Components for https://github.com/GwtMaterialDesign/gwt-material <br>
88

9-
## Current Version 2.3.0
9+
## Current Version 2.4.0-rc1
1010
```xml
1111
<dependency>
1212
<groupId>com.github.gwtmaterialdesign</groupId>
1313
<artifactId>gwt-material-addins</artifactId>
14-
<version>2.3.0</version>
14+
<version>2.4.0-rc1</version>
1515
</dependency>
1616
```
1717

18-
## Snapshot Version 2.3.1-SNAPSHOT
18+
## Snapshot Version 2.4.0-SNAPSHOT
1919
```xml
2020
<dependency>
2121
<groupId>com.github.gwtmaterialdesign</groupId>
2222
<artifactId>gwt-material-addins</artifactId>
23-
<version>2.3.1-SNAPSHOT</version>
23+
<version>2.4.0-SNAPSHOT</version>
2424
</dependency>
2525
```
2626

@@ -112,4 +112,4 @@ We created [Java Docs](http://gwtmaterialdesign.github.io/gwt-material-demo/apid
112112
- Toggle
113113

114114
## Follow Us
115-
<a href="https://plus.google.com/u/0/communities/108005250093449814286"> Google Plus</a>
115+
<a href="https://plus.google.com/u/0/communities/108005250093449814286"> Google Plus</a>

pom.xml

Lines changed: 64 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@
55
<parent>
66
<artifactId>gwt-material-parent</artifactId>
77
<groupId>com.github.gwtmaterialdesign</groupId>
8-
<version>2.3.0</version>
8+
<version>2.4.0-rc1</version>
99
</parent>
1010

1111
<artifactId>gwt-material-addins</artifactId>
1212
<packaging>gwt-lib</packaging>
1313

1414
<name>Gwt Material Addins</name>
15-
<version>2.3.0</version>
15+
<version>2.4.0-rc1</version>
1616
<description>Extra Components of GWT Material Framework</description>
1717

1818
<properties>
19-
<gwt-material.version>2.3.0</gwt-material.version>
19+
<gwt-material.version>2.4.0-rc1</gwt-material.version>
20+
<maven.failsafe.plugin>2.22.1</maven.failsafe.plugin>
2021
</properties>
2122

2223
<scm>
2324
<connection>scm:git:[email protected]:GwtMaterialDesign/gwt-material-addins.git</connection>
2425
<developerConnection>scm:git:[email protected]:GwtMaterialDesign/gwt-material-addins.git</developerConnection>
2526
<url>http://github.com/GwtMaterialDesign/gwt-material-addins</url>
26-
<tag>v2.3.0</tag>
27+
<tag>v2.4.0-rc1</tag>
2728
</scm>
2829

2930
<licenses>
@@ -54,6 +55,13 @@
5455
<version>${gwt-material.version}</version>
5556
</dependency>
5657

58+
<!-- GwtMaterialTable -->
59+
<dependency>
60+
<groupId>com.github.gwtmaterialdesign</groupId>
61+
<artifactId>gwt-material-table</artifactId>
62+
<version>${gwt-material.version}</version>
63+
</dependency>
64+
5765
<!-- GwtMaterial Test Jar -->
5866
<dependency>
5967
<groupId>com.github.gwtmaterialdesign</groupId>
@@ -89,9 +97,14 @@
8997
<dependency>
9098
<groupId>junit</groupId>
9199
<artifactId>junit</artifactId>
92-
<version>4.11</version>
100+
<version>${junit.version}</version>
93101
<scope>test</scope>
94102
</dependency>
103+
<dependency>
104+
<groupId>net.sourceforge.htmlunit</groupId>
105+
<artifactId>htmlunit</artifactId>
106+
<version>${htmlunit.version}</version>
107+
</dependency>
95108
</dependencies>
96109

97110
<repositories>
@@ -113,22 +126,35 @@
113126
<artifactId>maven-surefire-plugin</artifactId>
114127
<version>${surefire.version}</version>
115128
<configuration>
116-
<additionalClasspathElements>
117-
<additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement>
118-
<additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement>
119-
</additionalClasspathElements>
120-
<useManifestOnlyJar>false</useManifestOnlyJar>
121-
<forkMode>always</forkMode>
122-
<argLine>-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog</argLine>
129+
<excludes>
130+
<exclude>**/**.java</exclude>
131+
</excludes>
123132
</configuration>
124133
<executions>
125134
<execution>
135+
<phase>test</phase>
126136
<goals>
127137
<goal>test</goal>
128138
</goals>
129139
</execution>
130140
</executions>
131141
</plugin>
142+
143+
<plugin>
144+
<!--
145+
The integration-test phase runs after regular test phase (but before verify/install).
146+
We use this to our advantage to peak at the compiled output from the GWTTestSuite
147+
-->
148+
<groupId>org.apache.maven.plugins</groupId>
149+
<artifactId>maven-failsafe-plugin</artifactId>
150+
<version>${maven.failsafe.plugin}</version>
151+
<configuration>
152+
<includes>
153+
<include>**/*.class</include>
154+
</includes>
155+
</configuration>
156+
</plugin>
157+
132158
<plugin>
133159
<groupId>net.ltgt.gwt.maven</groupId>
134160
<artifactId>gwt-maven-plugin</artifactId>
@@ -152,14 +178,39 @@
152178
<skipModule>true</skipModule>
153179
<classpathScope>compile+runtime</classpathScope>
154180
<failOnError>true</failOnError>
155-
<skipModule>true</skipModule>
156181
</configuration>
157182
<executions>
158183
<execution>
184+
<id>compile</id>
159185
<goals>
160186
<goal>compile</goal>
161187
</goals>
162188
</execution>
189+
<execution>
190+
<id>default-test</id>
191+
<goals>
192+
<goal>test</goal>
193+
</goals>
194+
<configuration>
195+
<!--
196+
Because we expressly disable asserts in tests to avoid a compiler bug, we also must run surefire manually
197+
on the JRE tests
198+
-->
199+
<excludes>
200+
<exclude>**/ui/**.java</exclude>
201+
</excludes>
202+
<includes>
203+
<include>**/AddinsTestSuite.java</include>
204+
<include>**/IncubatorTestSuite.java</include>
205+
</includes>
206+
207+
<!-- disable JVM asserts, but enable JS asserts for tests -->
208+
<enableAssertions>false</enableAssertions>
209+
<testArgs>
210+
<testArg>-checkAssertions</testArg>
211+
</testArgs>
212+
</configuration>
213+
</execution>
163214
</executions>
164215
</plugin>
165216
<plugin>

src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
*/
162162
// @formatter:on
163163
public class MaterialAutoComplete extends AbstractValueWidget<List<? extends Suggestion>> implements HasPlaceholder,
164-
HasProgress, HasType<AutocompleteType>, HasSelectionHandlers<Suggestion>, HasReadOnly, HasFieldTypes {
164+
HasProgress, HasType<AutocompleteType>, HasSelectionHandlers<Suggestion>, HasReadOnly, HasFieldTypes, HasLabel {
165165

166166
static {
167167
if (MaterialAddins.isDebug()) {
@@ -349,7 +349,7 @@ protected void setup(SuggestOracle suggestions) {
349349

350350
panel.add(list);
351351
panel.getElement().setAttribute("onclick",
352-
"document.getElementById('" + autocompleteId + "').focus()");
352+
"document.getElementById('" + autocompleteId + "').focus()");
353353
panel.add(errorLabel);
354354
suggestBox.setFocus(true);
355355
}
@@ -487,7 +487,7 @@ public List<String> getItemValues() {
487487

488488
/**
489489
* @param itemValues the itemsSelected to set
490-
* @see #setValue(Object)
490+
* @see #setValue(List, boolean)
491491
*/
492492
public void setItemValues(List<String> itemValues) {
493493
setItemValues(itemValues, false);
@@ -496,7 +496,7 @@ public void setItemValues(List<String> itemValues) {
496496
/**
497497
* @param itemValues the itemsSelected to set
498498
* @param fireEvents will fire value change event if true
499-
* @see #setValue(Object)
499+
* @see #setValue(List, boolean)
500500
*/
501501
public void setItemValues(List<String> itemValues, boolean fireEvents) {
502502
if (itemValues == null) {
@@ -585,17 +585,19 @@ public void setPlaceholder(String placeholder) {
585585
itemBox.getElement().setAttribute("placeholder", placeholder);
586586
}
587587

588-
/**
589-
* @param label
590-
* @see gwt.material.design.client.ui.MaterialValueBox#setLabel(String)
591-
*/
588+
@Override
592589
public void setLabel(String label) {
593590
this.label.setText(label);
594591
if (!getPlaceholder().isEmpty()) {
595592
this.label.setStyleName(CssName.ACTIVE);
596593
}
597594
}
598595

596+
@Override
597+
public String getLabel() {
598+
return label.getText();
599+
}
600+
599601
/**
600602
* Gets the current {@link MaterialChipProvider}. By default, the class uses
601603
* an instance of {@link DefaultMaterialChipProvider}.
@@ -820,7 +822,7 @@ public void setEnabled(boolean enabled) {
820822
itemBox.setEnabled(enabled);
821823
}
822824

823-
public Label getLabel() {
825+
public Label getLabelWidget() {
824826
return label;
825827
}
826828

@@ -930,4 +932,4 @@ protected FieldTypeMixin<MaterialAutoComplete> getFieldTypeMixin() {
930932
}
931933
return fieldTypeMixin;
932934
}
933-
}
935+
}

src/main/java/gwt/material/design/addins/client/avatar/MaterialAvatar.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,11 @@ protected void onLoad() {
8888
@Override
8989
public void load() {
9090
if (options != null) {
91-
loadOption(options);
91+
JsAvatar.config = options;
9292
}
93-
9493
JsAvatar.jdenticon();
9594
}
9695

97-
protected static native void loadOption(AvatarOptions options) /*-{
98-
$wnd.jdenticon_config = options;
99-
}-*/;
100-
10196
@Override
10297
public void unload() {
10398
}
@@ -124,9 +119,7 @@ public String getName() {
124119
}
125120

126121
/**
127-
* Replaced by {@link MaterialAvatar#setValue(Object)}
128-
*
129-
* @param name
122+
* Replaced by {@link MaterialAvatar#setValue(String, boolean)} )}
130123
*/
131124
@Deprecated
132125
public void setName(String name) {

src/main/java/gwt/material/design/addins/client/avatar/js/AvatarOptions.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,21 @@ public final String getReplaceMode() {
126126
* Specifies when icons will be rendered. This option has no effect on Node.js.
127127
* <ul>
128128
* <li>
129-
* "never" – icons are never rendered automatically. You need to call jdenticon.update() manually to render
129+
* {@link ReplaceMode#NEVER} – icons are never rendered automatically. You need to call jdenticon.update() manually to render
130130
* identicons.
131131
* </li>
132132
* <li>
133-
* "once" – icons are rendered once the page has loaded. Any dynamically inserted or modified icons will
133+
* {@link ReplaceMode#ONCE} – icons are rendered once the page has loaded. Any dynamically inserted or modified icons will
134134
* not be rendered unless jdenticon.update() is manually called.
135135
* </li>
136136
* <li>
137-
* "observe" – icons are rendered upon page load, and the DOM is monitored for new icons using a MutationObserver.
137+
* {@link ReplaceMode#OBSERVE} – icons are rendered upon page load, and the DOM is monitored for new icons using a MutationObserver.
138138
* Use this if icons are inserted dynamically, e.g. by using Angular, React or VanillaJS. This option behaves as "once" in IE<11.
139139
* </li>
140140
* </ul>
141141
*/
142142
@JsOverlay
143-
public final void setReplaceMode(String replaceMode) {
144-
this.replaceMode = replaceMode;
143+
public final void setReplaceMode(ReplaceMode replaceMode) {
144+
this.replaceMode = replaceMode.getName();
145145
}
146146
}

src/main/java/gwt/material/design/addins/client/avatar/js/JsAvatar.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@
2222
import gwt.material.design.jquery.client.api.JQueryElement;
2323
import jsinterop.annotations.JsMethod;
2424
import jsinterop.annotations.JsPackage;
25+
import jsinterop.annotations.JsProperty;
2526
import jsinterop.annotations.JsType;
2627

2728
/**
2829
* JSInterop utils for Avatar component
2930
*
3031
* @author kevzlou7979
3132
*/
32-
@JsType(isNative = true)
33+
@JsType(isNative = true, name = "jdenticon", namespace = JsPackage.GLOBAL)
3334
public class JsAvatar extends JQueryElement {
3435

36+
@JsProperty
37+
public static AvatarOptions config;
38+
3539
@JsMethod(namespace = JsPackage.GLOBAL)
3640
public static native void jdenticon();
3741

0 commit comments

Comments
 (0)