Skip to content

Commit 7330ceb

Browse files
authored
Merge pull request #279 from GwtMaterialDesign/release_2.1
Release 2.1
2 parents 46a2944 + 7fda23b commit 7330ceb

File tree

384 files changed

+52805
-739
lines changed

Some content is hidden

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

384 files changed

+52805
-739
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ cache:
77
- $HOME/.m2
88
before_install:
99
# install the gwt-material-jquery library before we build the demo
10-
- git clone -b release_2.0.1 https://github.com/GwtMaterialDesign/gwt-material-jquery.git
10+
- git clone -b master https://github.com/GwtMaterialDesign/gwt-material-jquery.git
1111
- cd gwt-material-jquery
1212
- mvn install -DskipTests=true -DdryRun=true
1313
- cd ..
1414
# install the gwt-material library before we build the demo
15-
- git clone -b release_2.0.1 https://github.com/GwtMaterialDesign/gwt-material.git
15+
- git clone -b master https://github.com/GwtMaterialDesign/gwt-material.git
1616
- cd gwt-material
1717
- mvn install -DskipTests=true -DdryRun=true
1818
- cd ..
1919
install: true
2020
before_script:
2121
- chmod +x .utility/*
2222
script:
23-
- mvn clean install -DdryRun=true
23+
- mvn clean install -DdryRun=true -DskipTests=true
2424
after_success:
2525
- .utility/deploy.sh

.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.0.1" ]; then
3+
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; 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 --settings ~/settings.xml
66
fi

README.md

Lines changed: 25 additions & 4 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
9+
## Current Version 2.1
1010
```xml
1111
<dependency>
1212
<groupId>com.github.gwtmaterialdesign</groupId>
1313
<artifactId>gwt-material-addins</artifactId>
14-
<version>2.0.1</version>
14+
<version>2.1</version>
1515
</dependency>
1616
```
1717

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

@@ -46,13 +46,19 @@ xmlns:ma="urn:import:gwt.material.design.addins.client"
4646
| Avatar | [JDenticon](https://github.com/dmester/jdenticon) | 1.3.2 |
4747
| Bubble | N/A | N/A |
4848
| Camera | N/A | N/A |
49+
| Carousel | [SlickJs](https://github.com/kenwheeler/slick) | 1.6.0 |
50+
| Circular Progress | [jquery-circle-progress](https://github.com/kottenator/jquery-circle-progress) | 1.2.2 |
4951
| ComboBox | [Select2](https://github.com/select2/select2) | 4.0.3 |
52+
| CountUp | [CountUpJs](https://github.com/inorganik/countUp.js) | 1.9.0 |
5053
| Cutout | N/A | N/A |
5154
| Document Viewer | N/A | N/A |
5255
| Dnd | [InteractJs](https://github.com/taye/interact.js) | 1.2.6 |
5356
| EmptyState | N/A | N/A |
5457
| File Uploader | [DropzoneJs](https://github.com/enyo/dropzone) | 4.3.0 |
5558
| Icon Morph | N/A | N/A |
59+
| Image Cropper | [CroppieJs](https://github.com/Foliotek/Croppie) | 2.5.0 |
60+
| Input Mask | [JQuery-Mask-Plugin](https://github.com/Foliotek/Croppie) | 1.14.10 |
61+
| Live Stamp | [LiveStamp](https://github.com/mattbradley/livestampjs) | 1.1.2 |
5662
| Masonry | [Masonry](https://github.com/desandro/masonry) | 4.0.0 |
5763
| Menubar | N/A | N/A |
5864
| Overlay | N/A | N/A |
@@ -61,6 +67,7 @@ xmlns:ma="urn:import:gwt.material.design.addins.client"
6167
| Rating | N/A | N/A |
6268
| Rich Editor | [Material Note](https://github.com/Cerealkillerway/materialNote) | 1.2.1 |
6369
| Scrollfire | N/A | N/A |
70+
| Signature Pad | [SignaturePad](https://github.com/szimek/signature_pad) | 2.3.0 |
6471
| SideProfile | N/A | N/A |
6572
| SplitPanel | [TouchSplitterJQuery](https://github.com/colelawrence/Touch-Splitter-jQuery) | 0.5.1 |
6673
| Steppers | N/A | N/A |
@@ -90,5 +97,19 @@ We created [Java Docs](http://gwtmaterialdesign.github.io/gwt-material-demo/apid
9097
``` gwt.material.design.addins.client.addin_widget.resources.img ``` Image Resources of Addins module <br/>
9198
``` gwt.material.design.addins.client.addin_widget.resources.js ``` Javascript Files of Addins module <br/>
9299

100+
### (NEW) Incubator Widgets
101+
- These are beta widgets that still in incubation process (Subject for further API changes).
102+
- Alert
103+
- Async
104+
- Language Selector
105+
- Loading State
106+
- Progress LinedBar
107+
- Google
108+
- Recaptcha
109+
- Address Lookup
110+
- Inline Search
111+
- Timer (Infinite)
112+
- Toggle
113+
93114
##Follow Us
94115
<a href="https://plus.google.com/u/0/communities/108005250093449814286"> Google Plus</a>

pom.xml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@
55
<parent>
66
<artifactId>gwt-material-parent</artifactId>
77
<groupId>com.github.gwtmaterialdesign</groupId>
8-
<version>2.0.1</version>
8+
<version>2.1</version>
99
</parent>
1010

1111
<artifactId>gwt-material-addins</artifactId>
12+
<packaging>gwt-lib</packaging>
1213

1314
<name>Gwt Material Addins</name>
14-
<version>2.0.1</version>
15+
<version>2.1</version>
1516
<description>Extra Components of GWT Material Framework</description>
1617

1718
<properties>
18-
<gwt-material.version>2.0.1</gwt-material.version>
19+
<gwt-material.version>2.1</gwt-material.version>
1920
</properties>
2021

2122
<scm>
2223
<connection>scm:git:[email protected]:GwtMaterialDesign/gwt-material-addins.git</connection>
2324
<developerConnection>scm:git:[email protected]:GwtMaterialDesign/gwt-material-addins.git</developerConnection>
2425
<url>http://github.com/GwtMaterialDesign/gwt-material-addins</url>
25-
<tag>v2.0.1</tag>
26+
<tag>v2.1</tag>
2627
</scm>
2728

2829
<licenses>
@@ -110,7 +111,7 @@
110111
<plugins>
111112
<plugin>
112113
<artifactId>maven-surefire-plugin</artifactId>
113-
<version>2.6</version>
114+
<version>${surefire.version}</version>
114115
<configuration>
115116
<additionalClasspathElements>
116117
<additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement>
@@ -120,15 +121,43 @@
120121
<forkMode>always</forkMode>
121122
<argLine>-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog</argLine>
122123
</configuration>
124+
<executions>
125+
<execution>
126+
<goals>
127+
<goal>test</goal>
128+
</goals>
129+
</execution>
130+
</executions>
123131
</plugin>
124132
<plugin>
125-
<groupId>org.codehaus.mojo</groupId>
133+
<groupId>net.ltgt.gwt.maven</groupId>
126134
<artifactId>gwt-maven-plugin</artifactId>
127-
<version>${gwt.version}</version>
135+
<version>${tbroyer.version}</version>
136+
<extensions>true</extensions>
137+
<configuration>
138+
<moduleName>gwt.material.design.addins.GwtMaterialAddins</moduleName>
139+
<style>OBFUSCATED</style>
140+
<logLevel>INFO</logLevel>
141+
<sourceLevel>1.8</sourceLevel>
142+
<jvmArgs>
143+
<jvmArg>-Xmx1g</jvmArg>
144+
<jvmArg>-Xms1g</jvmArg>
145+
<jvmArg>-XX:CompileThreshold=7000</jvmArg>
146+
</jvmArgs>
147+
<optimize>9</optimize>
148+
<compilerArgs>
149+
<compilerArg>-compileReport</compilerArg>
150+
<compilerArg>-XcompilerMetrics</compilerArg>
151+
</compilerArgs>
152+
<skipModule>true</skipModule>
153+
<classpathScope>compile+runtime</classpathScope>
154+
<failOnError>true</failOnError>
155+
<skipModule>true</skipModule>
156+
</configuration>
128157
<executions>
129158
<execution>
130159
<goals>
131-
<goal>test</goal>
160+
<goal>compile</goal>
132161
</goals>
133162
</execution>
134163
</executions>

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

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import gwt.material.design.client.base.*;
3434
import gwt.material.design.client.base.mixin.*;
3535
import gwt.material.design.client.constants.CssName;
36+
import gwt.material.design.client.constants.FieldType;
3637
import gwt.material.design.client.constants.IconType;
3738
import gwt.material.design.client.constants.ProgressType;
3839
import gwt.material.design.client.ui.MaterialChip;
@@ -159,7 +160,7 @@
159160
*/
160161
// @formatter:on
161162
public class MaterialAutoComplete extends AbstractValueWidget<List<? extends Suggestion>> implements HasPlaceholder,
162-
HasProgress, HasType<AutocompleteType>, HasSelectionHandlers<Suggestion>, HasReadOnly {
163+
HasProgress, HasType<AutocompleteType>, HasSelectionHandlers<Suggestion>, HasReadOnly, HasFieldTypes {
163164

164165
static {
165166
if (MaterialAddins.isDebug()) {
@@ -183,11 +184,12 @@ public class MaterialAutoComplete extends AbstractValueWidget<List<? extends Sug
183184
private MaterialLabel errorLabel = new MaterialLabel();
184185
private MaterialChipProvider chipProvider = new DefaultMaterialChipProvider();
185186

186-
private ErrorMixin<AbstractValueWidget, MaterialLabel> errorMixin;
187+
private StatusTextMixin<AbstractValueWidget, MaterialLabel> statusTextMixin;
187188
private ProgressMixin<MaterialAutoComplete> progressMixin;
188189
private FocusableMixin<MaterialWidget> focusableMixin;
189190
private ReadOnlyMixin<MaterialAutoComplete, TextBox> readOnlyMixin;
190191
private CssTypeMixin<AutocompleteType, MaterialAutoComplete> typeMixin;
192+
private FieldTypeMixin<MaterialAutoComplete> fieldTypeMixin;
191193

192194
/**
193195
* Use MaterialAutocomplete to search for matches from local or remote data
@@ -219,7 +221,7 @@ public MaterialAutoComplete(SuggestOracle suggestions) {
219221
setup(suggestions);
220222
}
221223

222-
private HandlerRegistration listHandler, itemBoxKeyDownHandler, itemBoxBlurHandler, itemBoxClickHandler;
224+
private HandlerRegistration itemBoxKeyDownHandler, itemBoxBlurHandler, itemBoxClickHandler;
223225

224226
@Override
225227
protected void onLoad() {
@@ -229,7 +231,6 @@ protected void onLoad() {
229231
}
230232

231233
protected void loadHandlers() {
232-
listHandler = list.addDomHandler(event -> suggestBox.showSuggestionList(), ClickEvent.getType());
233234

234235
itemBoxBlurHandler = itemBox.addBlurHandler(blurEvent -> {
235236
if (getValue().size() > 0) {
@@ -238,8 +239,6 @@ protected void loadHandlers() {
238239
});
239240

240241
itemBoxKeyDownHandler = itemBox.addKeyDownHandler(event -> {
241-
boolean changed = false;
242-
243242
switch (event.getNativeKeyCode()) {
244243
case KeyCodes.KEY_ENTER:
245244
if (directInputAllowed) {
@@ -248,7 +247,7 @@ protected void loadHandlers() {
248247
gwt.material.design.client.base.Suggestion directInput = new gwt.material.design.client.base.Suggestion();
249248
directInput.setDisplay(value);
250249
directInput.setSuggestion(value);
251-
changed = addItem(directInput);
250+
addItem(directInput);
252251
if (getType() == AutocompleteType.TEXT) {
253252
itemBox.setText(value);
254253
} else {
@@ -266,17 +265,16 @@ protected void loadHandlers() {
266265

267266
if (tryRemoveSuggestion(li.getWidget(0))) {
268267
li.removeFromParent();
269-
changed = true;
270268
}
271269
}
272270
}
273271
}
272+
break;
274273
case KeyCodes.KEY_DELETE:
275274
if (itemBox.getValue().trim().isEmpty()) {
276275
for (ListItem li : itemsHighlighted) {
277276
if (tryRemoveSuggestion(li.getWidget(0))) {
278277
li.removeFromParent();
279-
changed = true;
280278
}
281279
}
282280
itemsHighlighted.clear();
@@ -297,7 +295,6 @@ protected void onUnload() {
297295
}
298296

299297
protected void unloadHandlers() {
300-
removeHandler(listHandler);
301298
removeHandler(itemBoxBlurHandler);
302299
removeHandler(itemBoxKeyDownHandler);
303300
removeHandler(itemBoxClickHandler);
@@ -417,6 +414,13 @@ protected boolean addItem(final Suggestion suggestion) {
417414
return true;
418415
}
419416

417+
@Override
418+
public void reset() {
419+
super.reset();
420+
421+
clear();
422+
}
423+
420424
/**
421425
* Clear the chip items on the autocomplete box
422426
*/
@@ -433,7 +437,7 @@ public void clear() {
433437
}
434438
suggestionMap.clear();
435439

436-
clearErrorOrSuccess();
440+
clearStatusText();
437441
}
438442

439443
@Override
@@ -669,6 +673,26 @@ public boolean isToggleReadOnly() {
669673
return getReadOnlyMixin().isToggleReadOnly();
670674
}
671675

676+
@Override
677+
public void setFieldType(FieldType type) {
678+
getFieldTypeMixin().setFieldType(type);
679+
}
680+
681+
@Override
682+
public FieldType getFieldType() {
683+
return getFieldTypeMixin().getFieldType();
684+
}
685+
686+
@Override
687+
public void setLabelWidth(double percentWidth) {
688+
getFieldTypeMixin().setLabelWidth(percentWidth);
689+
}
690+
691+
@Override
692+
public void setFieldWidth(double percentWidth) {
693+
getFieldTypeMixin().setFieldWidth(percentWidth);
694+
}
695+
672696
/**
673697
* Interface that defines how a {@link MaterialChip} is created, given a
674698
* {@link Suggestion}.
@@ -866,11 +890,11 @@ protected CssTypeMixin<AutocompleteType, MaterialAutoComplete> getTypeMixin() {
866890
}
867891

868892
@Override
869-
public ErrorMixin<AbstractValueWidget, MaterialLabel> getErrorMixin() {
870-
if (errorMixin == null) {
871-
errorMixin = new ErrorMixin<>(this, errorLabel, list, label);
893+
public StatusTextMixin<AbstractValueWidget, MaterialLabel> getStatusTextMixin() {
894+
if (statusTextMixin == null) {
895+
statusTextMixin = new StatusTextMixin<>(this, errorLabel, list, label);
872896
}
873-
return errorMixin;
897+
return statusTextMixin;
874898
}
875899

876900
protected ReadOnlyMixin<MaterialAutoComplete, TextBox> getReadOnlyMixin() {
@@ -887,4 +911,11 @@ protected FocusableMixin<MaterialWidget> getFocusableMixin() {
887911
}
888912
return focusableMixin;
889913
}
914+
915+
protected FieldTypeMixin<MaterialAutoComplete> getFieldTypeMixin() {
916+
if (fieldTypeMixin == null) {
917+
fieldTypeMixin = new FieldTypeMixin<>(this);
918+
}
919+
return fieldTypeMixin;
920+
}
890921
}

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ public void reload() {
9696
load();
9797
}
9898

99+
@Override
100+
public void reset() {
101+
super.reset();
102+
103+
reload();
104+
}
105+
99106
/**
100107
* Replaced by {@link MaterialAvatar#getValue()}
101108
*/
@@ -163,6 +170,4 @@ protected String generateHashCode(String value) {
163170
this.value = value;
164171
return JsAvatar.md5(value);
165172
}
166-
167-
168173
}

0 commit comments

Comments
 (0)