Skip to content

Commit b9530dd

Browse files
committed
Merge branch 'release/1.0-beta-8'
2 parents 3cfd934 + df6bf06 commit b9530dd

File tree

170 files changed

+3122
-1071
lines changed

Some content is hidden

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

170 files changed

+3122
-1071
lines changed

core/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.axellience</groupId>
99
<artifactId>vue-gwt-parent</artifactId>
10-
<version>1.0-beta-7</version>
10+
<version>1.0-beta-8</version>
1111
</parent>
1212

1313
<artifactId>vue-gwt</artifactId>
@@ -23,6 +23,10 @@
2323
<dependencies>
2424

2525
<!-- GWT dependencies -->
26+
<dependency>
27+
<groupId>com.google.gwt</groupId>
28+
<artifactId>gwt-user</artifactId>
29+
</dependency>
2630
<dependency>
2731
<groupId>com.google.jsinterop</groupId>
2832
<artifactId>base</artifactId>

core/src/main/java/com/axellience/vuegwt/core/annotations/component/Component.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.axellience.vuegwt.core.annotations.component;
22

3-
import com.axellience.vuegwt.core.client.component.VueComponent;
3+
import com.axellience.vuegwt.core.client.component.IsVueComponent;
44
import com.axellience.vuegwt.core.client.component.options.CustomizeOptions;
55
import com.axellience.vuegwt.core.client.directive.VueDirective;
66

@@ -29,9 +29,9 @@
2929

3030
/**
3131
* Components to register on this component instance
32-
* @return This list of {@link VueComponent} to register on this Component
32+
* @return This list of {@link IsVueComponent} to register on this Component
3333
*/
34-
Class<? extends VueComponent>[] components() default {};
34+
Class<? extends IsVueComponent>[] components() default {};
3535

3636
/**
3737
* Directives to register on this component instance
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package com.axellience.vuegwt.core.client;
22

3-
import com.axellience.vuegwt.core.client.component.VueComponent;
3+
import com.axellience.vuegwt.core.client.component.IsVueComponent;
44
import com.axellience.vuegwt.core.client.component.options.VueComponentOptions;
55
import com.axellience.vuegwt.core.client.customelement.CustomElementOptions;
66
import com.axellience.vuegwt.core.client.customelement.VueCustomElementType;
77
import com.axellience.vuegwt.core.client.directive.options.VueDirectiveOptions;
88
import com.axellience.vuegwt.core.client.jsnative.jsfunctions.JsRunnable;
99
import com.axellience.vuegwt.core.client.tools.VueGWTTools;
1010
import com.axellience.vuegwt.core.client.vue.VueConfig;
11-
import com.axellience.vuegwt.core.client.vue.VueFactory;
11+
import com.axellience.vuegwt.core.client.vue.VueComponentFactory;
1212
import com.axellience.vuegwt.core.client.vue.VueJsConstructor;
1313
import elemental2.dom.Element;
1414
import jsinterop.annotations.JsMethod;
@@ -31,83 +31,83 @@ public abstract class Vue
3131
/**
3232
* Create a {@link Vue} instance and mount it on a DOM element.
3333
* @param element CSS selector for the element to attach in
34-
* @param vueComponentClass The Class of the Component to create
35-
* @param <T> {@link VueComponent} we want to attach
34+
* @param isVueComponentClass The Class of the Component to create
35+
* @param <T> {@link IsVueComponent} we want to attach
3636
* @return The created and attached instance of our Component
3737
*/
3838
@JsOverlay
39-
public static <T extends VueComponent> T attach(String element, Class<T> vueComponentClass)
39+
public static <T extends IsVueComponent> T attach(String element, Class<T> isVueComponentClass)
4040
{
41-
T vueInstance = createInstance(vueComponentClass);
42-
vueInstance.$mount(element);
41+
T vueInstance = createInstance(isVueComponentClass);
42+
vueInstance.vue().$mount(element);
4343
return vueInstance;
4444
}
4545

4646
/**
4747
* Create a {@link Vue} instance and mount it on a DOM element.
4848
* @param element CSS selector for the element to attach in
4949
* @param vueFactory The factory of the Component to create
50-
* @param <T> {@link VueComponent} we want to attach
50+
* @param <T> {@link IsVueComponent} we want to attach
5151
* @return The created and attached instance of our Component
5252
*/
5353
@JsOverlay
54-
public static <T extends VueComponent> T attach(String element, VueFactory<T> vueFactory)
54+
public static <T extends IsVueComponent> T attach(String element, VueComponentFactory<T> vueFactory)
5555
{
5656
T vueInstance = vueFactory.create();
57-
vueInstance.$mount(element);
57+
vueInstance.vue().$mount(element);
5858
return vueInstance;
5959
}
6060

