Skip to content

Commit 7cbe3e3

Browse files
authored
Merge pull request #441 from GwtMaterialDesign/release_2.8.0
Release 2.8.0
2 parents 88378ae + 4b507aa commit 7cbe3e3

File tree

15 files changed

+4677
-4119
lines changed

15 files changed

+4677
-4119
lines changed

README.md

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

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

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

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>gwt-material-parent</artifactId>
77
<groupId>com.github.gwtmaterialdesign</groupId>
8-
<version>2.8.1</version>
8+
<version>2.8.3</version>
99
</parent>
1010

1111
<artifactId>gwt-material-addins</artifactId>
@@ -24,7 +24,7 @@
2424
<connection>scm:git:[email protected]:GwtMaterialDesign/gwt-material-addins.git</connection>
2525
<developerConnection>scm:git:[email protected]:GwtMaterialDesign/gwt-material-addins.git</developerConnection>
2626
<url>http://github.com/GwtMaterialDesign/gwt-material-addins</url>
27-
<tag>v2.8.1</tag>
27+
<tag>v2.8.3</tag>
2828
</scm>
2929

3030
<licenses>

src/main/java/gwt/material/design/addins/client/moment/Moment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import gwt.material.design.addins.client.moment.option.CalendarFormat;
2525
import gwt.material.design.addins.client.moment.option.CreationData;
2626
import gwt.material.design.addins.client.moment.option.Duration;
27+
import gwt.material.design.addins.client.moment.option.LocaleOptions;
2728
import gwt.material.design.addins.client.moment.resources.MomentClientBundle;
2829
import gwt.material.design.jquery.client.api.Functions;
2930
import jsinterop.annotations.*;
@@ -943,4 +944,9 @@ public class Moment {
943944
*/
944945
@JsMethod
945946
public native String toJDFString(String format);
947+
948+
public native MomentTimezone tz(String timeZone);
949+
950+
@JsMethod(namespace = "moment")
951+
public static native void updateLocale(String locale, LocaleOptions localeOptions);
946952
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* #%L
3+
* GwtMaterial
4+
* %%
5+
* Copyright (C) 2015 - 2023 GwtMaterialDesign
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package gwt.material.design.addins.client.moment;
21+
22+
import jsinterop.annotations.JsMethod;
23+
import jsinterop.annotations.JsPackage;
24+
import jsinterop.annotations.JsType;
25+
26+
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "moment")
27+
public class MomentTimezone {
28+
29+
public native MomentTimezone zone(String timeZone);
30+
31+
public native String format(String format);
32+
33+
@JsMethod(namespace = "moment.tz")
34+
public static native String guess();
35+
36+
public native MomentTimezone add(int amount, String unit);
37+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* #%L
3+
* GwtMaterial
4+
* %%
5+
* Copyright (C) 2015 - 2023 GwtMaterialDesign
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package gwt.material.design.addins.client.moment.option;
21+
22+
import jsinterop.annotations.JsFunction;
23+
24+
@FunctionalInterface
25+
@JsFunction
26+
public interface FullLocaleFormatter {
27+
28+
String call(Object number, boolean withoutSuffix, String key, boolean isFuture);
29+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* #%L
3+
* GwtMaterial
4+
* %%
5+
* Copyright (C) 2015 - 2023 GwtMaterialDesign
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package gwt.material.design.addins.client.moment.option;
21+
22+
import jsinterop.annotations.JsPackage;
23+
import jsinterop.annotations.JsProperty;
24+
import jsinterop.annotations.JsType;
25+
26+
@JsType(isNative = true, name = "Object", namespace = JsPackage.GLOBAL)
27+
public class LocaleOptions {
28+
29+
@JsProperty
30+
public RelativeTime relativeTime;
31+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* #%L
3+
* GwtMaterial
4+
* %%
5+
* Copyright (C) 2015 - 2023 GwtMaterialDesign
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package gwt.material.design.addins.client.moment.option;
21+
22+
import jsinterop.annotations.JsPackage;
23+
import jsinterop.annotations.JsProperty;
24+
import jsinterop.annotations.JsType;
25+
26+
@JsType(isNative = true, name = "Object", namespace = JsPackage.GLOBAL)
27+
public class RelativeTime {
28+
29+
@JsProperty
30+
public Object future;
31+
32+
@JsProperty
33+
public Object past;
34+
35+
@JsProperty
36+
public Object s;
37+
38+
@JsProperty
39+
public Object ss;
40+
41+
@JsProperty
42+
public Object m;
43+
44+
@JsProperty
45+
public Object mm;
46+
47+
@JsProperty
48+
public Object h;
49+
50+
@JsProperty
51+
public Object hh;
52+
53+
@JsProperty
54+
public Object d;
55+
56+
@JsProperty
57+
public Object dd;
58+
59+
@JsProperty
60+
public Object w;
61+
62+
@JsProperty
63+
public Object ww;
64+
65+
@JsProperty
66+
public Object M;
67+
68+
@JsProperty
69+
public Object MM;
70+
71+
@JsProperty
72+
public Object y;
73+
74+
@JsProperty
75+
public Object yy;
76+
}
77+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* #%L
3+
* GwtMaterial
4+
* %%
5+
* Copyright (C) 2015 - 2023 GwtMaterialDesign
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package gwt.material.design.addins.client.moment.option;
21+
22+
import jsinterop.annotations.JsFunction;
23+
24+
@FunctionalInterface
25+
@JsFunction
26+
public interface SuffixLocaleFormatter {
27+
28+
String call(String number);
29+
}

src/main/java/gwt/material/design/addins/client/moment/resources/MomentClientBundle.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ public interface MomentClientBundle extends ClientBundle {
3535

3636
@Source("js/moment-with-locales.min.js")
3737
TextResource momentWithLocale();
38+
39+
@Source("js/moment.timezone.min.js")
40+
TextResource momentWithTimezone();
3841
}

src/main/java/gwt/material/design/addins/client/moment/resources/MomentClientDebugBundle.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ public interface MomentClientDebugBundle extends ClientBundle {
3535

3636
@Source("js/moment-jdateformatparser.js")
3737
TextResource momentJDateConverterDebugJs();
38+
39+
@Source("js/moment.timezone.js")
40+
TextResource momentWithTimezone();
3841
}

0 commit comments

Comments
 (0)