6161
/**
6262
* Create a {@link Vue} instance and mount it on a DOM element.
6363
* @param element DOM Element we want to attach our component in
64-
* @param vueComponentClass The Class of the Component to create
65-
* @param <T> {@link VueComponent} we want to attach
64+
* @param isVueComponentClass The Class of the Component to create
65+
* @param <T> {@link IsVueComponent} we want to attach
6666
* @return The created and attached instance of our Component
6767
*/
6868
@JsOverlay
69-
public static <T extends VueComponent> T attach(Element element, Class<T> vueComponentClass)
69+
public static <T extends IsVueComponent> T attach(Element element, Class<T> isVueComponentClass)
7070
{
71-
T vueInstance = createInstance(vueComponentClass);
72-
vueInstance.$mount(element);
71+
T vueInstance = createInstance(isVueComponentClass);
72+
vueInstance.vue().$mount(element);
7373
return vueInstance;
7474
}
7575

7676
/**
7777
* Create a {@link Vue} instance and mount it on a DOM element.
7878
* @param element DOM Element we want to attach our component in
7979
* @param vueFactory The factory of the Component to create
80-
* @param <T> {@link VueComponent} we want to attach
80+
* @param <T> {@link IsVueComponent} we want to attach
8181
* @return The created and attached instance of our Component
8282
*/
8383
@JsOverlay
84-
public static <T extends VueComponent> T attach(Element element, VueFactory<T> vueFactory)
84+
public static <T extends IsVueComponent> T attach(Element element, VueComponentFactory<T> vueFactory)
8585
{
8686
T vueInstance = vueFactory.create();
87-
vueInstance.$mount(element);
87+
vueInstance.vue().$mount(element);
8888
return vueInstance;
8989
}
9090

9191
/**
92-
* Register a {@link VueComponent} globally
92+
* Register a {@link IsVueComponent} globally
9393
* @param id Id for our component in the templates
94-
* @param vueComponentClass The Class of the {@link VueComponent} to create
95-
* @param <T> {@link VueComponent} we want to attach
94+
* @param isVueComponentClass The Class of the {@link IsVueComponent} to create
95+
* @param <T> {@link IsVueComponent} we want to attach
9696
*/
9797
@JsOverlay
98-
public static <T extends VueComponent> void component(String id, Class<T> vueComponentClass)
98+
public static <T extends IsVueComponent> void component(String id, Class<T> isVueComponentClass)
9999
{
100-
component(id, VueGWT.getFactory(vueComponentClass));
100+
component(id, VueGWT.getVueComponentFactory(isVueComponentClass));
101101
}
102102

103103
/**
104-
* Register a {@link VueComponent} globally
104+
* Register a {@link IsVueComponent} globally
105105
* @param id Id for our component in the templates
106106
* @param vueFactory The factory of the Component to create
107-
* @param <T> {@link VueComponent} we want to attach
107+
* @param <T> {@link IsVueComponent} we want to attach
108108
*/
109109
@JsOverlay
110-
public static <T extends VueComponent> void component(String id, VueFactory<T> vueFactory)
110+
public static <T extends IsVueComponent> void component(String id, VueComponentFactory<T> vueFactory)
111111
{
112112
component(id, vueFactory.getJsConstructor());
113113
}
@@ -125,61 +125,61 @@ public static void setConfig(VueConfig config)
125125
}
126126

127127
@JsOverlay
128-
public static <T extends VueComponent> VueJsConstructor<T> extendJavaComponent(
128+
public static <T extends IsVueComponent> VueJsConstructor<T> extendJavaComponent(
129129
VueComponentOptions<T> componentOptions)
130130
{
131131
VueJsConstructor<T> extendedVueJsConstructor = extend(componentOptions);
132132
VueGWTTools.extendVueConstructorWithJavaPrototype(extendedVueJsConstructor,
133-
componentOptions.getComponentJavaPrototype());
133+
componentOptions.getComponentExportedTypePrototype());
134134

135135
return extendedVueJsConstructor;
136136
}
137137

138138
@JsOverlay
139-
public static <T extends VueComponent> VueCustomElementType<T> customElement(
140-
String componentTag, Class<T> vueComponentClass)
139+
public static <T extends IsVueComponent> VueCustomElementType<T> customElement(
140+
String componentTag, Class<T> isVueComponentClass)
141141
{
142-
return Vue.customElement(componentTag, vueComponentClass, new CustomElementOptions<>());
142+
return Vue.customElement(componentTag, isVueComponentClass, new CustomElementOptions<>());
143143
}
144144

145145
@JsOverlay
146-
public static <T extends VueComponent> VueCustomElementType<T> customElement(
147-
String componentTag, VueFactory<T> vueFactory)
146+
public static <T extends IsVueComponent> VueCustomElementType<T> customElement(
147+
String componentTag, VueComponentFactory<T> vueFactory)
148148
{
149149
return Vue.customElement(componentTag, vueFactory, new CustomElementOptions<>());
150150
}
151151

152152
@JsOverlay
153-
public static <T extends VueComponent> VueCustomElementType<T> customElement(
153+
public static <T extends IsVueComponent> VueCustomElementType<T> customElement(
154154
String componentTag, VueJsConstructor<T> vueJsConstructor)
155155
{
156156
return Vue.customElement(componentTag, vueJsConstructor, new CustomElementOptions<>());
157157
}
158158

159159
@JsOverlay
160-
public static <T extends VueComponent> VueCustomElementType<T> customElement(
161-
String componentTag, Class<T> vueComponentClass, CustomElementOptions<T> options)
160+
public static <T extends IsVueComponent> VueCustomElementType<T> customElement(
161+
String componentTag, Class<T> isVueComponentClass, CustomElementOptions<T> options)
162162
{
163-
return Vue.customElement(componentTag, VueGWT.getFactory(vueComponentClass), options);
163+
return Vue.customElement(componentTag, VueGWT.getVueComponentFactory(isVueComponentClass), options);
164164
}
165165

166166
@JsOverlay
167-
public static <T extends VueComponent> VueCustomElementType<T> customElement(
168-
String componentTag, VueFactory<T> vueFactory, CustomElementOptions<T> options)
167+
public static <T extends IsVueComponent> VueCustomElementType<T> customElement(
168+
String componentTag, VueComponentFactory<T> vueFactory, CustomElementOptions<T> options)
169169
{
170170
return Vue.customElement(componentTag, vueFactory.getJsConstructor(), options);
171171
}
172172

173173
@JsOverlay
174-
public static <T extends VueComponent> VueCustomElementType<T> customElement(
174+
public static <T extends IsVueComponent> VueCustomElementType<T> customElement(
175175
String componentTag, VueJsConstructor<T> vueJsConstructor, CustomElementOptions<T> options)
176176
{
177177
VueCustomElementLibInjector.ensureInjected();
178178
return Vue.customElementNative(componentTag, vueJsConstructor, options);
179179
}
180180

181181
// @formatter:off
182-
public static native <T extends VueComponent> VueJsConstructor<T> extend(VueComponentOptions<T> componentOptions);
182+
public static native <T extends IsVueComponent> VueJsConstructor<T> extend(VueComponentOptions<T> componentOptions);
183183

184184
public static native void nextTick(JsRunnable callback);
185185

@@ -197,10 +197,10 @@ public static <T extends VueComponent> VueCustomElementType<T> customElement(
197197
public static native VueDirectiveOptions directive(String id);
198198

199199
@JsMethod(name = "customElement")
200-
public static native <T extends VueComponent> VueCustomElementType<T> customElementNative(String componentTag, VueJsConstructor<T> vueJsConstructor, CustomElementOptions options);
200+
public static native <T extends IsVueComponent> VueCustomElementType<T> customElementNative(String componentTag, VueJsConstructor<T> vueJsConstructor, CustomElementOptions options);
201201

202-
public static native <T extends VueComponent> void component(String id, VueComponentOptions<T> componentOptions);
203-
public static native <T extends VueComponent> void component(String id, VueJsConstructor<T> vueJsConstructor);
204-
public static native <T extends VueComponent> VueJsConstructor<T> component(String id);
202+
public static native <T extends IsVueComponent> void component(String id, VueComponentOptions<T> componentOptions);
203+
public static native <T extends IsVueComponent> void component(String id, VueJsConstructor<T> vueJsConstructor);
204+
public static native <T extends IsVueComponent> VueJsConstructor<T> component(String id);
205205
// @formatter:on
206206
}

0 commit comments

Comments
 (0)