diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 732ebf96cb9..f0764fdbe5b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,9 @@ # Summary +All fixes should always target the `master` branch. We will pick the bugfixes +to correct branches from the `master`. + We like quality patches that solve problems. A quality patch follows good coding practices - it’s easy to read and understand. For more complicated fixes or features, the change should be broken down into several smaller easy to understand patches. Most of this is really just what we consider to be common sense and best development practices. In other words: @@ -145,4 +148,6 @@ All our projects accept contributions as GitHub pull requests. The first time yo https://yangsu.github.io/pull-request-tutorial/ has instructions on how to create a pull request. +Please note that PR should target the `master` branch. + **Remember to check the "Allow edits from maintainers" so we can rebase the PR or make small changes if necessary**. diff --git a/README.md b/README.md index df2585c1d80..b1416e0aa44 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ Flow EAP discussion in Gitter IM at https://gitter.im/vaadin-flow/Lobby Instructions on how to set up a working environment for developing the Flow project follow below. +This branch is Vaadin 11 (Flow version 1.1). See other branches for other framework versions: +* master branch is Vaadin 11 (Flow version 1.1) +* 1.0 branch is Vaadin 10 (Flow version 1.0) + Setting up Eclipse to Develop Flow ========= diff --git a/build-tools/pom.xml b/build-tools/pom.xml index c844a989454..1f630b076de 100644 --- a/build-tools/pom.xml +++ b/build-tools/pom.xml @@ -5,7 +5,7 @@ com.vaadin flow-project - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-buildtools vaadin-buildhelpers diff --git a/checkstyle/header b/checkstyle/header index a1063268ac7..ea3e6ddea2f 100644 --- a/checkstyle/header +++ b/checkstyle/header @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/bnd.bnd b/flow-client/bnd.bnd new file mode 100644 index 00000000000..645887fb2a5 --- /dev/null +++ b/flow-client/bnd.bnd @@ -0,0 +1,8 @@ +Bundle-SymbolicName: ${project.groupId}.flow.client +Bundle-Name: Flow Client Engine +Bundle-Version: ${osgi.bundle.version} +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0 +Bundle-Activator: com.vaadin.flow.osgi.Activator +Import-Package: !*, com.vaadin.flow.client, org.osgi.framework, org.osgi.service.http +Export-Package: !* diff --git a/flow-client/pom.xml b/flow-client/pom.xml index 5ee9bcaecc3..f8b988a7f12 100644 --- a/flow-client/pom.xml +++ b/flow-client/pom.xml @@ -1,11 +1,12 @@ - 4.0.0 com.vaadin flow-project - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-client Flow Client @@ -64,6 +65,28 @@ 3.12.0 test + + + org.osgi + org.osgi.core + 6.0.0 + provided + + + + org.osgi + org.osgi.service.component.annotations + 1.4.0 + provided + + + + org.osgi + org.osgi.service.http + 1.2.1 + provided + + @@ -86,9 +109,10 @@ - - com/** - + + com/vaadin/flow/osgi/* + META-INF/** + @@ -171,6 +195,20 @@ + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + false + + true + + + + diff --git a/flow-client/src/main/java/com/vaadin/client/ApplicationConfiguration.java b/flow-client/src/main/java/com/vaadin/client/ApplicationConfiguration.java index 26766d4af68..0d681a943e0 100644 --- a/flow-client/src/main/java/com/vaadin/client/ApplicationConfiguration.java +++ b/flow-client/src/main/java/com/vaadin/client/ApplicationConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,6 +24,7 @@ * values during construction. * * @author Vaadin Ltd + * @since 1.0 */ public class ApplicationConfiguration { private String applicationId; diff --git a/flow-client/src/main/java/com/vaadin/client/ApplicationConnection.java b/flow-client/src/main/java/com/vaadin/client/ApplicationConnection.java index 19f76d714cb..97fa69dfbe7 100644 --- a/flow-client/src/main/java/com/vaadin/client/ApplicationConnection.java +++ b/flow-client/src/main/java/com/vaadin/client/ApplicationConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/main/java/com/vaadin/client/BrowserInfo.java b/flow-client/src/main/java/com/vaadin/client/BrowserInfo.java index c268936441d..c9203632f71 100644 --- a/flow-client/src/main/java/com/vaadin/client/BrowserInfo.java +++ b/flow-client/src/main/java/com/vaadin/client/BrowserInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/main/java/com/vaadin/client/Command.java b/flow-client/src/main/java/com/vaadin/client/Command.java index 48a4d344a96..04c99d08c36 100644 --- a/flow-client/src/main/java/com/vaadin/client/Command.java +++ b/flow-client/src/main/java/com/vaadin/client/Command.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * A generic command interface meant to be used for passing lambdas around. * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface Command { diff --git a/flow-client/src/main/java/com/vaadin/client/Console.java b/flow-client/src/main/java/com/vaadin/client/Console.java index a4c9b27d337..434e873509b 100644 --- a/flow-client/src/main/java/com/vaadin/client/Console.java +++ b/flow-client/src/main/java/com/vaadin/client/Console.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,6 +26,7 @@ * production mode is enabled. * * @author Vaadin Ltd + * @since 1.0 */ public final class Console { private static boolean shouldLogToBrowserConsole; diff --git a/flow-client/src/main/java/com/vaadin/client/DefaultRegistry.java b/flow-client/src/main/java/com/vaadin/client/DefaultRegistry.java index 9ecf983857a..8b9f0087889 100644 --- a/flow-client/src/main/java/com/vaadin/client/DefaultRegistry.java +++ b/flow-client/src/main/java/com/vaadin/client/DefaultRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,6 +35,7 @@ * A registry implementation used by {@link ApplicationConnection}. * * @author Vaadin Ltd + * @since 1.0 */ public class DefaultRegistry extends Registry { diff --git a/flow-client/src/main/java/com/vaadin/client/DependencyLoader.java b/flow-client/src/main/java/com/vaadin/client/DependencyLoader.java index 364ec185a43..e3e52e75eb7 100644 --- a/flow-client/src/main/java/com/vaadin/client/DependencyLoader.java +++ b/flow-client/src/main/java/com/vaadin/client/DependencyLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * Handles loading of dependencies (stylesheets and scripts) in the application. * * @author Vaadin Ltd + * @since 1.0 */ public class DependencyLoader { private static final JsArray callbacks = JsCollections.array(); diff --git a/flow-client/src/main/java/com/vaadin/client/ExecuteJavaScriptElementUtils.java b/flow-client/src/main/java/com/vaadin/client/ExecuteJavaScriptElementUtils.java index bb1758c3a1d..ba4487f00af 100644 --- a/flow-client/src/main/java/com/vaadin/client/ExecuteJavaScriptElementUtils.java +++ b/flow-client/src/main/java/com/vaadin/client/ExecuteJavaScriptElementUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -36,6 +36,7 @@ * @see ExecuteJavaScriptProcessor * * @author Vaadin Ltd + * @since 1.0 * */ public final class ExecuteJavaScriptElementUtils { diff --git a/flow-client/src/main/java/com/vaadin/client/ExistingElementMap.java b/flow-client/src/main/java/com/vaadin/client/ExistingElementMap.java index 3876703fd84..c742d7903ae 100644 --- a/flow-client/src/main/java/com/vaadin/client/ExistingElementMap.java +++ b/flow-client/src/main/java/com/vaadin/client/ExistingElementMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,6 +26,7 @@ * attach existing client side element. * * @author Vaadin Ltd + * @since 1.0 * */ public class ExistingElementMap { diff --git a/flow-client/src/main/java/com/vaadin/client/InitialPropertiesHandler.java b/flow-client/src/main/java/com/vaadin/client/InitialPropertiesHandler.java index 10d5af7cf31..9c8fe8fde83 100644 --- a/flow-client/src/main/java/com/vaadin/client/InitialPropertiesHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/InitialPropertiesHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -38,6 +38,7 @@ * any client side default value. * * @author Vaadin Ltd + * @since 1.0 * @see StateTree#sendNodePropertySyncToServer(MapProperty) * */ diff --git a/flow-client/src/main/java/com/vaadin/client/LoadingIndicator.java b/flow-client/src/main/java/com/vaadin/client/LoadingIndicator.java index 42e8c9639c9..8a26f965fa8 100644 --- a/flow-client/src/main/java/com/vaadin/client/LoadingIndicator.java +++ b/flow-client/src/main/java/com/vaadin/client/LoadingIndicator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,7 +31,7 @@ * timeouts specified using the set*StateDelay methods occur. * * @author Vaadin Ltd - * @since 7.1 + * @since 1.0 */ public class LoadingIndicator { @@ -209,7 +209,6 @@ public void trigger() { * Triggers displaying of this loading indicator unless it's already visible * or scheduled to be shown after a delay. * - * @since 7.4 */ public void ensureTriggered() { if (!isVisible() && !firstTimer.isRunning()) { diff --git a/flow-client/src/main/java/com/vaadin/client/PolymerUtils.java b/flow-client/src/main/java/com/vaadin/client/PolymerUtils.java index dd2457023bc..0318d2f3c43 100644 --- a/flow-client/src/main/java/com/vaadin/client/PolymerUtils.java +++ b/flow-client/src/main/java/com/vaadin/client/PolymerUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -45,7 +45,8 @@ * Utils class, intended to ease working with Polymer related code on a client * side. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. */ public final class PolymerUtils { diff --git a/flow-client/src/main/java/com/vaadin/client/PopStateHandler.java b/flow-client/src/main/java/com/vaadin/client/PopStateHandler.java index 5b35742eebc..a0cbd3e07a0 100644 --- a/flow-client/src/main/java/com/vaadin/client/PopStateHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/PopStateHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,6 +27,7 @@ * Handles popstate events and sends them to the server. * * @author Vaadin Ltd + * @since 1.0 */ public class PopStateHandler { diff --git a/flow-client/src/main/java/com/vaadin/client/Profiler.java b/flow-client/src/main/java/com/vaadin/client/Profiler.java index 209484bad52..c6b1f9f5321 100644 --- a/flow-client/src/main/java/com/vaadin/client/Profiler.java +++ b/flow-client/src/main/java/com/vaadin/client/Profiler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -39,7 +39,7 @@ * your .gwt.xml file. * * @author Vaadin Ltd - * @since 7.0.0 + * @since 1.0 */ public class Profiler { @@ -53,7 +53,7 @@ public class Profiler { * Class to include using deferred binding to enable the profiling. * * @author Vaadin Ltd - * @since 7.0.0 + * @since 1.0 */ public static class EnabledProfiler extends Profiler { @@ -68,8 +68,8 @@ protected boolean isImplEnabled() { *

* Warning! This interface is most likely to change in the future * - * @since 7.1 * @author Vaadin Ltd + * @since 1.0 */ public interface ProfilerResultConsumer { void addProfilerData(Node rootNode, List totals); @@ -382,7 +382,6 @@ public static void leave(String name) { * * @return the relative time in milliseconds * - * @since 7.6 */ public static double getRelativeTimeMillis() { return relativeTimeSupplier.getRelativeTime(); @@ -429,7 +428,6 @@ public static void reset() { * been included in the HTML page and that would leak memory unless removed. *

* - * @since 7.0.2 */ public static void initialize() { if (hasHighPrecisionTime()) { @@ -661,7 +659,6 @@ private static native JsArray clearEventsList() * Warning! This is internal API and should not be used by * applications or add-ons. * - * @since 7.1.4 * @param profilerResultConsumer * the consumer that gets profiler data */ diff --git a/flow-client/src/main/java/com/vaadin/client/Registry.java b/flow-client/src/main/java/com/vaadin/client/Registry.java index 99e9e7e4206..4e383de0ef1 100644 --- a/flow-client/src/main/java/com/vaadin/client/Registry.java +++ b/flow-client/src/main/java/com/vaadin/client/Registry.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -37,6 +37,7 @@ * be looked up based on their class. * * @author Vaadin Ltd + * @since 1.0 */ public class Registry { diff --git a/flow-client/src/main/java/com/vaadin/client/ResourceLoader.java b/flow-client/src/main/java/com/vaadin/client/ResourceLoader.java index a9b43cb47b0..8c4b081ce28 100644 --- a/flow-client/src/main/java/com/vaadin/client/ResourceLoader.java +++ b/flow-client/src/main/java/com/vaadin/client/ResourceLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -45,7 +45,7 @@ * while still controlling in which order e.g. scripts are executed. * * @author Vaadin Ltd - * @since 7.0.0 + * @since 1.0 */ public class ResourceLoader { private class StyleSheetLoadListener implements ResourceLoadListener { @@ -291,7 +291,6 @@ public void loadScript(final String scriptUrl, * What mode the script.async attribute should be set to * @param defer * What mode the script.defer attribute should be set to - * @since 7.2.4 */ public void loadScript(final String scriptUrl, final ResourceLoadListener resourceLoadListener, boolean async, @@ -471,7 +470,6 @@ private static native void addHtmlImportsReadyHandler(Runnable handler) * script tag. The listener is called whenever loading is complete or an * error occurred. * - * @since 7.3 * @param element * the element to attach a listener to * @param listener diff --git a/flow-client/src/main/java/com/vaadin/client/ScrollPositionHandler.java b/flow-client/src/main/java/com/vaadin/client/ScrollPositionHandler.java index bcd2c5a1b89..4a669685c6a 100644 --- a/flow-client/src/main/java/com/vaadin/client/ScrollPositionHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/ScrollPositionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -49,6 +49,7 @@ * linked to a specific history index. * * @author Vaadin Ltd + * @since 1.0 */ public class ScrollPositionHandler { diff --git a/flow-client/src/main/java/com/vaadin/client/SystemErrorHandler.java b/flow-client/src/main/java/com/vaadin/client/SystemErrorHandler.java index ecbc05d623a..d678fe4d48b 100644 --- a/flow-client/src/main/java/com/vaadin/client/SystemErrorHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/SystemErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,6 +31,7 @@ * Class handling system errors in the application. * * @author Vaadin Ltd + * @since 1.0 */ public class SystemErrorHandler { diff --git a/flow-client/src/main/java/com/vaadin/client/TrackingScheduler.java b/flow-client/src/main/java/com/vaadin/client/TrackingScheduler.java index 9a68c675570..0290074fd22 100644 --- a/flow-client/src/main/java/com/vaadin/client/TrackingScheduler.java +++ b/flow-client/src/main/java/com/vaadin/client/TrackingScheduler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ * queued or currently being executed. * * @author Vaadin Ltd + * @since 1.0 */ public class TrackingScheduler extends SchedulerImpl { diff --git a/flow-client/src/main/java/com/vaadin/client/UILifecycle.java b/flow-client/src/main/java/com/vaadin/client/UILifecycle.java index fbb5a279da1..c129e532e04 100644 --- a/flow-client/src/main/java/com/vaadin/client/UILifecycle.java +++ b/flow-client/src/main/java/com/vaadin/client/UILifecycle.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,6 +27,7 @@ * Class managing the lifecycle of a UI. * * @author Vaadin Ltd + * @since 1.0 */ public class UILifecycle { diff --git a/flow-client/src/main/java/com/vaadin/client/URIResolver.java b/flow-client/src/main/java/com/vaadin/client/URIResolver.java index a0f212dce48..5f2072d73b9 100644 --- a/flow-client/src/main/java/com/vaadin/client/URIResolver.java +++ b/flow-client/src/main/java/com/vaadin/client/URIResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,6 +24,7 @@ * Client side URL resolver for vaadin protocols. * * @author Vaadin Ltd + * @since 1.0 */ public class URIResolver extends VaadinUriResolver { private transient Registry registry; diff --git a/flow-client/src/main/java/com/vaadin/client/ValueMap.java b/flow-client/src/main/java/com/vaadin/client/ValueMap.java index eb0add1e517..b60816d0d36 100644 --- a/flow-client/src/main/java/com/vaadin/client/ValueMap.java +++ b/flow-client/src/main/java/com/vaadin/client/ValueMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ * Old abstraction for a UIDL JSON message. * * @author Vaadin Ltd + * @since 1.0 */ public final class ValueMap extends JavaScriptObject { /** diff --git a/flow-client/src/main/java/com/vaadin/client/WidgetUtil.java b/flow-client/src/main/java/com/vaadin/client/WidgetUtil.java index 4f850f56ebc..f70c5e16b9e 100644 --- a/flow-client/src/main/java/com/vaadin/client/WidgetUtil.java +++ b/flow-client/src/main/java/com/vaadin/client/WidgetUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -43,7 +43,6 @@ public static void refresh() { * Redirects the browser to the given url or refreshes the page if url is * null * - * @since 7.6 * @param url * The url to redirect to or null to refresh */ diff --git a/flow-client/src/main/java/com/vaadin/client/bootstrap/Bootstrapper.java b/flow-client/src/main/java/com/vaadin/client/bootstrap/Bootstrapper.java index d3d9fd1203d..3bff2be4ead 100644 --- a/flow-client/src/main/java/com/vaadin/client/bootstrap/Bootstrapper.java +++ b/flow-client/src/main/java/com/vaadin/client/bootstrap/Bootstrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -38,6 +38,7 @@ * Acts as the GWT entry point. * * @author Vaadin Ltd + * @since 1.0 */ public class Bootstrapper implements EntryPoint { diff --git a/flow-client/src/main/java/com/vaadin/client/bootstrap/ErrorMessage.java b/flow-client/src/main/java/com/vaadin/client/bootstrap/ErrorMessage.java index 07225c4ce96..65bcce98587 100644 --- a/flow-client/src/main/java/com/vaadin/client/bootstrap/ErrorMessage.java +++ b/flow-client/src/main/java/com/vaadin/client/bootstrap/ErrorMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -20,7 +20,6 @@ /** * Wraps a native javascript object containing fields for an error message * - * @since 7.0 */ public final class ErrorMessage extends JavaScriptObject { diff --git a/flow-client/src/main/java/com/vaadin/client/bootstrap/JsoConfiguration.java b/flow-client/src/main/java/com/vaadin/client/bootstrap/JsoConfiguration.java index ec4684c94c2..2530dabdbef 100644 --- a/flow-client/src/main/java/com/vaadin/client/bootstrap/JsoConfiguration.java +++ b/flow-client/src/main/java/com/vaadin/client/bootstrap/JsoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,7 +21,6 @@ /** * Helper class for reading configuration options from the bootstrap javascript * - * @since 7.0 */ public final class JsoConfiguration extends JavaScriptObject { protected JsoConfiguration() { diff --git a/flow-client/src/main/java/com/vaadin/client/bootstrap/LocationParser.java b/flow-client/src/main/java/com/vaadin/client/bootstrap/LocationParser.java index e59a448082e..6fece7c986a 100644 --- a/flow-client/src/main/java/com/vaadin/client/bootstrap/LocationParser.java +++ b/flow-client/src/main/java/com/vaadin/client/bootstrap/LocationParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Utility methods for parsing the document URL. * * @author Vaadin Ltd + * @since 1.0 */ public class LocationParser { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java b/flow-client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java index 7af56cc9a20..4a477f52393 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -37,7 +37,7 @@ * handling the communication channel. * * @author Vaadin Ltd - * @since 7.1 + * @since 1.0 */ public class AtmospherePushConnection implements PushConnection { @@ -312,7 +312,6 @@ protected void onOpen(AtmosphereResponse response) { * @param response * the response * - * @since 7.2 */ protected void onConnect(AtmosphereResponse response) { transport = response.getTransport(); diff --git a/flow-client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java b/flow-client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java index 7cd0a014cb9..807b9e4845e 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,8 +28,8 @@ * push connections in a way it sees fit. The default implementation is * {@link DefaultConnectionStateHandler}. * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public interface ConnectionStateHandler { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java b/flow-client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java index 4ee4edc0bdb..36dd41e37f8 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -40,8 +40,8 @@ * Handles permanent errors by showing a critical system notification to the * user * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public class DefaultConnectionStateHandler implements ConnectionStateHandler { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java b/flow-client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java index 6c2ac249e58..912230897a0 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,8 +26,8 @@ /** * The default implementation of the reconnect dialog * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public class DefaultReconnectDialog implements ReconnectDialog { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/Heartbeat.java b/flow-client/src/main/java/com/vaadin/client/communication/Heartbeat.java index fa0b0db5c46..aa5769f0d8d 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/Heartbeat.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/Heartbeat.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,8 +26,8 @@ /** * Handles sending of heartbeats to the server and reacting to the response * - * @since 7.2 * @author Vaadin Ltd + * @since 1.0 */ public class Heartbeat { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/LoadingIndicatorConfigurator.java b/flow-client/src/main/java/com/vaadin/client/communication/LoadingIndicatorConfigurator.java index 106f6b2b4da..2279e7e9172 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/LoadingIndicatorConfigurator.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/LoadingIndicatorConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,6 +29,7 @@ * configures the loading indicator accordingly. * * @author Vaadin Ltd + * @since 1.0 */ public class LoadingIndicatorConfigurator { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java b/flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java index f4990935b28..1cc3d4e3bc0 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -49,8 +49,8 @@ * from the server (state changes, RPCs and other updates) and ensuring that the * connectors are updated accordingly. * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public class MessageHandler { @@ -701,7 +701,6 @@ public boolean isInitialUidlHandled() { * * If the given string is not wrapped as expected, returns null * - * @since 7.6 * @param jsonWithWrapping * the JSON received from the server * @return an unwrapped JSON string or null if the given string was not diff --git a/flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java b/flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java index d15101f9e4c..7c372e1f142 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,8 +31,8 @@ * Internally uses {@link XhrConnection} and/or {@link PushConnection} for * delivering messages, depending on the application configuration. * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public class MessageSender { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/PollConfigurator.java b/flow-client/src/main/java/com/vaadin/client/communication/PollConfigurator.java index 50750d5db26..e7cdc796b0b 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/PollConfigurator.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/PollConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,6 +26,7 @@ * polling accordingly. * * @author Vaadin Ltd + * @since 1.0 */ public class PollConfigurator { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/Poller.java b/flow-client/src/main/java/com/vaadin/client/communication/Poller.java index ac7c2abec24..f87edf0bd48 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/Poller.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/Poller.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,6 +24,7 @@ * Handles polling the server with a given interval. * * @author Vaadin Ltd + * @since 1.0 */ public class Poller { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/PushConfiguration.java b/flow-client/src/main/java/com/vaadin/client/communication/PushConfiguration.java index 9708250d61d..50a77d187ce 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/PushConfiguration.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/PushConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -34,6 +34,7 @@ * {@link MessageSender}. * * @author Vaadin Ltd + * @since 1.0 */ public class PushConfiguration { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/PushConnection.java b/flow-client/src/main/java/com/vaadin/client/communication/PushConnection.java index 042f0f439c0..0ce4362f757 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/PushConnection.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/PushConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,7 +27,7 @@ * to a UIDL request). * * @author Vaadin Ltd - * @since 7.1 + * @since 1.0 */ public interface PushConnection { @@ -86,7 +86,6 @@ public interface PushConnection { * Returns a human readable string representation of the transport type used * to communicate with the server. * - * @since 7.1 * @return A human readable string representation of the transport type */ String getTransportType(); @@ -99,7 +98,6 @@ public interface PushConnection { * A bidirectional push connection must be able to reliably inform about its * connection state. * - * @since 7.6 * @return true if the push connection should be used for messages in both * directions, false if it should only be used for server to client * messages diff --git a/flow-client/src/main/java/com/vaadin/client/communication/PushConnectionFactory.java b/flow-client/src/main/java/com/vaadin/client/communication/PushConnectionFactory.java index 1ad97f42eea..300cfe9ddac 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/PushConnectionFactory.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/PushConnectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java b/flow-client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java index 5bebeec2f38..336ae3742ff 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -18,8 +18,8 @@ /** * Interface which must be implemented by the reconnect dialog. * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public interface ReconnectDialog { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/ReconnectDialogConfiguration.java b/flow-client/src/main/java/com/vaadin/client/communication/ReconnectDialogConfiguration.java index c5e05d75e7d..f403096d03f 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/ReconnectDialogConfiguration.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/ReconnectDialogConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,6 +30,7 @@ * part of the configuration changes. * * @author Vaadin Ltd + * @since 1.0 */ public class ReconnectDialogConfiguration { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/RequestResponseTracker.java b/flow-client/src/main/java/com/vaadin/client/communication/RequestResponseTracker.java index 3e1b36d6340..291e444ff16 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/RequestResponseTracker.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/RequestResponseTracker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -32,6 +32,7 @@ * response handling ends. * * @author Vaadin Ltd + * @since 1.0 */ public class RequestResponseTracker { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/RequestStartingEvent.java b/flow-client/src/main/java/com/vaadin/client/communication/RequestStartingEvent.java index 066ab3e0da5..9e0ef6a45df 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/RequestStartingEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/RequestStartingEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,6 +24,7 @@ * @see RequestResponseTracker#startRequest() * * @author Vaadin Ltd + * @since 1.0 */ public class RequestStartingEvent extends Event { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/ResponseHandlingEndedEvent.java b/flow-client/src/main/java/com/vaadin/client/communication/ResponseHandlingEndedEvent.java index 0d273ce323c..049607b4ac1 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/ResponseHandlingEndedEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/ResponseHandlingEndedEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ * Event fired when handling of a response ends. * * @author Vaadin Ltd + * @since 1.0 */ public class ResponseHandlingEndedEvent extends Event { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/ResponseHandlingStartedEvent.java b/flow-client/src/main/java/com/vaadin/client/communication/ResponseHandlingStartedEvent.java index e9062c3ab50..6e0f9901c3a 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/ResponseHandlingStartedEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/ResponseHandlingStartedEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ * Event fired when handling of a response starts. * * @author Vaadin Ltd + * @since 1.0 */ public class ResponseHandlingStartedEvent extends Event { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/ServerConnector.java b/flow-client/src/main/java/com/vaadin/client/communication/ServerConnector.java index 5fa24fd7b16..c3d5f937fce 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/ServerConnector.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/ServerConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java b/flow-client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java index eefb1a8a112..6f722a6d205 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,8 +27,8 @@ * Manages the queue of server invocations (RPC) which are waiting to be sent to * the server. * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public class ServerRpcQueue { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/XhrConnection.java b/flow-client/src/main/java/com/vaadin/client/communication/XhrConnection.java index 7a221467a19..5f07c8f8d3f 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/XhrConnection.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/XhrConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,8 +35,8 @@ * Provides a connection to the UIDL request handler on the server and knows how * to send messages to that end point. * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public class XhrConnection { diff --git a/flow-client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java b/flow-client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java index 062b7cff6e8..b370010f5e1 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -23,8 +23,8 @@ * XhrConnectionError provides detail about an error which occurred during an * XHR request to the server. * - * @since 7.6 * @author Vaadin Ltd + * @since 1.0 */ public class XhrConnectionError { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/ConstantPool.java b/flow-client/src/main/java/com/vaadin/client/flow/ConstantPool.java index 2aa75476b94..6cc9daf7ce5 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/ConstantPool.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/ConstantPool.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,6 +26,7 @@ * Map of constant values received from the server. * * @author Vaadin Ltd + * @since 1.0 */ public class ConstantPool { private JsMap constants = JsCollections.map(); diff --git a/flow-client/src/main/java/com/vaadin/client/flow/ExecuteJavaScriptProcessor.java b/flow-client/src/main/java/com/vaadin/client/flow/ExecuteJavaScriptProcessor.java index 1860f4bbd17..2a7dd784475 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/ExecuteJavaScriptProcessor.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/ExecuteJavaScriptProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -38,6 +38,7 @@ * client. * * @author Vaadin Ltd + * @since 1.0 */ public class ExecuteJavaScriptProcessor { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/FragmentHandler.java b/flow-client/src/main/java/com/vaadin/client/flow/FragmentHandler.java index 6c6a44f88ec..e1b5e2d8a69 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/FragmentHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/FragmentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * override the location. * * @author Vaadin Ltd + * @since 1.0 */ public class FragmentHandler { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/NodeUnregisterEvent.java b/flow-client/src/main/java/com/vaadin/client/flow/NodeUnregisterEvent.java index b9deb043aeb..3ab5014e011 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/NodeUnregisterEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/NodeUnregisterEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Event fired when a state node is unregistered. * * @author Vaadin Ltd + * @since 1.0 */ public class NodeUnregisterEvent { private StateNode node; diff --git a/flow-client/src/main/java/com/vaadin/client/flow/NodeUnregisterListener.java b/flow-client/src/main/java/com/vaadin/client/flow/NodeUnregisterListener.java index 264dac92d33..0e7daa1467e 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/NodeUnregisterListener.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/NodeUnregisterListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * A listener that will be notified when a state node is unregistered. * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface NodeUnregisterListener { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/RouterLinkHandler.java b/flow-client/src/main/java/com/vaadin/client/flow/RouterLinkHandler.java index ae88a748b1e..81c18b61e01 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/RouterLinkHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/RouterLinkHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -36,6 +36,7 @@ * Events are sent to server for handling. * * @author Vaadin Ltd + * @since 1.0 */ public class RouterLinkHandler { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/StateNode.java b/flow-client/src/main/java/com/vaadin/client/flow/StateNode.java index 22e9832283b..29654c356cb 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/StateNode.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/StateNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,6 +35,7 @@ * A client-side representation of a server-side state node. * * @author Vaadin Ltd + * @since 1.0 */ public class StateNode { private final StateTree tree; diff --git a/flow-client/src/main/java/com/vaadin/client/flow/StateTree.java b/flow-client/src/main/java/com/vaadin/client/flow/StateTree.java index d1fc77344ed..2b8c7b05f97 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/StateTree.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/StateTree.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * A client-side representation of a server-side state tree. * * @author Vaadin Ltd + * @since 1.0 */ public class StateTree { // Double instead of Integer since GWT 2.8 doesn't box doubles diff --git a/flow-client/src/main/java/com/vaadin/client/flow/TreeChangeProcessor.java b/flow-client/src/main/java/com/vaadin/client/flow/TreeChangeProcessor.java index e76701adbab..63e515c8eb4 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/TreeChangeProcessor.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/TreeChangeProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * Updates a state tree based on changes in JSON format. * * @author Vaadin Ltd + * @since 1.0 */ public class TreeChangeProcessor { private TreeChangeProcessor() { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/binding/Binder.java b/flow-client/src/main/java/com/vaadin/client/flow/binding/Binder.java index 0695a9507e3..0eb85fdcc49 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/binding/Binder.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/binding/Binder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,6 +29,7 @@ * This is the only public API class for external use. * * @author Vaadin Ltd + * @since 1.0 * */ public final class Binder { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/binding/BinderContext.java b/flow-client/src/main/java/com/vaadin/client/flow/binding/BinderContext.java index f1c7efc3509..525fb0ddc5c 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/binding/BinderContext.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/binding/BinderContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,6 +27,7 @@ * enabling them to delegate the creation of any child nodes. * * @author Vaadin Ltd + * @since 1.0 * */ public interface BinderContext { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/binding/BindingStrategy.java b/flow-client/src/main/java/com/vaadin/client/flow/binding/BindingStrategy.java index d327479618d..34911254579 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/binding/BindingStrategy.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/binding/BindingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -32,6 +32,7 @@ * a DOM node type which strategy is applicable for * * @author Vaadin Ltd + * @since 1.0 * */ public interface BindingStrategy { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/binding/Debouncer.java b/flow-client/src/main/java/com/vaadin/client/flow/binding/Debouncer.java index 75743979352..94dcdfb15f2 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/binding/Debouncer.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/binding/Debouncer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -32,6 +32,7 @@ * tracks a sequence of similar events. * * @author Vaadin Ltd + * @since 1.0 */ public class Debouncer { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/binding/ServerEventHandlerBinder.java b/flow-client/src/main/java/com/vaadin/client/flow/binding/ServerEventHandlerBinder.java index 56e7d0ef996..ca65292f96f 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/binding/ServerEventHandlerBinder.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/binding/ServerEventHandlerBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,6 +29,7 @@ * Binds and updates server object able to send notifications to the server. * * @author Vaadin Ltd + * @since 1.0 */ public class ServerEventHandlerBinder { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/binding/ServerEventObject.java b/flow-client/src/main/java/com/vaadin/client/flow/binding/ServerEventObject.java index a72bfa496d0..4985d08c54d 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/binding/ServerEventObject.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/binding/ServerEventObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -40,6 +40,7 @@ * A representation of a server object able to send notifications to the server. * * @author Vaadin Ltd + * @since 1.0 */ public final class ServerEventObject extends JavaScriptObject { private static final String NODE_ID = "nodeId"; diff --git a/flow-client/src/main/java/com/vaadin/client/flow/binding/SimpleElementBindingStrategy.java b/flow-client/src/main/java/com/vaadin/client/flow/binding/SimpleElementBindingStrategy.java index 668230c8a1a..6b1c8455251 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/binding/SimpleElementBindingStrategy.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/binding/SimpleElementBindingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -68,6 +68,7 @@ * Binding strategy for a simple (not template) {@link Element} node. * * @author Vaadin Ltd + * @since 1.0 * */ public class SimpleElementBindingStrategy implements BindingStrategy { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/binding/TextBindingStrategy.java b/flow-client/src/main/java/com/vaadin/client/flow/binding/TextBindingStrategy.java index 625f23ae34f..26b902a4f13 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/binding/TextBindingStrategy.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/binding/TextBindingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * Binding strategy for simple (not template) text {@link Node}. * * @author Vaadin Ltd + * @since 1.0 * */ public class TextBindingStrategy implements BindingStrategy { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsArray.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsArray.java index d854cea9672..5f3ea5878d9 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsArray.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsArray.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,6 +30,7 @@ * Use {@link JsCollections#array()} to create an appropriate instance. * * @author Vaadin Ltd + * @since 1.0 * @param * the type of the array items */ diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsCollections.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsCollections.java index 5d59f9ed9d2..c3474060ecd 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsCollections.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsCollections.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,6 +30,7 @@ * alternative JRE implementations. * * @author Vaadin Ltd + * @since 1.0 */ @SuppressWarnings("deprecation") public class JsCollections { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsMap.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsMap.java index 10cd6ce29c9..8ff16ce3a97 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsMap.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,6 +26,7 @@ * {@link JsCollections#map()} to create an appropriate instance. * * @author Vaadin Ltd + * @since 1.0 * @param * the key type * @param diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsSet.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsSet.java index ecb37a5bdef..b22a85b18d3 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsSet.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,6 +27,7 @@ * {@link JsCollections#set()} to create an appropriate instance. * * @author Vaadin Ltd + * @since 1.0 * @param * the value type */ diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsWeakMap.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsWeakMap.java index c2fc80bb9f2..5b95f1df77f 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/JsWeakMap.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/JsWeakMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ * Use {@link JsCollections#weakMap()} to create an appropriate instance. * * @author Vaadin Ltd + * @since 1.0 * @param * the key type * @param diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsArray.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsArray.java index e896d5fb996..05bba101464 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsArray.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsArray.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,6 +27,7 @@ * JRE implementation of {@link JsArray}, should only be used for testing. * * @author Vaadin Ltd + * @since 1.0 * @param * item type * @deprecated Only to be used for testing diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsMap.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsMap.java index bf7d995d866..3760508cb26 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsMap.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,6 +28,7 @@ * * @deprecated Should only be used for testing. * @author Vaadin Ltd + * @since 1.0 * @param * the key type * @param diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsSet.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsSet.java index 74ede01e7ed..8738d520625 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsSet.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,6 +28,7 @@ * * @deprecated Should only be used for testing. * @author Vaadin Ltd + * @since 1.0 * @param * the value type */ diff --git a/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsWeakMap.java b/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsWeakMap.java index b49248dee7d..3587fb07eb1 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsWeakMap.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/collection/jre/JreJsWeakMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,6 +28,7 @@ * * @deprecated Should only be used for testing. * @author Vaadin Ltd + * @since 1.0 * @param * the key type * @param diff --git a/flow-client/src/main/java/com/vaadin/client/flow/dom/DomApi.java b/flow-client/src/main/java/com/vaadin/client/flow/dom/DomApi.java index 08339be8f63..21c78191d6f 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/dom/DomApi.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/dom/DomApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,6 +28,7 @@ * loaded. * * @author Vaadin Ltd + * @since 1.0 */ public class DomApi { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/dom/DomApiImpl.java b/flow-client/src/main/java/com/vaadin/client/flow/dom/DomApiImpl.java index 9043b9e2007..8c2246d1ab5 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/dom/DomApiImpl.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/dom/DomApiImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,6 +21,7 @@ * A DOM API abstraction layer to be used via {@link DomApi#wrap(Node)}. * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface DomApiImpl { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/dom/DomElement.java b/flow-client/src/main/java/com/vaadin/client/flow/dom/DomElement.java index 503f137cacd..9c9ca424ed8 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/dom/DomElement.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/dom/DomElement.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -34,6 +34,7 @@ * {@link DomApi#wrap(elemental.dom.Node)} should be used * * @author Vaadin Ltd + * @since 1.0 */ @JsType(isNative = true) public interface DomElement extends DomNode { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/dom/DomNode.java b/flow-client/src/main/java/com/vaadin/client/flow/dom/DomNode.java index f68883261ed..7f41290af5d 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/dom/DomNode.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/dom/DomNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -32,6 +32,7 @@ * {@link DomApi#wrap(elemental.dom.Node)} should be used * * @author Vaadin Ltd + * @since 1.0 */ @JsType(isNative = true) public interface DomNode { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/dom/PolymerDomApiImpl.java b/flow-client/src/main/java/com/vaadin/client/flow/dom/PolymerDomApiImpl.java index 2cd0a8366f9..ef174c6675a 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/dom/PolymerDomApiImpl.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/dom/PolymerDomApiImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,6 +28,7 @@ * Contains methods for checking whether polymer-micro.html has been loaded. * * @author Vaadin Ltd + * @since 1.0 */ public class PolymerDomApiImpl implements DomApiImpl { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/model/UpdatableModelProperties.java b/flow-client/src/main/java/com/vaadin/client/flow/model/UpdatableModelProperties.java index 2e17ca464e5..a4ac918930d 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/model/UpdatableModelProperties.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/model/UpdatableModelProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -32,6 +32,7 @@ * {@link SimpleElementBindingStrategy}). * * @author Vaadin Ltd + * @since 1.0 * */ public class UpdatableModelProperties { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/ListSpliceEvent.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/ListSpliceEvent.java index b8ab2bf3a7b..27e9435ca9f 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/ListSpliceEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/ListSpliceEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ * Event fired when the structure of a {@link NodeList} changes. * * @author Vaadin Ltd + * @since 1.0 */ public class ListSpliceEvent extends ReactiveValueChangeEvent { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/ListSpliceListener.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/ListSpliceListener.java index afc529d446d..4e5ea8e01d8 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/ListSpliceListener.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/ListSpliceListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Listener notified when the structure of a node list changes. * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface ListSpliceListener { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapProperty.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapProperty.java index c654b777a00..2ada6292089 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapProperty.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,6 +31,7 @@ * A property in a node map. * * @author Vaadin Ltd + * @since 1.0 */ public class MapProperty implements ReactiveValue { private final String name; diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyAddEvent.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyAddEvent.java index 30962960469..aae20ccc157 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyAddEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyAddEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,6 +21,7 @@ * Event fired when a property is added to a {@link NodeMap}. * * @author Vaadin Ltd + * @since 1.0 */ public class MapPropertyAddEvent extends ReactiveValueChangeEvent { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyAddListener.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyAddListener.java index c363d400aa1..d06ddad4657 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyAddListener.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyAddListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Listener notified when a property is added to a {@link NodeMap}. * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface MapPropertyAddListener { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyChangeEvent.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyChangeEvent.java index 0b324880b68..aff3312fd1c 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyChangeEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,6 +21,7 @@ * Event fired when the value of a map property changes. * * @author Vaadin Ltd + * @since 1.0 */ public class MapPropertyChangeEvent extends ReactiveValueChangeEvent { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyChangeListener.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyChangeListener.java index e3c6ee52aeb..83a519984ce 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyChangeListener.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/MapPropertyChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Listener notified when the value of a {@link MapProperty} changes. * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface MapPropertyChangeListener { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeFeature.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeFeature.java index 7de674ec6fc..3a401cd40fd 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeFeature.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeFeature.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,6 +27,7 @@ * into different features of related data. * * @author Vaadin Ltd + * @since 1.0 */ public abstract class NodeFeature { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeList.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeList.java index de569b73159..f2fe87fe8bd 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeList.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeList.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -45,6 +45,7 @@ * immutable or reactive values of their own. * * @author Vaadin Ltd + * @since 1.0 */ public class NodeList extends NodeFeature implements ReactiveValue { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeMap.java b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeMap.java index 7d1ca6831a1..f5eeaa0dab9 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeMap.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/nodefeature/NodeMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -43,6 +43,7 @@ * a property changes since the property is a reactive values of its own. * * @author Vaadin Ltd + * @since 1.0 */ public class NodeMap extends NodeFeature implements ReactiveValue { private final JsMap properties = JsCollections.map(); diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/Computation.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/Computation.java index 06095cacf4a..bbe54b42e3e 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/Computation.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/Computation.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,6 +29,7 @@ * "recomputation" when it is created. * * @author Vaadin Ltd + * @since 1.0 */ public abstract class Computation implements ReactiveValueChangeListener { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/FlushListener.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/FlushListener.java index 88244b09a2d..f035afc126e 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/FlushListener.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/FlushListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,6 +21,7 @@ * @see Reactive#addFlushListener(FlushListener) * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface FlushListener { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/InvalidateEvent.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/InvalidateEvent.java index 92b21ae7817..305f8e7ac03 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/InvalidateEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/InvalidateEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Event fired when a computation is invalidated. * * @author Vaadin Ltd + * @since 1.0 */ public class InvalidateEvent { private Computation source; diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/InvalidateListener.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/InvalidateListener.java index 978a1d91fdf..220b99f0b35 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/InvalidateListener.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/InvalidateListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Listens to invalidate events fired by a computation. * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface InvalidateListener { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/Reactive.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/Reactive.java index 73b6c75fe8f..15ad3b3434e 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/Reactive.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/Reactive.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -37,6 +37,7 @@ * @see Computation * * @author Vaadin Ltd + * @since 1.0 */ public class Reactive { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveEventRouter.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveEventRouter.java index f95d25caa94..a3594498673 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveEventRouter.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveEventRouter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,6 +28,7 @@ * {@link Reactive#addEventCollector(ReactiveValueChangeListener)}. * * @author Vaadin Ltd + * @since 1.0 * @param * the listener type of this router * @param diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValue.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValue.java index a44ad75b51e..cdd4da27ef9 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValue.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,6 +27,7 @@ * the current computation. * * @author Vaadin Ltd + * @since 1.0 */ public interface ReactiveValue { /** diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValueChangeEvent.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValueChangeEvent.java index 31d977a8c47..9ddce8a9fc0 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValueChangeEvent.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValueChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Event fired when a reactive value has changed. * * @author Vaadin Ltd + * @since 1.0 */ public abstract class ReactiveValueChangeEvent { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValueChangeListener.java b/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValueChangeListener.java index 7f45f11010b..02296279c27 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValueChangeListener.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/reactive/ReactiveValueChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,6 +21,7 @@ * @see ReactiveValue#addReactiveValueChangeListener(ReactiveValueChangeListener) * * @author Vaadin Ltd + * @since 1.0 */ @FunctionalInterface public interface ReactiveValueChangeListener { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/util/ClientJsonCodec.java b/flow-client/src/main/java/com/vaadin/client/flow/util/ClientJsonCodec.java index 85edb3d2c01..7be0269c642 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/util/ClientJsonCodec.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/util/ClientJsonCodec.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * Static helpers for encoding and decoding JSON. * * @author Vaadin Ltd + * @since 1.0 */ public class ClientJsonCodec { private ClientJsonCodec() { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/util/JsObject.java b/flow-client/src/main/java/com/vaadin/client/flow/util/JsObject.java index c53d8486c46..e55cafeb848 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/util/JsObject.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/util/JsObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ * JsInterop bridge to the JavaScript Object type. * * @author Vaadin Ltd + * @since 1.0 */ @JsType(isNative = true, name = "Object", namespace = JsPackage.GLOBAL) public class JsObject { diff --git a/flow-client/src/main/java/com/vaadin/client/flow/util/NativeFunction.java b/flow-client/src/main/java/com/vaadin/client/flow/util/NativeFunction.java index fee1bec5f5b..39fd809add0 100644 --- a/flow-client/src/main/java/com/vaadin/client/flow/util/NativeFunction.java +++ b/flow-client/src/main/java/com/vaadin/client/flow/util/NativeFunction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,6 +26,7 @@ * JsInterop wrapper for interacting with the JavaScript Function type. * * @author Vaadin Ltd + * @since 1.0 */ @JsType(isNative = true, name = "Function", namespace = JsPackage.GLOBAL) @SuppressWarnings("unusable-by-js") diff --git a/flow-client/src/main/java/com/vaadin/flow/linker/ClientEngineLinker.java b/flow-client/src/main/java/com/vaadin/flow/linker/ClientEngineLinker.java index 0ca30fd0536..e15afba75dc 100644 --- a/flow-client/src/main/java/com/vaadin/flow/linker/ClientEngineLinker.java +++ b/flow-client/src/main/java/com/vaadin/flow/linker/ClientEngineLinker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/main/java/com/vaadin/flow/osgi/Activator.java b/flow-client/src/main/java/com/vaadin/flow/osgi/Activator.java new file mode 100644 index 00000000000..9c96e2421ac --- /dev/null +++ b/flow-client/src/main/java/com/vaadin/flow/osgi/Activator.java @@ -0,0 +1,82 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.osgi; + +import java.util.Hashtable; + +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.FrameworkUtil; +import org.osgi.framework.ServiceEvent; +import org.osgi.framework.ServiceListener; +import org.osgi.framework.ServiceReference; +import org.osgi.service.http.HttpService; +import org.osgi.service.http.NamespaceException; + +import com.vaadin.flow.client.ClientResources; + +/** + * Bundle activator for the client-side module. + *

+ * The activator registers {@link ClientResources} service to allow to access to + * the resources in this bundle. + * + * @author Vaadin Ltd + * + */ +public class Activator implements BundleActivator, ServiceListener { + + @Override + public void start(BundleContext context) throws Exception { + context.registerService(ClientResources.class, + new OsgiClientResources(), new Hashtable()); + registerClientResources(null); + context.addServiceListener(this); + } + + @Override + public void stop(BundleContext context) throws Exception { + // Does nothing since the framework will automatically unregister any + // registered services. + } + + @Override + public void serviceChanged(ServiceEvent event) { + if (event.getType() == ServiceEvent.REGISTERED) { + registerClientResources(event.getServiceReference()); + } + } + + private void registerClientResources(ServiceReference serviceReference) { + Bundle bundle = FrameworkUtil.getBundle(Activator.class); + ServiceReference reference = bundle.getBundleContext() + .getServiceReference(HttpService.class); + if (reference != null && (serviceReference == null + || serviceReference.equals(reference))) { + HttpService service = bundle.getBundleContext() + .getService(reference); + try { + service.registerResources("/VAADIN/static/client", + "/META-INF/resources/VAADIN/static/client", null); + } catch (NamespaceException e) { + throw new IllegalStateException(e); + } + } + + } + +} diff --git a/flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/servlet/ProductionModeTimingDataViewTestServlet.java b/flow-client/src/main/java/com/vaadin/flow/osgi/OsgiClientResources.java similarity index 52% rename from flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/servlet/ProductionModeTimingDataViewTestServlet.java rename to flow-client/src/main/java/com/vaadin/flow/osgi/OsgiClientResources.java index 1c2126a416e..2398b1a7c98 100644 --- a/flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/servlet/ProductionModeTimingDataViewTestServlet.java +++ b/flow-client/src/main/java/com/vaadin/flow/osgi/OsgiClientResources.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -13,16 +13,22 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.flow.uitest.servlet; +package com.vaadin.flow.osgi; -import javax.servlet.annotation.WebInitParam; -import javax.servlet.annotation.WebServlet; +import java.io.InputStream; -import com.vaadin.flow.server.VaadinServletConfiguration; +import com.vaadin.flow.client.ClientResources; -@WebServlet(asyncSupported = true, urlPatterns = { - "/view-production-timing/*" }, initParams = @WebInitParam(name = "requestTiming", value = "true")) -@VaadinServletConfiguration(productionMode = true) -public class ProductionModeTimingDataViewTestServlet extends ViewTestServlet { +/** + * OSGi service to access to the client-side resources. + * + * @author Vaadin Ltd + * + */ +class OsgiClientResources implements ClientResources { + @Override + public InputStream getResource(String path) { + return OsgiClientResources.class.getResourceAsStream(path); + } } diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/CustomScheduler.java b/flow-client/src/test-gwt/java/com/vaadin/client/CustomScheduler.java index 079fdca0470..1dae728f782 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/CustomScheduler.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/CustomScheduler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/GwtDependencyLoaderTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/GwtDependencyLoaderTest.java index 0b6d578040f..8dcbc8ee544 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/GwtDependencyLoaderTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/GwtDependencyLoaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/GwtExecuteJavaScriptElementUtilsTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/GwtExecuteJavaScriptElementUtilsTest.java index 8f13133f6b4..a3cd54de9e3 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/GwtExecuteJavaScriptElementUtilsTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/GwtExecuteJavaScriptElementUtilsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/GwtWidgetUtilTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/GwtWidgetUtilTest.java index d810b9d50d4..ba46de83518 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/GwtWidgetUtilTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/GwtWidgetUtilTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/communication/GwtDefaultReconnectDialogTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/communication/GwtDefaultReconnectDialogTest.java index 28f26165c8b..12c83758b43 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/communication/GwtDefaultReconnectDialogTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/communication/GwtDefaultReconnectDialogTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtBasicElementBinderTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtBasicElementBinderTest.java index 4271f6d1da7..452e4693941 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtBasicElementBinderTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtBasicElementBinderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtEventHandlerTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtEventHandlerTest.java index 9040a255a9f..955f987e479 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtEventHandlerTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtEventHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -41,6 +41,7 @@ /** * @author Vaadin Ltd + * @since 1.0 * */ public class GwtEventHandlerTest extends ClientEngineTestBase { diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtMultipleBindingTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtMultipleBindingTest.java index c0c68e7e59b..2a128056d73 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtMultipleBindingTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtMultipleBindingTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtPolymerModelTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtPolymerModelTest.java index 0d51e5f3972..767e98244d5 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtPolymerModelTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtPolymerModelTest.java @@ -26,7 +26,8 @@ import elemental.json.JsonValue; /** - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. */ public class GwtPolymerModelTest extends GwtPropertyElementBinderTest { private static final String MODEL_PROPERTY_NAME = "model"; diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtPropertyElementBinderTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtPropertyElementBinderTest.java index e1849244dda..f72afe08bdc 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtPropertyElementBinderTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtPropertyElementBinderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -38,6 +38,7 @@ /** * @author Vaadin Ltd + * @since 1.0 * */ public abstract class GwtPropertyElementBinderTest diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtStateNodeTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtStateNodeTest.java index 7b3ed4eedef..dfdd2b403ee 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtStateNodeTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtStateNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtStateTreeTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtStateTreeTest.java index 3234d72e0de..b8c97eec824 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtStateTreeTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtStateTreeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,6 +30,7 @@ /** * @author Vaadin Ltd + * @since 1.0 * */ public class GwtStateTreeTest extends ClientEngineTestBase { diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtTreeChangeProcessorTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtTreeChangeProcessorTest.java index 5f6756bf4fd..c5e00278dc5 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtTreeChangeProcessorTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/GwtTreeChangeProcessorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsArrayTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsArrayTest.java index d08f9da9d0f..f07c0456f31 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsArrayTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsArrayTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsMapTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsMapTest.java index 3cd38740024..bdf65a5882f 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsMapTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsSetTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsSetTest.java index 8a5d5d5e1e4..ac132d4a26f 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsSetTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsWeakMapTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsWeakMapTest.java index 62dd5fd0e5c..9a40065650f 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsWeakMapTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/collection/GwtJsWeakMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test-gwt/java/com/vaadin/client/flow/util/GwtNativeFunctionTest.java b/flow-client/src/test-gwt/java/com/vaadin/client/flow/util/GwtNativeFunctionTest.java index 541df56ff52..a88a84fe321 100644 --- a/flow-client/src/test-gwt/java/com/vaadin/client/flow/util/GwtNativeFunctionTest.java +++ b/flow-client/src/test-gwt/java/com/vaadin/client/flow/util/GwtNativeFunctionTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/AssertionTest.java b/flow-client/src/test/java/com/vaadin/client/AssertionTest.java index a16b2ee0425..8d89c4ee6a1 100644 --- a/flow-client/src/test/java/com/vaadin/client/AssertionTest.java +++ b/flow-client/src/test/java/com/vaadin/client/AssertionTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/CodeTest.java b/flow-client/src/test/java/com/vaadin/client/CodeTest.java index 99173c5f283..ad838721ef8 100644 --- a/flow-client/src/test/java/com/vaadin/client/CodeTest.java +++ b/flow-client/src/test/java/com/vaadin/client/CodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/DependencyLoaderTest.java b/flow-client/src/test/java/com/vaadin/client/DependencyLoaderTest.java index c175ef65850..a7f32be0888 100644 --- a/flow-client/src/test/java/com/vaadin/client/DependencyLoaderTest.java +++ b/flow-client/src/test/java/com/vaadin/client/DependencyLoaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/ExistingElementMapTest.java b/flow-client/src/test/java/com/vaadin/client/ExistingElementMapTest.java index 142bb2ab410..ec1c857eaba 100644 --- a/flow-client/src/test/java/com/vaadin/client/ExistingElementMapTest.java +++ b/flow-client/src/test/java/com/vaadin/client/ExistingElementMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/InitialPropertiesHandlerTest.java b/flow-client/src/test/java/com/vaadin/client/InitialPropertiesHandlerTest.java index 3b7ebe297d1..ea94b44f66b 100644 --- a/flow-client/src/test/java/com/vaadin/client/InitialPropertiesHandlerTest.java +++ b/flow-client/src/test/java/com/vaadin/client/InitialPropertiesHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/bootstrap/LocationParserTest.java b/flow-client/src/test/java/com/vaadin/client/bootstrap/LocationParserTest.java index 96716d68592..d1501efdaef 100644 --- a/flow-client/src/test/java/com/vaadin/client/bootstrap/LocationParserTest.java +++ b/flow-client/src/test/java/com/vaadin/client/bootstrap/LocationParserTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/communication/AbstractConfigurationTest.java b/flow-client/src/test/java/com/vaadin/client/communication/AbstractConfigurationTest.java index c683e166339..a71282fbefe 100644 --- a/flow-client/src/test/java/com/vaadin/client/communication/AbstractConfigurationTest.java +++ b/flow-client/src/test/java/com/vaadin/client/communication/AbstractConfigurationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/communication/LoadingIndicatorConfiguratorTest.java b/flow-client/src/test/java/com/vaadin/client/communication/LoadingIndicatorConfiguratorTest.java index fd453229c05..adb7664d8e6 100644 --- a/flow-client/src/test/java/com/vaadin/client/communication/LoadingIndicatorConfiguratorTest.java +++ b/flow-client/src/test/java/com/vaadin/client/communication/LoadingIndicatorConfiguratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/communication/PollConfiguratorTest.java b/flow-client/src/test/java/com/vaadin/client/communication/PollConfiguratorTest.java index 8d3033fbfc0..05ef3747092 100644 --- a/flow-client/src/test/java/com/vaadin/client/communication/PollConfiguratorTest.java +++ b/flow-client/src/test/java/com/vaadin/client/communication/PollConfiguratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/communication/ReconnectDialogConfigurationTest.java b/flow-client/src/test/java/com/vaadin/client/communication/ReconnectDialogConfigurationTest.java index ec1df30c10a..5be5b8b98c2 100644 --- a/flow-client/src/test/java/com/vaadin/client/communication/ReconnectDialogConfigurationTest.java +++ b/flow-client/src/test/java/com/vaadin/client/communication/ReconnectDialogConfigurationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java b/flow-client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java index ed3d676405c..47db82620fd 100644 --- a/flow-client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java +++ b/flow-client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,6 +21,7 @@ /** * * @author Vaadin Ltd + * @since 1.0 */ public class ServerMessageHandlerTest { diff --git a/flow-client/src/test/java/com/vaadin/client/flow/ExecuteJavaScriptProcessorTest.java b/flow-client/src/test/java/com/vaadin/client/flow/ExecuteJavaScriptProcessorTest.java index d76e699d53b..d4f7db6853e 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/ExecuteJavaScriptProcessorTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/ExecuteJavaScriptProcessorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/StateNodeTest.java b/flow-client/src/test/java/com/vaadin/client/flow/StateNodeTest.java index d8158fb5300..e80333919a0 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/StateNodeTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/StateNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/StateTreeTest.java b/flow-client/src/test/java/com/vaadin/client/flow/StateTreeTest.java index 0f012d2f2fa..bc770353d75 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/StateTreeTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/StateTreeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/TreeChangeProcessorTest.java b/flow-client/src/test/java/com/vaadin/client/flow/TreeChangeProcessorTest.java index 51f5c0764a4..e779256df2c 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/TreeChangeProcessorTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/TreeChangeProcessorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/collection/JreArrayTest.java b/flow-client/src/test/java/com/vaadin/client/flow/collection/JreArrayTest.java index fd624e6aa6e..a51b781da34 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/collection/JreArrayTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/collection/JreArrayTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/collection/JreMapTest.java b/flow-client/src/test/java/com/vaadin/client/flow/collection/JreMapTest.java index 1f9a0895728..50728e323af 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/collection/JreMapTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/collection/JreMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/collection/JreSetTest.java b/flow-client/src/test/java/com/vaadin/client/flow/collection/JreSetTest.java index 79d49f28a5c..fd666ef1383 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/collection/JreSetTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/collection/JreSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/collection/JreWeakMapTest.java b/flow-client/src/test/java/com/vaadin/client/flow/collection/JreWeakMapTest.java index dd18259e252..37797fe70d0 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/collection/JreWeakMapTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/collection/JreWeakMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/MapPropertyTest.java b/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/MapPropertyTest.java index 84cc657be73..996565e1fd1 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/MapPropertyTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/MapPropertyTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/NodeListTest.java b/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/NodeListTest.java index 721ac51c2eb..6b0df2eb4a6 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/NodeListTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/NodeListTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/NodeMapTest.java b/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/NodeMapTest.java index 1b64b1d90a4..d56b3b46fa1 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/NodeMapTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/nodefeature/NodeMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/reactive/ComputationTest.java b/flow-client/src/test/java/com/vaadin/client/flow/reactive/ComputationTest.java index 16e58a2978c..8fc42ab0e0f 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/reactive/ComputationTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/reactive/ComputationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/reactive/CountingComputation.java b/flow-client/src/test/java/com/vaadin/client/flow/reactive/CountingComputation.java index 4279698f72d..647cd0d8874 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/reactive/CountingComputation.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/reactive/CountingComputation.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/reactive/ReactiveTest.java b/flow-client/src/test/java/com/vaadin/client/flow/reactive/ReactiveTest.java index eb2947b651b..6fabe602660 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/reactive/ReactiveTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/reactive/ReactiveTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/reactive/TestReactiveEventRouter.java b/flow-client/src/test/java/com/vaadin/client/flow/reactive/TestReactiveEventRouter.java index 35cfa1173b8..78266bb95af 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/reactive/TestReactiveEventRouter.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/reactive/TestReactiveEventRouter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-client/src/test/java/com/vaadin/client/flow/util/ClientJsonCodecTest.java b/flow-client/src/test/java/com/vaadin/client/flow/util/ClientJsonCodecTest.java index 691294b8cf8..bb89f683e03 100644 --- a/flow-client/src/test/java/com/vaadin/client/flow/util/ClientJsonCodecTest.java +++ b/flow-client/src/test/java/com/vaadin/client/flow/util/ClientJsonCodecTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/pom.xml b/flow-components-parent/flow-code-generator-api/pom.xml index be94e09c1db..1e80a5c3cd7 100644 --- a/flow-components-parent/flow-code-generator-api/pom.xml +++ b/flow-components-parent/flow-code-generator-api/pom.xml @@ -1,11 +1,12 @@ - 4.0.0 com.vaadin flow-components-parent - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-code-generator-api Flow code generator API @@ -53,6 +54,11 @@ commons-text 1.1 + + javax.annotation + javax.annotation-api + 1.3.2 + diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/ComponentGenerator.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/ComponentGenerator.java index f012c7d288a..40d277497b5 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/ComponentGenerator.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/ComponentGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -25,12 +25,15 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Properties; import java.util.Set; import java.util.TreeSet; +import java.util.stream.Collectors; +import java.util.stream.Stream; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParser; @@ -38,9 +41,14 @@ import org.apache.commons.lang3.ClassUtils; import org.apache.commons.lang3.StringUtils; import org.jboss.forge.roaster.Roaster; +import org.jboss.forge.roaster.model.Named; +import org.jboss.forge.roaster.model.Packaged; import org.jboss.forge.roaster.model.Visibility; +import org.jboss.forge.roaster.model.source.AnnotationTargetSource; +import org.jboss.forge.roaster.model.source.FieldSource; import org.jboss.forge.roaster.model.source.JavaClassSource; import org.jboss.forge.roaster.model.source.JavaDocSource; +import org.jboss.forge.roaster.model.source.JavaEnumSource; import org.jboss.forge.roaster.model.source.MethodSource; import org.jboss.forge.roaster.model.source.ParameterSource; import org.slf4j.LoggerFactory; @@ -54,6 +62,7 @@ import com.vaadin.flow.component.HasComponents; import com.vaadin.flow.component.HasStyle; import com.vaadin.flow.component.HasText; +import com.vaadin.flow.component.HasTheme; import com.vaadin.flow.component.HasValue; import com.vaadin.flow.component.JsonSerializable; import com.vaadin.flow.component.NotSupported; @@ -394,8 +403,9 @@ private JavaClassSource generateClassSource(ComponentMetadata metadata, addClassAnnotations(metadata, javaClass); addInterfaces(metadata, javaClass); + generateThemeVariants(metadata, javaClass, targetPackage); - Map> propertyToGetterMap = new HashMap>(); + Map> propertyToGetterMap = new HashMap<>(); if (metadata.getProperties() != null) { generateEventsForPropertiesWithNotify(metadata); @@ -664,6 +674,93 @@ private void addInterfaces(ComponentMetadata metadata, }); } + private void generateThemeVariants(ComponentMetadata metadata, + JavaClassSource javaClass, String targetPackage) { + if (metadata.getVariants().isEmpty()) { + return; + } + + javaClass.addInterface(HasTheme.class); + + String rawName = ComponentGeneratorUtils + .generateValidJavaClassName(metadata.getTag()); + String componentName = rawName.startsWith("Vaadin") + ? rawName.substring("Vaadin".length()) + : rawName; + JavaEnumSource classEnum = Roaster.create(JavaEnumSource.class) + .setName(StringUtils.capitalize(componentName) + "Variant") + .setPackage(targetPackage); + + addGeneratedAnnotation(metadata, classEnum); + + classEnum.getJavaDoc().setText(String.format( + "Set of theme variants applicable for {@code %s} component.", + metadata.getTag())); + FieldSource variantField = classEnum.addField() + .setPrivate().setType(String.class).setName("variant") + .setFinal(true); + + classEnum.addMethod().setConstructor(true) + .setBody(String.format("this.%s = %s;", variantField.getName(), + variantField.getName())) + .addParameter(String.class.getSimpleName(), + variantField.getName()); + + MethodSource getVariantNameMethod = classEnum + .addMethod().setPublic().setReturnType(String.class) + .setName("getVariantName") + .setBody(String.format("return %s;", variantField.getName())); + getVariantNameMethod.getJavaDoc().setText("Gets the variant name.") + .addTagValue(JAVADOC_RETURN, "variant name"); + + for (Map.Entry> themeNameAndVariants : metadata + .getVariants().entrySet()) { + for (String variant : themeNameAndVariants.getValue()) { + classEnum.addEnumConstant(createEnumFieldName(String.format( + "%s_%s", themeNameAndVariants.getKey(), variant))) + .setConstructorArguments( + String.format("\"%s\"", variant)); + } + } + + String parameterName = "variants"; + javaClass.addImport(Stream.class); + javaClass.addImport(Collectors.class); + MethodSource addVariantsMethod = javaClass.addMethod() + .setName("addThemeVariants") + .setBody(String.format( + "getThemeNames().addAll(Stream.of(%s).map(%s::%s).collect(Collectors.toList()));", + parameterName, classEnum.getName(), + getVariantNameMethod.getName())) + .setPublic().setReturnTypeVoid(); + addVariantsMethod.addParameter(classEnum.getName(), parameterName) + .setVarArgs(true); + addVariantsMethod.getJavaDoc() + .setText("Adds theme variants to the component.") + .addTagValue(JAVADOC_PARAM, String + .format("%s theme variants to add", parameterName)); + + MethodSource removeVariantsMethod = javaClass + .addMethod().setName("removeThemeVariants") + .setBody(String.format( + "getThemeNames().removeAll(Stream.of(%s).map(%s::%s).collect(Collectors.toList()));", + parameterName, classEnum.getName(), + getVariantNameMethod.getName())) + .setPublic().setReturnTypeVoid(); + removeVariantsMethod.addParameter(classEnum.getName(), parameterName) + .setVarArgs(true); + removeVariantsMethod.getJavaDoc() + .setText("Removes theme variants from the component.") + .addTagValue(JAVADOC_PARAM, String + .format("%s theme variants to remove", parameterName)); + writeClass(metadata.getName(), targetPath, classEnum, licenseNote); + } + + private String createEnumFieldName(String variantName) { + return StringUtils.upperCase(variantName, Locale.ENGLISH) + .replaceAll("-", "_"); + } + private void generateGettersAndSetters(ComponentMetadata metadata, JavaClassSource javaClass, Map> propertyToGetterMap) { @@ -813,6 +910,21 @@ private String addLicenseHeaderIfAvailable(String source, private void addClassAnnotations(ComponentMetadata metadata, JavaClassSource javaClass) { + addGeneratedAnnotation(metadata, javaClass); + + javaClass.addAnnotation(Tag.class).setStringValue(metadata.getTag()); + + String importPath = metadata.getBaseUrl().replace("\\", "/"); + if (importPath.startsWith("/")) { + importPath = importPath.substring(1); + } + String htmlImport = String.format("frontend://%s%s", frontendDirectory, + importPath); + javaClass.addAnnotation(HtmlImport.class).setStringValue(htmlImport); + } + + private void addGeneratedAnnotation(ComponentMetadata metadata, + AnnotationTargetSource javaClass) { Properties properties = getProperties("version.prop"); String generator = String.format("Generator: %s#%s", ComponentGenerator.class.getName(), @@ -823,21 +935,10 @@ private void addClassAnnotations(ComponentMetadata metadata, String flow = String.format("Flow#%s", properties.getProperty("flow.version")); - String[] generatedValue = new String[] { generator, webComponent, - flow }; + String[] generatedValue = { generator, webComponent, flow }; javaClass.addAnnotation(Generated.class) .setStringArrayValue(generatedValue); - - javaClass.addAnnotation(Tag.class).setStringValue(metadata.getTag()); - - String importPath = metadata.getBaseUrl().replace("\\", "/"); - if (importPath.startsWith("/")) { - importPath = importPath.substring(1); - } - String htmlImport = String.format("frontend://%s%s", frontendDirectory, - importPath); - javaClass.addAnnotation(HtmlImport.class).setStringValue(htmlImport); } /** @@ -860,17 +961,21 @@ private void addClassAnnotations(ComponentMetadata metadata, public void generateClass(ComponentMetadata metadata, File targetPath, String basePackage, String licenseNote) { - JavaClassSource javaClass = generateClassSource(metadata, basePackage); - String source = addLicenseHeaderIfAvailable(javaClass.toString(), - licenseNote); - - String fileName = ComponentGeneratorUtils - .generateValidJavaClassName(javaClass.getName()) + ".java"; - if (!targetPath.isDirectory() && !targetPath.mkdirs()) { throw new ComponentGenerationException( "Could not create target directory \"" + targetPath + "\""); } + writeClass(metadata.getName(), targetPath, + generateClassSource(metadata, basePackage), licenseNote); + } + + private > void writeClass( + String componentName, File targetPath, T javaClass, + String licenseNote) { + String fileName = ComponentGeneratorUtils + .generateValidJavaClassName(javaClass.getName()) + ".java"; + String source = addLicenseHeaderIfAvailable(javaClass.toString(), + licenseNote); try { Files.write( new File( @@ -882,7 +987,7 @@ public void generateClass(ComponentMetadata metadata, File targetPath, throw new ComponentGenerationException( "Error writing the generated Java source file \"" + fileName + "\" at \"" + targetPath + "\" for component \"" - + metadata.getName() + "\"", + + componentName + "\"", ex); } } diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/ComponentGeneratorUtils.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/ComponentGeneratorUtils.java index 0e9079e1db6..e2cfd091304 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/ComponentGeneratorUtils.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/ComponentGeneratorUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/FunctionParameterVariantCombinator.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/FunctionParameterVariantCombinator.java index e335549862c..201c8cd0ca9 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/FunctionParameterVariantCombinator.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/FunctionParameterVariantCombinator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * for ComponentFunctionData. * * @author Vaadin Ltd + * @since 1.0 */ public class FunctionParameterVariantCombinator { diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/JavaDocFormatter.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/JavaDocFormatter.java index e475b156031..dc1289aba5a 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/JavaDocFormatter.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/JavaDocFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,7 +30,8 @@ /** * A class that is used to format javadocs for the generated component classes. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. */ class JavaDocFormatter { private static final String JAVA_DOC_CODE_SECTION = "{@code $1}"; diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/NestedClassGenerator.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/NestedClassGenerator.java index bf9a84a09e8..f486bb8faa9 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/NestedClassGenerator.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/NestedClassGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/exception/ComponentGenerationException.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/exception/ComponentGenerationException.java index 75e31e3b35a..49d3bb67eb6 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/exception/ComponentGenerationException.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/exception/ComponentGenerationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentBasicType.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentBasicType.java index eeccb6857af..1d33da3fdb4 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentBasicType.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentBasicType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentEventData.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentEventData.java index 6bf45e9a9de..af29bad753c 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentEventData.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentEventData.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentFunctionData.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentFunctionData.java index 6bfcd1af403..1fb09aa6001 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentFunctionData.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentFunctionData.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentFunctionParameterData.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentFunctionParameterData.java index 0df67439bc7..da880ad0526 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentFunctionParameterData.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentFunctionParameterData.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentMetadata.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentMetadata.java index bd7ffb766fb..6d332eaaa1f 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentMetadata.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -15,7 +15,9 @@ */ package com.vaadin.generator.metadata; +import java.util.HashMap; import java.util.List; +import java.util.Map; import com.vaadin.flow.component.HasComponents; @@ -23,7 +25,6 @@ * Base class of the representation of a webcomponent for the code generator. It * holds all the data needed to generate the Java wrapper class that interacts * with the webcomponent at the client side. - * */ public class ComponentMetadata { private String tag; @@ -38,6 +39,7 @@ public class ComponentMetadata { private List behaviors; private List slots; private List mixins; + private Map> variants = new HashMap<>(); /** * Gets the name of the ES6 class of the webcomponent, which is used to @@ -296,4 +298,21 @@ public void setMixins(List mixins) { this.mixins = mixins; } + /** + * Gets theme variants for the component. + * + * @return theme variants data for the component + */ + public Map> getVariants() { + return variants; + } + + /** + * Sets theme variants for the component. + * + * @param variants theme variants data for the component + */ + public void setVariants(Map> variants) { + this.variants = variants; + } } diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentObjectType.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentObjectType.java index 50b4c02c885..6facbc77099 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentObjectType.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentObjectType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentPropertyBaseData.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentPropertyBaseData.java index bf7c78f2578..fdc958e58e7 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentPropertyBaseData.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentPropertyBaseData.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentPropertyData.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentPropertyData.java index b05ae94ef10..8508b19866b 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentPropertyData.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentPropertyData.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentType.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentType.java index 46e3b860f5a..62029862497 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentType.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/metadata/ComponentType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Marker interface for component types. * * @author Vaadin Ltd + * @since 1.0 */ public interface ComponentType { diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/BehaviorRegistry.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/BehaviorRegistry.java index c4cfbb7cf56..20e22e30e77 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/BehaviorRegistry.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/BehaviorRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/ExclusionRegistry.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/ExclusionRegistry.java index 4e91ea3e6ac..15d7db5c9c9 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/ExclusionRegistry.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/ExclusionRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,6 +29,7 @@ * events or methods are not generated. * * @author Vaadin Ltd + * @since 1.0 * */ public class ExclusionRegistry { diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/PropertyNameRemapRegistry.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/PropertyNameRemapRegistry.java index adf3d06db3c..793dbf0ad59 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/PropertyNameRemapRegistry.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/PropertyNameRemapRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/ValuePropertyRegistry.java b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/ValuePropertyRegistry.java index 2f5f46e3bc8..8e3415e54d1 100644 --- a/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/ValuePropertyRegistry.java +++ b/flow-components-parent/flow-code-generator-api/src/main/java/com/vaadin/generator/registry/ValuePropertyRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorTest.java b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorTest.java index 5b8eaaa95b7..49018b075d1 100644 --- a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorTest.java +++ b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorTestUtils.java b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorTestUtils.java index 1813d83e19f..ea9e3c4ccc7 100644 --- a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorTestUtils.java +++ b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorUtilsTest.java b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorUtilsTest.java index 1267242de21..a6623beae8b 100644 --- a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorUtilsTest.java +++ b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/ComponentGeneratorUtilsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/NestedClassGeneratorTest.java b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/NestedClassGeneratorTest.java index 009583ea8ea..f4fbd3a6184 100644 --- a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/NestedClassGeneratorTest.java +++ b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/NestedClassGeneratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/registry/BehaviorRegistryTest.java b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/registry/BehaviorRegistryTest.java index 7c6a00043cd..daefd67ad5f 100644 --- a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/registry/BehaviorRegistryTest.java +++ b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/registry/BehaviorRegistryTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/registry/PropertyNameRemapRegistryTest.java b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/registry/PropertyNameRemapRegistryTest.java index 7c19a01cd25..17db76ed806 100644 --- a/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/registry/PropertyNameRemapRegistryTest.java +++ b/flow-components-parent/flow-code-generator-api/src/test/java/com/vaadin/generator/registry/PropertyNameRemapRegistryTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-code-generator/pom.xml b/flow-components-parent/flow-code-generator/pom.xml index 252f917794d..878d6432987 100644 --- a/flow-components-parent/flow-code-generator/pom.xml +++ b/flow-components-parent/flow-code-generator/pom.xml @@ -5,7 +5,7 @@ com.vaadin flow-components-parent - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-code-generator Flow code generator diff --git a/flow-components-parent/flow-code-generator/src/main/java/com/vaadin/generator/ComponentGeneratorPlugin.java b/flow-components-parent/flow-code-generator/src/main/java/com/vaadin/generator/ComponentGeneratorPlugin.java index f81631250a3..ce102e1f009 100644 --- a/flow-components-parent/flow-code-generator/src/main/java/com/vaadin/generator/ComponentGeneratorPlugin.java +++ b/flow-components-parent/flow-code-generator/src/main/java/com/vaadin/generator/ComponentGeneratorPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,7 +31,7 @@ /** * Maven plugin for the Java code generation based on JSON metadata extracted * from webcomponents. - * + * * @see ComponentGenerator */ @Mojo(defaultPhase = LifecyclePhase.GENERATE_SOURCES, name = "generate") @@ -151,8 +151,8 @@ public void execute() throws MojoExecutionException, MojoFailureException { e); } getLog().error("Error generating Java source for " - + file.getAbsolutePath() - + ". The property \"failOnError\" is false, skipping file...", + + file.getAbsolutePath() + + ". The property \"failOnError\" is false, skipping file...", e); } } diff --git a/flow-components-parent/flow-component-demo-helpers/pom.xml b/flow-components-parent/flow-component-demo-helpers/pom.xml index 77a2e97e2e9..b8700222e36 100644 --- a/flow-components-parent/flow-component-demo-helpers/pom.xml +++ b/flow-components-parent/flow-component-demo-helpers/pom.xml @@ -7,7 +7,7 @@ com.vaadin flow-components-parent - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-component-demo-helpers @@ -50,6 +50,11 @@ vaadin-lumo-theme ${project.version} + + com.vaadin + vaadin-material-theme + ${project.version} + org.webjars.bowergithub.webcomponents diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/Card.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/Card.java index b0fa784a62b..c1f221db74d 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/Card.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/Card.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -25,6 +25,7 @@ * Card to hold components for DemoViews * * @author Vaadin Ltd + * @since 1.0 */ @StyleSheet("src/css/component-card.css") public class Card extends Div { diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/ComponentDemoServer.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/ComponentDemoServer.java index 8574370fade..00980d20c96 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/ComponentDemoServer.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/ComponentDemoServer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * be extended for additional configuration. * * @author Vaadin Ltd + * @since 1.0 */ public class ComponentDemoServer { diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/ComponentDemoTest.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/ComponentDemoTest.java index dccbe0afe46..f0674635ff1 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/ComponentDemoTest.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/ComponentDemoTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -15,12 +15,23 @@ */ package com.vaadin.flow.demo; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.function.Supplier; + +import org.junit.Assert; import org.junit.Before; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import com.vaadin.flow.testutil.ChromeBrowserTest; +import static com.vaadin.flow.demo.DemoView.COMPONENT_WITH_VARIANTS_ID; +import static com.vaadin.flow.demo.DemoView.VARIANT_TOGGLE_BUTTONS_DIV_ID; + /** * Base class for the integration tests of component demos. * @@ -28,6 +39,24 @@ public abstract class ComponentDemoTest extends ChromeBrowserTest { protected WebElement layout; + /** + * Default variant producer + *

+ * With current design, the theme variant can be obtained from the button + * attached to the demo + */ + public static class DefaultProducer + implements Function { + + @Override + public String apply(WebElement button) { + String[] variant = button.getText().split("'"); + return variant[1]; + } + } + + private Function DEFAULT_VARIANT_PRODUCER = new DefaultProducer(); + @Override protected int getDeploymentPort() { return 9998; @@ -43,4 +72,104 @@ public void openDemoPageAndCheckForErrors() { layout = findElement(By.className("demo-view")); checkLogsForErrors(); } + + /** + * Verifies variants functionality for the current layout with using the + * {@link DefaultProducer}. + *

+ * The test will fail if a specific variant demo is not added first with + * {@link DemoView#addVariantsDemo(Supplier, BiConsumer, BiConsumer, Function, Enum[])} + * method. + */ + protected void verifyThemeVariantsBeingToggled() { + verifyThemeVariantsBeingToggled(DEFAULT_VARIANT_PRODUCER); + } + + /** + * Verifies variants functionality for the current layout with customized + * variant producer implementation. + */ + protected void verifyThemeVariantsBeingToggled( + Function variantProducer) { + List toggleThemeButtons = layout + .findElement(By.id(VARIANT_TOGGLE_BUTTONS_DIV_ID)) + .findElements(By.tagName("button")); + Assert.assertFalse( + "Expected at least one toggle theme button in 'buttonDiv', but got none", + toggleThemeButtons.isEmpty()); + toggleThemeButtons.forEach(button -> toggleVariantAndCheck( + layout.findElement(By.id(COMPONENT_WITH_VARIANTS_ID)), button, + variantProducer)); + } + + private void toggleVariantAndCheck(WebElement component, WebElement button, + Function variantProducer) { + List initialButtonThemes = getComponentThemes(component); + String initialButtonText = button.getText(); + + button.click(); + verifyThemeIsToggled(getComponentThemes(component), button.getText(), + initialButtonThemes, initialButtonText, + variantProducer.apply(button)); + + button.click(); + Assert.assertEquals( + "After two toggle variants button clicks, button text should be the same as before testing", + button.getText(), initialButtonText); + + List currentThemes = getComponentThemes(component); + String assertionMessage = "After two toggle variants button clicks, component 'theme' attribute should contain the same value as before testing"; + Assert.assertEquals(assertionMessage, currentThemes.size(), + initialButtonThemes.size()); + currentThemes.forEach(currentTheme -> Assert.assertTrue( + assertionMessage + String.format( + " but theme variant '%s' is missing", currentTheme), + initialButtonThemes.contains(currentTheme))); + + } + + private void verifyThemeIsToggled(List updatedThemes, + String updatedButtonText, List previousThemes, + String previousButtonText, String variantName) { + Assert.assertNotEquals("Button should change its text after toggling", + previousButtonText, updatedButtonText); + + boolean shouldAddTheme = previousButtonText.startsWith("Add"); + if (shouldAddTheme) { + Assert.assertTrue( + "When a theme variant got added, toggle button text should start with 'Remove' word", + updatedButtonText.startsWith("Remove")); + Assert.assertEquals( + "When a theme variant got added, component 'theme' attribute should contain one more variant that before", + previousThemes.size() + 1, updatedThemes.size()); + Assert.assertTrue( + "When a theme variant got added, component 'theme' attribute should contain all previous theme variants", + updatedThemes.containsAll(previousThemes)); + + Assert.assertTrue("The selected theme variant:" + variantName + + " should be added to the component 'theme' attribute.", + updatedThemes.contains(variantName)); + } else { + Assert.assertTrue( + "When a theme variant got removed, toggle button text should start with 'Add' word", + updatedButtonText.startsWith("Add")); + Assert.assertEquals( + "When a theme variant got removed, component 'theme' attribute should contain one less variant than before", + previousThemes.size() - 1, updatedThemes.size()); + Assert.assertTrue( + "When a theme variant got removed, previous theme variants should contain all theme variants from component 'theme' attribute", + previousThemes.containsAll(updatedThemes)); + Assert.assertFalse("The selected theme variant:" + variantName + + " should be removed from the component 'theme' attribute.", + updatedThemes.contains(variantName)); + } + } + + private List getComponentThemes(WebElement component) { + String themeAttributeValue = component.getAttribute("theme"); + if (themeAttributeValue == null || themeAttributeValue.isEmpty()) { + return Collections.emptyList(); + } + return Arrays.asList(themeAttributeValue.split(" ")); + } } diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/DemoNavigationBar.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/DemoNavigationBar.java index 51fcf224259..2ed8fa8c5c1 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/DemoNavigationBar.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/DemoNavigationBar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,6 +28,7 @@ * anchors acts like "tabs" in the UI. * * @author Vaadin Ltd + * @since 1.0 */ @Tag("nav") public class DemoNavigationBar extends HtmlContainer { diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/DemoView.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/DemoView.java index b828f992ddc..04cb990b2e2 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/DemoView.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/DemoView.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,16 +19,21 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.function.Supplier; import com.vaadin.flow.component.AttachEvent; import com.vaadin.flow.component.Component; import com.vaadin.flow.component.HasComponents; import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; import com.vaadin.flow.component.Tag; import com.vaadin.flow.component.dependency.JavaScript; import com.vaadin.flow.component.dependency.StyleSheet; import com.vaadin.flow.component.html.Div; import com.vaadin.flow.component.html.H3; +import com.vaadin.flow.component.html.NativeButton; import com.vaadin.flow.router.BeforeEvent; import com.vaadin.flow.router.HasUrlParameter; import com.vaadin.flow.router.OptionalParameter; @@ -40,6 +45,7 @@ * Base class for all the Views that demo some component. * * @author Vaadin Ltd + * @since 1.0 */ @Tag(Tag.DIV) @Theme(Lumo.class) @@ -48,12 +54,14 @@ @JavaScript("src/script/prism.js") public abstract class DemoView extends Component implements HasComponents, HasUrlParameter, HasStyle { + static final String VARIANT_TOGGLE_BUTTONS_DIV_ID = "variantToggleButtonsDiv"; + static final String COMPONENT_WITH_VARIANTS_ID = "componentWithVariantsDemo"; - private DemoNavigationBar navBar = new DemoNavigationBar(); - private Div container = new Div(); + private final DemoNavigationBar navBar = new DemoNavigationBar(); + private final Div container = new Div(); - private Map tabComponents = new HashMap<>(); - private Map> sourceCodeExamples = new HashMap<>(); + private final Map tabComponents = new HashMap<>(); + private final Map> sourceCodeExamples = new HashMap<>(); protected DemoView() { Route annotation = getClass().getAnnotation(Route.class); @@ -210,4 +218,71 @@ public void setParameter(BeforeEvent event, @OptionalParameter String parameter) { showTab(parameter == null ? "" : parameter); } + + /** + * Adds a demo that shows how the component looks like with specific + * variants applied. + * + * @param componentSupplier + * a method that creates the component to which variants will be + * applied to + * @param addVariant + * a function that adds the new variant to the component + * @param removeVariant + * a function that removes the variant from the component + * @param variantToThemeName + * function that converts variant to an html theme name + * @param variants + * list of variants to show in the demos + * @param + * variants' type + * @param + * component's type + */ + protected , C extends Component & HasTheme> void addVariantsDemo( + Supplier componentSupplier, BiConsumer addVariant, + BiConsumer removeVariant, + Function variantToThemeName, T... variants) { + + C component = componentSupplier.get(); + component.setId(COMPONENT_WITH_VARIANTS_ID); + + Div message = new Div(); + message.setText( + "Toggle a variant to see how the component's appearance will change."); + + Div variantsToggles = new Div(); + variantsToggles.setId(VARIANT_TOGGLE_BUTTONS_DIV_ID); + for (T variant : variants) { + if (variant.name().startsWith("LUMO_")) { + String variantName = variantToThemeName.apply(variant); + variantsToggles + .add(new NativeButton( + getButtonText(variantName, + component.getThemeNames() + .contains(variantName)), + event -> { + boolean variantPresent = component + .getThemeNames() + .contains(variantName); + if (variantPresent) { + removeVariant.accept(component, + variant); + } else { + addVariant.accept(component, variant); + } + event.getSource().setText(getButtonText( + variantName, !variantPresent)); + })); + + } + } + addCard("Theme variants usage", message, component, variantsToggles); + } + + private String getButtonText(String variantName, boolean variantPresent) { + return String.format( + variantPresent ? "Remove '%s' variant" : "Add '%s' variant", + variantName); + } } diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceCodeExample.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceCodeExample.java index 6801e6ecb3a..7480a28f2b0 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceCodeExample.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceCodeExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,6 +21,7 @@ * Object that defines a source code example to be shown together with a demo. * * @author Vaadin Ltd + * @since 1.0 */ public class SourceCodeExample implements Serializable { diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceContent.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceContent.java index df978c9ed09..e0d356b4105 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceContent.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceContent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,6 +24,7 @@ * prism * * @author Vaadin Ltd + * @since 1.0 */ @StyleSheet("src/css/sources.css") public class SourceContent extends Div { diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceContentResolver.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceContentResolver.java index a58ced01b29..6d2c1f945a9 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceContentResolver.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/SourceContentResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,6 +35,7 @@ * Utility class for obtaining {@link SourceCodeExample}s for classes. * * @author Vaadin Ltd + * @since 1.0 */ public class SourceContentResolver { diff --git a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/TabbedComponentDemoTest.java b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/TabbedComponentDemoTest.java index 562ab407668..a6c5f5824f4 100644 --- a/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/TabbedComponentDemoTest.java +++ b/flow-components-parent/flow-component-demo-helpers/src/main/java/com/vaadin/flow/demo/TabbedComponentDemoTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-button.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-button.json index 0ab6873be92..7429f596f00 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-button.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-button.json @@ -2,7 +2,7 @@ "name": "Vaadin.ButtonElement", "tag": "vaadin-button", "baseUrl": "vaadin-button/src/vaadin-button.html", - "version": "2.0.1", + "version": "2.1.0-alpha3", "properties": [ { "name": "autofocus", @@ -21,7 +21,14 @@ "description": "If true, the user cannot interact with this element.\n " } ], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], "events": [], "slots": [ "prefix", @@ -35,5 +42,22 @@ "Vaadin.ThemableMixin", "Polymer.GestureEventListeners" ], - "description": "`` is a Polymer 2 element providing an accessible and customizable button.\n\n```html\n\n\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label (text) inside the button\n`prefix` | A slot for e.g. an icon before the label\n`suffix` | A slot for e.g. an icon after the label\n\n\nThe following attributes are exposed for styling:\n\nAttribute | Description\n--------- | -----------\n`active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n`disabled` | Set when the button is disabled.\n`focus-ring` | Set when the button is focused using the keyboard.\n`focused` | Set when the button is focused.\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" + "variants": { + "lumo": [ + "small", + "large", + "tertiary", + "tertiary-inline", + "primary", + "success", + "error", + "contrast", + "icon" + ], + "material": [ + "contained", + "outlined" + ] + }, + "description": "`` is a Polymer 2 element providing an accessible and customizable button.\n\n```html\n\n\n```\n\n```js\ndocument.querySelector('vaadin-button').addEventListener('click', () => alert('Hello World!'));\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label (text) inside the button\n`prefix` | A slot for e.g. an icon before the label\n`suffix` | A slot for e.g. an icon after the label\n\n\nThe following attributes are exposed for styling:\n\nAttribute | Description\n--------- | -----------\n`active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n`disabled` | Set when the button is disabled.\n`focus-ring` | Set when the button is focused using the keyboard.\n`focused` | Set when the button is focused.\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-checkbox-group.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-checkbox-group.json new file mode 100644 index 00000000000..9c7414d0d2b --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-checkbox-group.json @@ -0,0 +1,100 @@ +{ + "name": "Vaadin.CheckboxGroupElement", + "tag": "vaadin-checkbox-group", + "baseUrl": "vaadin-checkbox/src/vaadin-checkbox-group.html", + "version": "2.2.0-alpha3", + "properties": [ + { + "name": "disabled", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "The current disabled state of the checkbox group. True if group and all internal checkboxes are disabled.\n " + }, + { + "name": "label", + "type": [ + "STRING" + ], + "objectType": [], + "description": "String used for the label element.\n " + }, + { + "name": "value", + "type": [ + "ARRAY" + ], + "objectType": [], + "description": "Value of the checkbox group.\n ", + "notify": true + }, + { + "name": "errorMessage", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Error to show when the input value is invalid.\n " + }, + { + "name": "required", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "Specifies that the user must fill in a value.\n " + }, + { + "name": "invalid", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "This property is set to true when the control value is invalid.\n ", + "notify": true + } + ], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "validate", + "description": "Returns true if `value` is valid.\n`` uses this to check the validity or all its elements.", + "parameters": [], + "returns": "BOOLEAN" + } + ], + "events": [ + { + "name": "value-changed", + "description": "Fired when the `value` property changes.", + "properties": [] + }, + { + "name": "invalid-changed", + "description": "Fired when the `invalid` property changes.", + "properties": [] + } + ], + "slots": [ + "" + ], + "behaviors": [], + "mixins": [ + "Vaadin.ThemableMixin" + ], + "variants": { + "lumo": [ + "vertical" + ], + "material": [ + "vertical" + ] + }, + "description": "`` is a Polymer element for grouping vaadin-checkboxes.\n\n```html\n\n English\n Français\n Deutsch\n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label element\n`group-field` | The element that wraps checkboxes\n`error-message` | The error message element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`disabled` | Set when the checkbox group and its children are disabled. | :host\n`has-label` | Set when the element has a label | :host\n`required` | Set when the element is required | :host\n`invalid` | Set when the element is invalid | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-checkbox.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-checkbox.json index da4728d5c10..ae619310355 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-checkbox.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-checkbox.json @@ -2,7 +2,7 @@ "name": "Vaadin.CheckboxElement", "tag": "vaadin-checkbox", "baseUrl": "vaadin-checkbox/src/vaadin-checkbox.html", - "version": "2.1.1", + "version": "2.2.0-alpha3", "properties": [ { "name": "autofocus", @@ -55,7 +55,14 @@ "description": "The value given to the data submitted with the checkbox's name to the server when the control is inside a form.\n " } ], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], "events": [ { "name": "change", @@ -83,5 +90,6 @@ "Vaadin.ThemableMixin", "Polymer.GestureEventListeners" ], + "variants": {}, "description": "`` is a Polymer 2 element for customized checkboxes.\n\n```html\n\n Make my profile visible\n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|----------------\n`checkbox` | The checkbox element\n`label` | The label content element\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|------------\n`active` | Set when the checkbox is pressed down, either with mouse, touch or the keyboard.\n`disabled` | Set when the checkbox is disabled.\n`focus-ring` | Set when the checkbox is focused using the keyboard.\n`focused` | Set when the checkbox is focused.\n`indeterminate` | Set when the checkbox is in indeterminate mode.\n`checked` | Set when the checkbox is checked.\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-dropdown-wrapper.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-dropdown-wrapper.json index 5bf50d8cb7b..b60e6f70d64 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-dropdown-wrapper.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-dropdown-wrapper.json @@ -91,5 +91,6 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "Element for internal use only." } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-dropdown.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-dropdown.json index 83b513a52f6..9c396457d66 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-dropdown.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-dropdown.json @@ -94,5 +94,6 @@ ], "behaviors": [], "mixins": [], + "variants": {}, "description": "Element for internal use only." } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-item.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-item.json index 31eaa22de3c..c599cb8ed9b 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-item.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-item.json @@ -15,7 +15,7 @@ { "name": "item", "type": [ - "STRING", + "OBJECT", "OBJECT" ], "objectType": [], @@ -47,6 +47,12 @@ } ], "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, { "name": "connectedCallback", "description": "", @@ -60,5 +66,6 @@ "mixins": [ "Vaadin.ThemableMixin" ], + "variants": {}, "description": "The default element used for items in the vaadin-combo-box.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---|---\n`content` | The element that wraps the item label or template content\n\nThe following state attributes are exposed for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`selected` | Set when the item is selected | :host\n`focused` | Set when the item is focused | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-light.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-light.json index ca4c9744eff..f20d86d7535 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-light.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-light.json @@ -2,7 +2,7 @@ "name": "Vaadin.ComboBoxLightElement", "tag": "vaadin-combo-box-light", "baseUrl": "vaadin-combo-box/src/vaadin-combo-box-light.html", - "version": "4.0.1", + "version": "4.1.0-alpha3", "properties": [ { "name": "opened", @@ -170,6 +170,12 @@ "parameters": [], "returns": "UNDEFINED" }, + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, { "name": "connectedCallback", "description": "", @@ -219,7 +225,7 @@ "name": "detail.value", "type": [ "OBJECT", - "STRING" + "OBJECT" ], "objectType": [], "description": "the selected item. Type is the same as the type of `items`." @@ -257,5 +263,6 @@ "Vaadin.ComboBoxMixin", "Vaadin.ThemableMixin" ], + "variants": {}, "description": "`` is a customizable version of the `` providing\nonly the dropdown functionality and leaving the input field definition to the user.\n\nThe element has the same API as ``.\n\nTo create a custom input field, you need to add a child element which has a two-way\ndata-bindable property representing the input value. The property name is expected\nto be `value` by default. See the example below for a simplest possible example\nusing a `` element.\n\n```html\n\n \n \n\n```\n\nIf you are using other custom input fields like ``, you\nneed to define the name of the bindable property with the `attrForValue` attribute.\n\n```html\n\n \n \n \n\n```\n\nIn the next example you can see how to create a custom input field based\non a `` decorated with a custom `` and\ntwo ``s to act as the clear and toggle controls.\n\n```html\n\n \n \n Clear\n Toggle\n \n\n```" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-overlay.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-overlay.json index b98d360ed14..1f9b9ef393f 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-overlay.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box-overlay.json @@ -65,6 +65,12 @@ } ], "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, { "name": "close", "description": "", @@ -133,5 +139,6 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "The overlay element.\n\n### Styling\n\nSee [`` documentation](https://github.com/vaadin/vaadin-overlay/blob/master/src/vaadin-overlay.html)\nfor `` parts.\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box.json index e22eabf1548..6ec8e08452e 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-combo-box.json @@ -2,7 +2,7 @@ "name": "Vaadin.ComboBoxElement", "tag": "vaadin-combo-box", "baseUrl": "vaadin-combo-box/src/vaadin-combo-box.html", - "version": "4.0.1", + "version": "4.1.0-alpha3", "properties": [ { "name": "autofocus", @@ -220,6 +220,12 @@ "description": "Returns true if the current input value satisfies all constraints (if any)\n\nYou can override the `checkValidity` method for custom validations.\n ", "parameters": [], "returns": "UNDEFINED" + }, + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" } ], "events": [ @@ -258,7 +264,7 @@ "name": "detail.value", "type": [ "OBJECT", - "STRING" + "OBJECT" ], "objectType": [], "description": "the selected item. Type is the same as the type of `items`." @@ -298,5 +304,6 @@ "Vaadin.ComboBoxMixin", "Vaadin.ThemableMixin" ], + "variants": {}, "description": "`` is a combo box element combining a dropdown list with an\ninput field for filtering the list of items. If you want to replace the default\ninput field with a custom implementation, you should use the\n[``](#/elements/vaadin-combo-box-light) element.\n\nItems in the dropdown list must be provided as a list of `String` values.\nDefining the items is done using the `items` property, which can be assigned\nwith data-binding, using an attribute or directly with the JavaScript property.\n\n```html\n\n\n```\n\n```js\ncombobox.items = ['apple', 'orange', 'banana'];\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\nThis element can be used within an `iron-form`.\n\n### Item Template\n\n`` supports using custom item template provided in the light\nDOM:\n\n```html\n\n \n\n```\n\nThe following properties are available for item template bindings:\n\nProperty name | Type | Description\n--------------|------|------------\n`index`| Number | Index of the item in the `items` array\n`item` | String or Object | The item reference\n`selected` | Boolean | True when item is selected\n`focused` | Boolean | True when item is focused\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|-------------\n`--vaadin-combo-box-overlay-max-height` | Property that determines the max height of overlay | `65vh`\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`text-field` | The text field\n`clear-button` | The clear button\n`toggle-button` | The toggle button\n\nSee [`` documentation](https://github.com/vaadin/vaadin-overlay/blob/master/src/vaadin-overlay.html)\nfor `` parts.\n\nSee [`` documentation](https://vaadin.com/components/vaadin-text-field/html-api/elements/Vaadin.TextFieldElement)\nfor the text field parts.\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`opened` | Set when the combo box dropdown is open | :host\n`disabled` | Set to a disabled combo box | :host\n`readonly` | Set to a read only combo box | :host\n`has-value` | Set when the element has a value | :host\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`loading` | Set when new items are expected | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-context-menu-overlay.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-context-menu-overlay.json new file mode 100644 index 00000000000..69e3e171978 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-context-menu-overlay.json @@ -0,0 +1,144 @@ +{ + "name": "Vaadin.ContextMenuOverlayElement", + "tag": "vaadin-context-menu-overlay", + "baseUrl": "vaadin-context-menu/src/vaadin-context-menu-overlay.html", + "version": "UNKNOWN", + "properties": [ + { + "name": "opened", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "", + "notify": true + }, + { + "name": "template", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "The template of the overlay content.\n ", + "notify": true + }, + { + "name": "instanceProps", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "" + }, + { + "name": "content", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "References the content container after the template is stamped.\n ", + "notify": true + }, + { + "name": "withBackdrop", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "" + }, + { + "name": "modeless", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When true the overlay won't disable the main content, showing\nit doesn’t change the functionality of the user interface.\n " + }, + { + "name": "focusTrap", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When true move focus to the first focusable element in the overlay,\nor to the overlay if there are no focusable elements.\n " + } + ], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "close", + "description": "", + "parameters": [ + { + "name": "sourceEvent", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Missing documentation!" + } + ], + "returns": "UNDEFINED" + }, + { + "name": "connectedCallback", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "disconnectedCallback", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], + "events": [ + { + "name": "vaadin-overlay-close", + "description": "vaadin-overlay-close\nfired before the `vaadin-overlay` will be closed. If canceled the closing of the overlay is canceled as well.", + "properties": [] + }, + { + "name": "vaadin-overlay-escape-press", + "description": "vaadin-overlay-escape-press\nfired before the `vaadin-overlay` will be closed on ESC button press. If canceled the closing of the overlay is canceled as well.", + "properties": [] + }, + { + "name": "vaadin-overlay-open", + "description": "vaadin-overlay-open\nfired after the `vaadin-overlay` is opened.", + "properties": [] + }, + { + "name": "vaadin-overlay-outside-click", + "description": "vaadin-overlay-outside-click\nfired before the `vaadin-overlay` will be closed on outside click. If canceled the closing of the overlay is canceled as well.", + "properties": [] + }, + { + "name": "opened-changed", + "description": "Fired when the `opened` property changes.", + "properties": [] + }, + { + "name": "template-changed", + "description": "Fired when the `template` property changes.", + "properties": [] + }, + { + "name": "content-changed", + "description": "Fired when the `content` property changes.", + "properties": [] + } + ], + "slots": [], + "behaviors": [], + "mixins": [], + "variants": {}, + "description": "The overlay element.\n\n### Styling\n\nSee [`` documentation](https://github.com/vaadin/vaadin-overlay/blob/master/src/vaadin-overlay.html)\nfor `` parts.\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-context-menu.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-context-menu.json new file mode 100644 index 00000000000..fcb2679b3c1 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-context-menu.json @@ -0,0 +1,81 @@ +{ + "name": "Vaadin.ContextMenuElement", + "tag": "vaadin-context-menu", + "baseUrl": "vaadin-context-menu/src/vaadin-context-menu.html", + "version": "4.1.0-alpha4", + "properties": [ + { + "name": "selector", + "type": [ + "STRING" + ], + "objectType": [], + "description": "CSS selector that can be used to target any child element\nof the context menu to listen for `openOn` events.\n " + }, + { + "name": "opened", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "True if the overlay is currently displayed.\n ", + "readOnly": true, + "notify": true + }, + { + "name": "openOn", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Event name to listen for opening the context menu.\n " + }, + { + "name": "listenOn", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "The target element that's listened to for context menu opening events.\nBy default the vaadin-context-menu listens to the target's `vaadin-contextmenu`\nevents." + }, + { + "name": "closeOn", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Event name to listen for closing the context menu.\n " + } + ], + "methods": [ + { + "name": "close", + "description": "Closes the overlay.\n ", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "open", + "description": "Opens the overlay.", + "parameters": [], + "returns": "UNDEFINED" + } + ], + "events": [ + { + "name": "opened-changed", + "description": "Fired when the `opened` property changes.", + "properties": [] + } + ], + "slots": [ + "" + ], + "behaviors": [], + "mixins": [ + "Vaadin.ElementMixin", + "Polymer.GestureEventListeners" + ], + "variants": {}, + "description": "```html\n\n \n\n```\n\n### “vaadin-contextmenu” Gesture Event\n\n`vaadin-contextmenu` is a gesture event (a custom event fired by Polymer),\nwhich is dispatched after either `contextmenu` and long touch events.\nThis enables support for both mouse and touch environments in a uniform way.\n\n`` opens the menu overlay on the `vaadin-contextmenu`\nevent by default.\n\n### Menu Listener\n\nBy default, the `` element listens for the menu opening\nevent on itself. In order to have a context menu on your content, wrap\nyour content with the `` element, and add a template\nelement with a menu. Example:\n\n```html\n\n \n\n

This paragraph has the context menu provided in the above template.

\n

Another paragraph with the context menu.

\n\n```\n\nIn case if you do not want to wrap the page content, you can listen for\nevents on an element outside the `` by setting the\n`listenOn` property:\n\n```html\n\n \n\n\n
The element that listens for the context menu.
\n\n<script>\n const contextMenu = document.querySelector('vaadin-context-menu#customListener');\n contextMenu.listenOn = document.querySelector('#menuListener');\n</script>\n```\n\n### Filtering Menu Targets\n\nBy default, the listener element and all its descendants open the context\nmenu. You can filter the menu targets to a smaller set of elements inside\nthe listener element by setting the `selector` property.\n\nIn the following example, only the elements matching `.has-menu` will open the context menu:\n\n```html\n\n \n\n

This paragraph opens the context menu

\n

This paragraph does not open the context menu

\n
\n```\n\n### Menu Context\n\nYou can bind to the following properties in the menu template:\n\n- `target` is the menu opening event target, which is the element that\nthe user has called the context menu for\n- `detail` is the menu opening event detail\n\nIn the following example, the menu item text is composed with the contents\nof the element that opened the menu:\n\n```html\n\n \n\n
    \n
  • Foo
  • \n
  • Bar
  • \n
  • Baz
  • \n
\n
\n```\n\n### Styling\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-light.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-light.json index b921d0193ff..0599eea9c54 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-light.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-light.json @@ -2,7 +2,7 @@ "name": "Vaadin.DatePickerLightElement", "tag": "vaadin-date-picker-light", "baseUrl": "vaadin-date-picker/src/vaadin-date-picker-light.html", - "version": "3.0.1", + "version": "3.2.0-alpha4", "properties": [ { "name": "value", @@ -96,6 +96,12 @@ } ], "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, { "name": "open", "description": "Opens the dropdown.\n ", @@ -139,7 +145,13 @@ "returns": "BOOLEAN" } ], - "events": [], + "events": [ + { + "name": "change", + "description": "change", + "properties": [] + } + ], "slots": [ "" ], @@ -148,5 +160,6 @@ "Vaadin.ThemableMixin", "Vaadin.DatePickerMixin" ], + "variants": {}, "description": "`` is a customizable version of the `` providing\nonly the scrollable month calendar view and leaving the input field definition to the user.\n\nTo create a custom input field, you need to add a child element which has a two-way\ndata-bindable property representing the input value. The property name is expected\nto be `bindValue` by default. See the example below for a simplest possible example\nusing an `` element extended with `iron-input`.\n\n```html\n\n \n \n \n\n```\n\nIf you are using other custom input fields like ``, you\nneed to define the name of value property using the `attrForValue` property.\n\n```html\n\n \n \n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description | Theme for Element\n----------------|----------------|----------------\n`overlay-content` | The overlay element | vaadin-date-picker-light\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-overlay-content.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-overlay-content.json index 327a62287d4..51a8737ddc5 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-overlay-content.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-overlay-content.json @@ -166,5 +166,6 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-overlay.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-overlay.json index 234d8314b8d..0a18ff1cb90 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-overlay.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker-overlay.json @@ -65,6 +65,12 @@ } ], "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, { "name": "close", "description": "", @@ -133,5 +139,6 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "The overlay element.\n\n### Styling\n\nSee [`` documentation](https://github.com/vaadin/vaadin-overlay/blob/master/src/vaadin-overlay.html)\nfor `` parts.\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker.json index 966015a2bee..bc202879f1f 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-date-picker.json @@ -2,7 +2,7 @@ "name": "Vaadin.DatePickerElement", "tag": "vaadin-date-picker", "baseUrl": "vaadin-date-picker/src/vaadin-date-picker.html", - "version": "3.0.1", + "version": "3.2.0-alpha4", "properties": [ { "name": "autofocus", @@ -137,6 +137,12 @@ } ], "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, { "name": "open", "description": "Opens the dropdown.\n ", @@ -181,6 +187,11 @@ } ], "events": [ + { + "name": "change", + "description": "change", + "properties": [] + }, { "name": "invalid-changed", "description": "Fired when the `invalid` property changes.", @@ -198,5 +209,6 @@ "Vaadin.DatePickerMixin", "Polymer.GestureEventListeners" ], + "variants": {}, "description": "`` is a date selection field which includes a scrollable\nmonth calendar view.\n```html\n\n```\n```js\ndatePicker.value = '2016-03-02';\n```\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description | Theme for Element\n----------------|----------------|----------------\n`text-field` | Input element | vaadin-date-picker\n`clear-button` | Clear button | vaadin-date-picker\n`toggle-button` | Toggle button | vaadin-date-picker\n`overlay-content` | The overlay element | vaadin-date-picker\n`overlay-header` | Fullscreen mode header | vaadin-date-picker-overlay-content\n`label` | Fullscreen mode value/label | vaadin-date-picker-overlay-content\n`clear-button` | Fullscreen mode clear button | vaadin-date-picker-overlay-content\n`toggle-button` | Fullscreen mode toggle button | vaadin-date-picker-overlay-content\n`years-toggle-button` | Fullscreen mode years scroller toggle | vaadin-date-picker-overlay-content\n`months` | Months scroller | vaadin-date-picker-overlay-content\n`years` | Years scroller | vaadin-date-picker-overlay-content\n`toolbar` | Footer bar with buttons | vaadin-date-picker-overlay-content\n`today-button` | Today button | vaadin-date-picker-overlay-content\n`cancel-button` | Cancel button | vaadin-date-picker-overlay-content\n`month` | Month calendar | vaadin-date-picker-overlay-content\n`year-number` | Year number | vaadin-date-picker-overlay-content\n`year-separator` | Year separator | vaadin-date-picker-overlay-content\n`month-header` | Month title | vaadin-month-calendar\n`weekdays` | Weekday container | vaadin-month-calendar\n`weekday` | Weekday element | vaadin-month-calendar\n`week-numbers` | Week numbers container | vaadin-month-calendar\n`week-number` | Week number element | vaadin-month-calendar\n`date` | Date element | vaadin-month-calendar\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`invalid` | Set when the element is invalid | :host\n`opened` | Set when the date selector overlay is opened | :host\n`readonly` | Set when the element is readonly | :host\n`disabled` | Set when the element is disabled | :host\n`today` | Set on the date corresponding to the current day | date\n`focused` | Set on the focused date | date\n`disabled` | Set on the date out of the allowed range | date\n`selected` | Set on the selected date | date\n\nIf you want to replace the default input field with a custom implementation, you should use the\n[``](#vaadin-date-picker-light) element." } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-device-detector.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-device-detector.json new file mode 100644 index 00000000000..5fc0612f325 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-device-detector.json @@ -0,0 +1,59 @@ +{ + "name": "Vaadin.DeviceDetectorElement", + "tag": "vaadin-device-detector", + "baseUrl": "vaadin-context-menu/src/vaadin-device-detector.html", + "version": "UNKNOWN", + "properties": [ + { + "name": "phone", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "`true`, when running in a phone.\n ", + "readOnly": true, + "notify": true + }, + { + "name": "touch", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "`true`, when running in a touch device.", + "notify": true + }, + { + "name": "wide", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "`true`, when running in a tablet/desktop device.\n ", + "notify": true + } + ], + "methods": [], + "events": [ + { + "name": "phone-changed", + "description": "Fired when the `phone` property changes.", + "properties": [] + }, + { + "name": "touch-changed", + "description": "Fired when the `touch` property changes.", + "properties": [] + }, + { + "name": "wide-changed", + "description": "Fired when the `wide` property changes.", + "properties": [] + } + ], + "slots": [], + "behaviors": [], + "mixins": [], + "variants": {}, + "description": "Element for internal use only." +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-dialog-overlay.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-dialog-overlay.json index c3ce1a2d726..15270087739 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-dialog-overlay.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-dialog-overlay.json @@ -65,6 +65,12 @@ } ], "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, { "name": "close", "description": "", @@ -133,5 +139,6 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "The overlay element.\n\n### Styling\n\nSee [`` documentation](https://github.com/vaadin/vaadin-overlay/blob/master/src/vaadin-overlay.html)\nfor `` parts." } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-dialog.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-dialog.json index 2afef238be0..b09c3274b48 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-dialog.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-dialog.json @@ -49,5 +49,6 @@ "mixins": [ "Vaadin.ElementMixin" ], + "variants": {}, "description": "`` is a Polymer 2 element for customized modal dialogs.\n\n```html\n\n \n\n```\n\n### Styling\n\nSee [`` documentation](https://github.com/vaadin/vaadin-overlay/blob/master/src/vaadin-overlay.html)\nfor `` parts.\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-form-item.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-form-item.json index 6cb1fad085e..c69bddb9338 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-form-item.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-form-item.json @@ -2,9 +2,16 @@ "name": "Vaadin.FormItemElement", "tag": "vaadin-form-item", "baseUrl": "vaadin-form-layout/src/vaadin-form-item.html", - "version": "2.0.1", + "version": "2.1.0-alpha4", "properties": [], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], "events": [], "slots": [ "label", @@ -14,5 +21,6 @@ "mixins": [ "Vaadin.ThemableMixin" ], + "variants": {}, "description": "`` is a Polymer 2 element providing labelled form item wrapper\nfor using inside ``.\n\n`` accepts any number of children as the input content,\nand also has a separate named `label` slot:\n\n```html\n\n \n \n\n```\n\nAny content can be used. For instance, you can have multiple input elements\nwith surrounding text. The label can be an element of any type:\n\n```html\n\n Date of Birth\n -\n -\n
\n Example: 1900-01-01\n
\n```\n\nThe label is optional and can be omitted:\n\n```html\n\n Subscribe to our Newsletter\n\n```\n\nBy default, the `label` slot content is displayed aside of the input content.\nWhen `label-position=\"top\"` is set, the `label` slot content is displayed on top:\n\n```html\n\n \n \n\n```\n\n**Note:** Normally, `` is used as a child of\na `` element. Setting `label-position` is unnecessary,\nbecause the `label-position` attribute is triggered automatically by the parent\n``, depending on its width and responsive behavior.\n\n### Input Width\n\nBy default, `` does not manipulate the width of the slotted\ninput elements. Optionally you can stretch the child input element to fill\nthe available width for the input content by adding the `full-width` class:\n\n```html\n\n \n \n\n```\n\n### Styling\n\nThe `label-position` host attribute can be used to target the label on top state:\n\n
\n<dom-module id=\"my-form-item-theme\" theme-for=\"vaadin-form-item\">\n  <template>\n    <style>\n      :host {\n        /* default state styles, label aside */\n      }\n\n      :host([label-position=\"top\"]) {\n        /* label on top state styles */\n      }\n    </style>\n  </template>\n</dom-module>\n
\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---|---\nlabel | The label slot container\n\n### Custom CSS Properties Reference\n\nThe following custom CSS properties are available on the ``\nelement:\n\nCustom CSS property | Description | Default\n---|---|---\n`--vaadin-form-item-label-width` | Width of the label column when the labels are aside | `8em`\n`--vaadin-form-item-label-spacing` | Spacing between the label column and the input column when the labels are aside | `1em`\n`--vaadin-form-item-row-spacing` | Height of the spacing between the form item elements | `1em`\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-form-layout.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-form-layout.json index 22fbc90181d..549d3cd5155 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-form-layout.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-form-layout.json @@ -2,7 +2,7 @@ "name": "Vaadin.FormLayoutElement", "tag": "vaadin-form-layout", "baseUrl": "vaadin-form-layout/src/vaadin-form-layout.html", - "version": "2.0.1", + "version": "2.1.0-alpha4", "properties": [ { "name": "responsiveSteps", @@ -14,12 +14,6 @@ } ], "methods": [ - { - "name": "connectedCallback", - "description": "", - "parameters": [], - "returns": "UNDEFINED" - }, { "name": "updateStyles", "description": "Set custom CSS property values and update the layout.\n ", @@ -34,6 +28,12 @@ } ], "returns": "UNDEFINED" + }, + { + "name": "connectedCallback", + "description": "", + "parameters": [], + "returns": "UNDEFINED" } ], "events": [], @@ -45,5 +45,6 @@ "Vaadin.ElementMixin", "Vaadin.ThemableMixin" ], + "variants": {}, "description": "`` is a Polymer 2 element providing configurable responsive\nlayout for form elements.\n\n```html\n\n\n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n\n```\n\nIt supports any child elements as layout items.\n\nBy default, it makes a layout of two columns if the element width is equal or\nwider than 40em, and a single column layout otherwise.\n\nThe number of columns and the responsive behavior are customizable with\nthe `responsiveSteps` property.\n\n### Spanning Items on Multiple Columns\n\nYou can use `colspan` attribute on the items.\nIn the example below, the first text field spans on two columns:\n\n```html\n\n\n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n\n```\n\n### Explicit New Row\n\nUse the `
` line break element to wrap the items on a new row:\n\n```html\n\n\n \n \n \n \n\n
\n\n \n \n \n \n\n
\n```\n\n### CSS Properties Reference\n\nThe following custom CSS properties are available on the ``\nelement:\n\nCustom CSS property | Description | Default\n---|---|---\n`--vaadin-form-layout-column-spacing` | Length of the spacing between columns | `2em`" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-column-group.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-column-group.json new file mode 100644 index 00000000000..7e5e14a507d --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-column-group.json @@ -0,0 +1,59 @@ +{ + "name": "Vaadin.GridColumnGroupElement", + "tag": "vaadin-grid-column-group", + "baseUrl": "vaadin-grid/src/vaadin-grid-column-group.html", + "version": "5.1.0-alpha3", + "properties": [ + { + "name": "resizable", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When set to true, the column is user-resizable." + }, + { + "name": "frozen", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.\n " + }, + { + "name": "hidden", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When set to true, the cells for this column are hidden.\n " + }, + { + "name": "flexGrow", + "type": [ + "NUMBER" + ], + "objectType": [], + "description": "Flex grow ratio for the column group as the sum of the ratios of its child columns.\n ", + "readOnly": true + }, + { + "name": "width", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Width of the column group as the sum of the widths of its child columns.\n ", + "readOnly": true + } + ], + "methods": [], + "events": [], + "slots": [], + "behaviors": [], + "mixins": [ + "Vaadin.Grid.ColumnBaseMixin" + ], + "variants": {}, + "description": "A `` is used to make groups of columns in `` and\nto configure additional headers and footers.\n\nGroups can be nested to create complex header and footer configurations.\n\nThe `class` attribute is used to differentiate header and footer templates.\n\n#### Example:\n```html\n\n \n\n \n \n \n \n \n \n \n \n\n```" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-column.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-column.json new file mode 100644 index 00000000000..86713932979 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-column.json @@ -0,0 +1,57 @@ +{ + "name": "Vaadin.GridColumnElement", + "tag": "vaadin-grid-column", + "baseUrl": "vaadin-grid/src/vaadin-grid-column.html", + "version": "5.1.0-alpha3", + "properties": [ + { + "name": "resizable", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When set to true, the column is user-resizable." + }, + { + "name": "frozen", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.\n " + }, + { + "name": "hidden", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When set to true, the cells for this column are hidden.\n " + }, + { + "name": "width", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Width of the cells for this column.\n " + }, + { + "name": "flexGrow", + "type": [ + "NUMBER" + ], + "objectType": [], + "description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.\n " + } + ], + "methods": [], + "events": [], + "slots": [], + "behaviors": [], + "mixins": [ + "Vaadin.Grid.ColumnBaseMixin" + ], + "variants": {}, + "description": "A `` is used to configure how a column in ``\nshould look like by using HTML templates.\nA column can have a template for each of the three table sections: header, body and footer.\n\nThe `class` attribute is used to differentiate header and footer templates from the body template.\n\n#### Example:\n```html\n\n \n \n \n\n```" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-filter.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-filter.json new file mode 100644 index 00000000000..06507cfde72 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-filter.json @@ -0,0 +1,47 @@ +{ + "name": "Vaadin.GridFilterElement", + "tag": "vaadin-grid-filter", + "baseUrl": "vaadin-grid/src/vaadin-grid-filter.html", + "version": "5.1.0-alpha3", + "properties": [ + { + "name": "path", + "type": [ + "STRING" + ], + "objectType": [], + "description": "JS Path of the property in the item used for filtering the data.\n " + }, + { + "name": "value", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Current filter value.\n ", + "notify": true + } + ], + "methods": [ + { + "name": "focus", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], + "events": [ + { + "name": "value-changed", + "description": "Fired when the `value` property changes.", + "properties": [] + } + ], + "slots": [ + "filter" + ], + "behaviors": [], + "mixins": [], + "variants": {}, + "description": "`` is a helper element for the `` that provides out-of-the-box UI controls,\nand handlers for filtering the grid data.\n\n#### Example:\n```html\n\n \n \n\n```" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-outer-scroller.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-outer-scroller.json new file mode 100644 index 00000000000..87b68ac3456 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-outer-scroller.json @@ -0,0 +1,64 @@ +{ + "name": "GridOuterScrollerElement", + "tag": "vaadin-grid-outer-scroller", + "baseUrl": "vaadin-grid/src/vaadin-grid-outer-scroller.html", + "version": "UNKNOWN", + "properties": [ + { + "name": "scrollTarget", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "" + }, + { + "name": "scrollHandler", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "" + }, + { + "name": "passthrough", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "" + }, + { + "name": "outerScrolling", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "" + }, + { + "name": "noScrollbars", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "" + } + ], + "methods": [ + { + "name": "syncOuterScroller", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], + "events": [], + "slots": [ + "" + ], + "behaviors": [], + "mixins": [], + "variants": {}, + "description": "This Element is used internally by vaadin-grid." +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-scroller.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-scroller.json new file mode 100644 index 00000000000..8c6d25cba07 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-scroller.json @@ -0,0 +1,36 @@ +{ + "name": "GridScrollerElement", + "tag": "vaadin-grid-scroller", + "baseUrl": "vaadin-grid/src/vaadin-grid-scroller.html", + "version": "UNKNOWN", + "properties": [ + { + "name": "size", + "type": [ + "NUMBER" + ], + "objectType": [], + "description": "" + } + ], + "methods": [ + { + "name": "clearSelection", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "updateViewportBoundaries", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], + "events": [], + "slots": [], + "behaviors": [], + "mixins": [], + "variants": {}, + "description": "This Element is used internally by vaadin-grid." +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-selection-column.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-selection-column.json new file mode 100644 index 00000000000..29f2971d927 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-selection-column.json @@ -0,0 +1,55 @@ +{ + "name": "Vaadin.GridSelectionColumnElement", + "tag": "vaadin-grid-selection-column", + "baseUrl": "vaadin-grid/src/vaadin-grid-selection-column.html", + "version": "5.1.0-alpha3", + "properties": [ + { + "name": "width", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Width of the cells for this column.\n " + }, + { + "name": "flexGrow", + "type": [ + "NUMBER" + ], + "objectType": [], + "description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.\n " + }, + { + "name": "selectAll", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When true, all the items are selected.\n ", + "notify": true + }, + { + "name": "autoSelect", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When true, the active gets automatically selected.\n " + } + ], + "methods": [], + "events": [ + { + "name": "select-all-changed", + "description": "Fired when the `selectAll` property changes.", + "properties": [] + } + ], + "slots": [], + "behaviors": [], + "mixins": [], + "variants": {}, + "description": "`` is a helper element for the ``\nthat provides default templates and functionality for item selection.\n\n#### Example:\n```html\n\n \n\n \n ...\n```\n\nBy default the selection column displays `` elements in the\ncolumn cells. The checkboxes in the body rows toggle selection of the corresponding row items.\n\nWhen the grid data is provided as an array of [`items`](#/elements/vaadin-grid#property-items),\nthe column header gets an additional checkbox that can be used for toggling\nselection for all the items at once.\n\n__The default content templates can also be overridden with custom ones.__", + "parentTagName": "vaadin-grid-column" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-sorter.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-sorter.json new file mode 100644 index 00000000000..1c819778c19 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-sorter.json @@ -0,0 +1,40 @@ +{ + "name": "Vaadin.GridSorterElement", + "tag": "vaadin-grid-sorter", + "baseUrl": "vaadin-grid/src/vaadin-grid-sorter.html", + "version": "5.1.0-alpha3", + "properties": [ + { + "name": "path", + "type": [ + "STRING" + ], + "objectType": [], + "description": "JS Path of the property in the item used for sorting the data.\n " + }, + { + "name": "direction", + "type": [ + "STRING" + ], + "objectType": [], + "description": "How to sort the data.\nPossible values are `asc` to use an ascending algorithm, `desc` to sort the data in\ndescending direction, or `null` for not sorting the data.\n ", + "notify": true + } + ], + "methods": [], + "events": [ + { + "name": "direction-changed", + "description": "Fired when the `direction` property changes.", + "properties": [] + } + ], + "slots": [ + "" + ], + "behaviors": [], + "mixins": [], + "variants": {}, + "description": "`` is a helper element for the `` that provides out-of-the-box UI controls,\nvisual feedback, and handlers for sorting the grid data.\n\n#### Example:\n```html\n\n \n \n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`content` | The slotted content wrapper\n`indicators` | The internal sorter indicators.\n`order` | The internal sorter order\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`direction` | Sort direction of a sorter | :host" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-templatizer.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-templatizer.json new file mode 100644 index 00000000000..a54fef0724e --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-templatizer.json @@ -0,0 +1,68 @@ +{ + "name": "Vaadin.GridTemplatizer", + "tag": "vaadin-grid-templatizer", + "baseUrl": "vaadin-grid/src/vaadin-grid-templatizer.html", + "version": "UNKNOWN", + "properties": [ + { + "name": "dataHost", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "" + }, + { + "name": "template", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "" + } + ], + "methods": [ + { + "name": "createInstance", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "addInstance", + "description": "", + "parameters": [ + { + "name": "instance", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Missing documentation!" + } + ], + "returns": "UNDEFINED" + }, + { + "name": "removeInstance", + "description": "", + "parameters": [ + { + "name": "instance", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Missing documentation!" + } + ], + "returns": "UNDEFINED" + } + ], + "events": [], + "slots": [], + "behaviors": [], + "mixins": [], + "variants": {}, + "description": "`vaadin-grid-templatizer` is a helper element for the `vaadin-grid` that is preparing and\nstamping instances of cells and columns templates" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-tree-toggle.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-tree-toggle.json new file mode 100644 index 00000000000..62bebe8f120 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid-tree-toggle.json @@ -0,0 +1,61 @@ +{ + "name": "Vaadin.GridTreeToggleElement", + "tag": "vaadin-grid-tree-toggle", + "baseUrl": "vaadin-grid/src/vaadin-grid-tree-toggle.html", + "version": "5.1.0-alpha3", + "properties": [ + { + "name": "level", + "type": [ + "NUMBER" + ], + "objectType": [], + "description": "Current level of the tree represented with a horizontal offset\nof the toggle button.\n " + }, + { + "name": "leaf", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "Hides the toggle icon and disables toggling a tree sublevel.\n " + }, + { + "name": "expanded", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "Sublevel toggle state.\n ", + "notify": true + } + ], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], + "events": [ + { + "name": "expanded-changed", + "description": "Fired when the `expanded` property changes.", + "properties": [] + } + ], + "slots": [ + "" + ], + "behaviors": [], + "mixins": [ + "Vaadin.ThemableMixin" + ], + "variants": { + "lumo": [ + "connectors" + ] + }, + "description": "`` is a helper element for the ``\nthat provides toggle and level display functionality for the item tree.\n\n#### Example:\n```html\n\n \n \n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---|---\n`toggle` | The tree toggle icon\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n---|---|---\n`expanded` | When present, the toggle is expanded | :host\n`leaf` | When present, the toggle is not expandable, i. e., the current item is a leaf | :host\n\nThe following custom CSS properties are available on\nthe `` element:\n\nCustom CSS property | Description | Default\n---|---|---\n`--vaadin-grid-tree-toggle-level-offset` | Visual offset step for each tree sublevel | `1em`" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid.json new file mode 100644 index 00000000000..60af4356c18 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-grid.json @@ -0,0 +1,256 @@ +{ + "name": "Vaadin.GridElement", + "tag": "vaadin-grid", + "baseUrl": "vaadin-grid/src/vaadin-grid.html", + "version": "5.1.0-alpha3", + "properties": [ + { + "name": "pageSize", + "type": [ + "NUMBER" + ], + "objectType": [], + "description": "Number of items fetched at a time from the dataprovider.\n " + }, + { + "name": "dataProvider", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Function that provides items lazily. Receives arguments `params`, `callback`\n\n`params.page` Requested page index\n\n`params.pageSize` Current page size\n\n`params.filters` Currently applied filters\n\n`params.sortOrders` Currently applied sorting orders\n\n`params.parentItem` When tree is used, and sublevel items\nare requested, reference to parent item of the requested sublevel.\nOtherwise `undefined`.\n\n`callback(items, size)` Callback function with arguments:\n - `items` Current page of items\n - `size` Total number of items. When tree sublevel items\n are requested, total number of items in the requested sublevel.\n Optional when tree is not used, required for tree.\n ", + "notify": true + }, + { + "name": "loading", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "`true` while data is being requested from the data provider.\n ", + "readOnly": true, + "notify": true + }, + { + "name": "itemIdPath", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Path to an item sub-property that identifies the item.\n " + }, + { + "name": "expandedItems", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "An array that contains the expanded items.\n ", + "notify": true + }, + { + "name": "activeItem", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "The item user has last interacted with. Turns to `null` after user deactivates\nthe item by re-interacting with the currently active item.\n ", + "notify": true + }, + { + "name": "items", + "type": [ + "ARRAY" + ], + "objectType": [], + "description": "An array containing the items which will be stamped to the column template\ninstances.\n " + }, + { + "name": "detailsOpenedItems", + "type": [ + "ARRAY" + ], + "objectType": [], + "description": "An array containing references to items with open row details.\n " + }, + { + "name": "multiSort", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "When `true`, all `` are applied for sorting.\n " + }, + { + "name": "selectedItems", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "An array that contains the selected items.\n ", + "notify": true + }, + { + "name": "columnReorderingAllowed", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "Set to true to allow column reordering.\n " + }, + { + "name": "heightByRows", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "If true, the grid's height is defined by the number of its rows.\n " + } + ], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "getItemId", + "description": "Returns a value that identifies the item. Uses `itemIdPath` if available.\nCan be customized by overriding.\n ", + "parameters": [ + { + "name": "item", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Missing documentation!" + } + ], + "returns": "UNDEFINED" + }, + { + "name": "expandItem", + "description": "Expands the given item tree.\n ", + "parameters": [ + { + "name": "item", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Missing documentation!" + } + ], + "returns": "UNDEFINED" + }, + { + "name": "collapseItem", + "description": "Collapses the given item tree.\n ", + "parameters": [ + { + "name": "item", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Missing documentation!" + } + ], + "returns": "UNDEFINED" + }, + { + "name": "clearCache", + "description": "Clears the cached pages and reloads data from dataprovider when needed.\n ", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "openItemDetails", + "description": "Open the details row of a given item.\n ", + "parameters": [ + { + "name": "item", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Missing documentation!" + } + ], + "returns": "UNDEFINED" + }, + { + "name": "closeItemDetails", + "description": "Close the details row of a given item.\n ", + "parameters": [ + { + "name": "item", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "Missing documentation!" + } + ], + "returns": "UNDEFINED" + }, + { + "name": "selectItem", + "description": "Selects the given item.", + "parameters": [ + { + "name": "item", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "The item object" + } + ], + "returns": "UNDEFINED" + }, + { + "name": "deselectItem", + "description": "Deselects the given item if it is already selected.", + "parameters": [ + { + "name": "item", + "type": [ + "OBJECT" + ], + "objectType": [], + "description": "The item object" + } + ], + "returns": "UNDEFINED" + } + ], + "events": [], + "slots": [ + "nodistribute" + ], + "behaviors": [], + "mixins": [ + "Vaadin.ThemableMixin", + "Vaadin.Grid.DataProviderMixin", + "Vaadin.Grid.ScrollMixin", + "Vaadin.Grid.KeyboardNavigationMixin", + "Vaadin.Grid.CombinedMixin", + "Vaadin.Grid.ColumnReorderingMixin" + ], + "variants": { + "lumo": [ + "no-border", + "no-row-borders", + "column-borders", + "row-stripes", + "compact", + "wrap-cell-content" + ], + "material": [ + "column-dividers" + ] + }, + "description": "`` is a free, high quality data grid / data table Polymer element.\n\n### Quick Start\n\nUse the [``](#/elements/vaadin-grid-column) element to configure the grid columns.\n\nThen assign an array to the [`items`](#/elements/vaadin-grid#property-items) property to visualize your data.\n\n#### Example:\n```html\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n```\n\nThe following helper elements can be used for further customization:\n- [``](#/elements/vaadin-grid-column-group)\n- [``](#/elements/vaadin-grid-filter)\n- [``](#/elements/vaadin-grid-sorter)\n- [``](#/elements/vaadin-grid-selection-column)\n- [``](#/elements/vaadin-grid-tree-toggle)\n\n__Note that the helper elements must be explicitly imported.__\nIf you want to import everything at once you can use the `all-imports.html` bundle.\n\nA column template can be decorated with one the following class names to specify its purpose\n- `header`: Marks a header template\n- `footer`: Marks a footer template\n- `row-details`: Marks a row details template\n\nThe following built-in template variables can be bound to inside the column templates:\n- `[[index]]`: Number representing the row index\n- `[[item]]` and it's sub-properties: Data object (provided by a data provider / items array)\n- `{{selected}}`: True if the item is selected (can be two-way bound)\n- `{{detailsOpened}}`: True if the item has row details opened (can be two-way bound)\n- `{{expanded}}`: True if the item has tree sublevel expanded (can be two-way bound)\n- `[[level]]`: Number of the tree sublevel of the item, first level-items have 0\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively\nprovide the `` data through the\n[`dataProvider`](#/elements/vaadin-grid#property-dataProvider) function property.\nThe `` calls this function lazily, only when it needs more data\nto be displayed.\n\nSee the [`dataProvider`](#/elements/vaadin-grid#property-dataProvider) in\nthe API reference below for the detailed data provider arguments description,\nand the “Assigning Data” page in the demos.\n\n__Note that expanding the tree grid's item will trigger a call to the `dataProvider`.__\n\n__Also, note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```javascript\ngrid.dataProvider = function(params, callback) {\n var url = 'https://api.example/data' +\n '?page=' + params.page + // the requested page index\n '&per_page=' + params.pageSize; // number of items on the page\n var xhr = new XMLHttpRequest();\n xhr.onload = function() {\n var response = JSON.parse(xhr.responseText);\n callback(\n response.employees, // requested page of items\n response.totalSize // total number of items\n );\n };\n xhr.open('GET', url, true);\n xhr.send();\n};\n```\n\n__Alternatively, you can use the `size` property to set the total number of items:__\n\n```javascript\ngrid.size = 200; // The total number of items\ngrid.dataProvider = function(params, callback) {\n var url = 'https://api.example/data' +\n '?page=' + params.page + // the requested page index\n '&per_page=' + params.pageSize; // number of items on the page\n var xhr = new XMLHttpRequest();\n xhr.onload = function() {\n var response = JSON.parse(xhr.responseText);\n callback(response.employees);\n };\n xhr.open('GET', url, true);\n xhr.send();\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`row` | Row in the internal table\n`cell` | Cell in the internal table\n`header-cell` | Header cell in the internal table\n`body-cell` | Body cell in the internal table\n`footer-cell` | Footer cell in the internal table\n`details-cell` | Row details cell in the internal table\n`resize-handle` | Handle for resizing the columns\n`reorder-ghost` | Ghost element of the header cell being dragged\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`loading` | Set when the grid is loading data from data provider | :host\n`interacting` | Keyboard navigation in interaction mode | :host\n`navigating` | Keyboard navigation in navigation mode | :host\n`overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `left`, `right` | :host\n`reordering` | Set when the grid's columns are being reordered | :host\n`reorder-status` | Reflects the status of a cell while columns are being reordered | cell\n`frozen` | Frozen cell | cell\n`last-frozen` | Last frozen cell | cell\n`last-column` | Last visible cell on a row | cell\n`selected` | Selected row | row\n`expanded` | Expanded row | row\n`loading` | Row that is waiting for data from data provider | row\n`odd` | Odd row | row\n`first` | The first body row | row\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-horizontal-layout.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-horizontal-layout.json new file mode 100644 index 00000000000..54b9ec1f91b --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-horizontal-layout.json @@ -0,0 +1,40 @@ +{ + "name": "Vaadin.HorizontalLayoutElement", + "tag": "vaadin-horizontal-layout", + "baseUrl": "vaadin-ordered-layout/src/vaadin-horizontal-layout.html", + "version": "1.1.0-alpha3", + "properties": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], + "events": [], + "slots": [ + "" + ], + "behaviors": [], + "mixins": [ + "Vaadin.ThemableMixin" + ], + "variants": { + "lumo": [ + "spacing-xs", + "spacing-s", + "spacing", + "spacing-l", + "spacing-xl" + ], + "material": [ + "spacing-xs", + "spacing-s", + "spacing", + "spacing-l", + "spacing-xl" + ] + }, + "description": "`` provides a simple way to horizontally align your HTML elements.\n\n```\n\n
Item 1
\n
Item 2
\n
\n```\n\n### Built-in Theme Variations\n\n`` supports the following theme variations:\n\nTheme variation | Description\n---|---\n`theme=\"margin\"` | Applies the default amount of CSS margin for the host element (specified by the theme)\n`theme=\"padding\"` | Applies the default amount of CSS padding for the host element (specified by the theme)\n`theme=\"spacing\"` | Applies the default amount of CSS margin between items (specified by the theme)" +} diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-infinite-scroller.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-infinite-scroller.json index 066ff92d5e8..3fcf4fae8a9 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-infinite-scroller.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-infinite-scroller.json @@ -117,7 +117,7 @@ { "name": "to", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -127,7 +127,7 @@ { "name": "from", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -144,7 +144,7 @@ { "name": "path", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -184,7 +184,7 @@ { "name": "path", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -209,7 +209,7 @@ { "name": "path", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -242,7 +242,7 @@ { "name": "path", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -267,7 +267,7 @@ { "name": "path", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -284,7 +284,7 @@ { "name": "path", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -325,7 +325,7 @@ { "name": "path", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -342,7 +342,7 @@ { "name": "path", "type": [ - "STRING", + "OBJECT", "OBJECT", "OBJECT" ], @@ -438,5 +438,6 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-list-box.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-list-box.json index 4c3160f4945..615f78fa11a 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-list-box.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-list-box.json @@ -2,7 +2,7 @@ "name": "Vaadin.ListBoxElement", "tag": "vaadin-list-box", "baseUrl": "vaadin-list-box/src/vaadin-list-box.html", - "version": "1.0.2", + "version": "1.1.0-alpha3", "properties": [ { "name": "selected", @@ -19,7 +19,7 @@ "ARRAY" ], "objectType": [], - "description": " The array of list items ", + "description": "The list of items from which a selection can be made.\nIs is populated from the elements passed to the light DOM,\nand updated dynamically when adding or removing items.\n\nThe item elements must implement `Vaadin.ItemMixin`.\n\nNote: unlike ``, this property is read-only,\nso if you want to provide items by iterating array of data,\nyou have to use `dom-repeat` and place it to the light DOM.\n ", "readOnly": true, "notify": true } @@ -30,6 +30,12 @@ "description": "", "parameters": [], "returns": "UNDEFINED" + }, + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" } ], "events": [], @@ -41,5 +47,6 @@ "Vaadin.ListMixin", "Vaadin.ThemableMixin" ], + "variants": {}, "description": "`` is a Polymer 2 element for menus\n\n```\n \n Item 1\n Item 2\n Item 3\n Item 4\n \n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|------------------------\n`items` | The items container\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-month-calendar.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-month-calendar.json index 1145e8c94b9..9baadf2e853 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-month-calendar.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-month-calendar.json @@ -90,5 +90,6 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification-card.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification-card.json index 1ffd3472a8c..3323066cc33 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification-card.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification-card.json @@ -4,7 +4,14 @@ "baseUrl": "vaadin-notification/src/vaadin-notification.html", "version": "UNKNOWN", "properties": [], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], "events": [], "slots": [ "" @@ -13,5 +20,6 @@ "mixins": [ "Vaadin.ThemableMixin" ], + "variants": {}, "description": "The container element for the notification\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`overlay` | The notification container\n`content` | The content of the notification\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification-container.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification-container.json index 4dabc4d60dd..422a190d13b 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification-container.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification-container.json @@ -28,5 +28,6 @@ ], "behaviors": [], "mixins": [], + "variants": {}, "description": "The container element for all notifications." } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification.json index b5dfa0dbd1d..2ed2e69ed50 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-notification.json @@ -2,7 +2,7 @@ "name": "Vaadin.NotificationElement", "tag": "vaadin-notification", "baseUrl": "vaadin-notification/src/vaadin-notification.html", - "version": "1.0.0", + "version": "1.1.0-alpha3", "properties": [ { "name": "duration", @@ -54,5 +54,6 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "`` is a Polymer 2 element providing accessible and customizable notifications (toasts).\n\n```\n\n \n\n```" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-password-field.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-password-field.json index fb27ab645e0..0181d9ea457 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-password-field.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-password-field.json @@ -2,7 +2,7 @@ "name": "Vaadin.PasswordFieldElement", "tag": "vaadin-password-field", "baseUrl": "vaadin-text-field/src/vaadin-password-field.html", - "version": "2.0.1", + "version": "2.1.0-alpha3", "properties": [ { "name": "revealButtonHidden", @@ -27,6 +27,7 @@ "slots": [], "behaviors": [], "mixins": [], + "variants": {}, "description": "`` is a Polymer 2 element for password field control in forms.\n\n```html\n\n\n```\n\n### Styling\n\nSee vaadin-text-field.html for the styling documentation\n\nIn addition to vaadin-text-field parts, here's the list of vaadin-password-field specific parts\n\nPart name | Description\n----------------|----------------------------------------------------\n`reveal-button` | The eye icon which toggles the password visibility\n\nIn addition to vaadin-text-field state attributes, here's the list of vaadin-password-field specific attributes\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`password-visible` | Set when the password is visible | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)", "parentTagName": "vaadin-text-field" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-progress-bar.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-progress-bar.json index cce98469e71..85c9128a3c2 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-progress-bar.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-progress-bar.json @@ -2,7 +2,7 @@ "name": "Vaadin.ProgressBarElement", "tag": "vaadin-progress-bar", "baseUrl": "vaadin-progress-bar/src/vaadin-progress-bar.html", - "version": "1.0.0", + "version": "1.1.0-alpha3", "properties": [ { "name": "value", @@ -34,10 +34,17 @@ "BOOLEAN" ], "objectType": [], - "description": "Indeterminate state of the progress bar.\nThis property takes precedence over other state properties (min, max, value). \n " + "description": "Indeterminate state of the progress bar.\nThis property takes precedence over other state properties (min, max, value).\n " + } + ], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" } ], - "methods": [], "events": [], "slots": [], "behaviors": [], @@ -45,5 +52,12 @@ "Vaadin.ProgressMixin", "Vaadin.ThemableMixin" ], + "variants": { + "lumo": [ + "contrast", + "error", + "success" + ] + }, "description": "`` is a Polymer 2 progress bar.\n\n```html\n\n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`bar` | Progress-bar's background\n`value` | Progress-bar's foreground\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)\n\nThe following custom properties are available:\n\nCustom property | Description | Default\n----------------|-------------|-------------\n`--vaadin-progress-value` | current progress value (between 0 and 1) | 0\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------|-------------|------------\n`indeterminate` | Set to an indeterminate progress bar | :host" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-radio-button.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-radio-button.json index ffd4c08419e..b7272bb2fd8 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-radio-button.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-radio-button.json @@ -2,7 +2,7 @@ "name": "Vaadin.RadioButtonElement", "tag": "vaadin-radio-button", "baseUrl": "vaadin-radio-button/src/vaadin-radio-button.html", - "version": "1.0.1", + "version": "1.1.0-alpha3", "properties": [ { "name": "autofocus", @@ -46,7 +46,14 @@ "description": "The value for this element.\n " } ], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], "events": [ { "name": "checked-changed", @@ -64,5 +71,6 @@ "Vaadin.ThemableMixin", "Polymer.GestureEventListeners" ], + "variants": {}, "description": "`` is a Polymer element for radio buttons.\n\n```html\nFoo\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|----------------\n`radio` | The radio button element\n`label` | The label content element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`disabled` | Set when the radio button is disabled. | :host\n`focus-ring` | Set when the radio button is focused using the keyboard. | :host\n`focused` | Set when the radio button is focused. | :host\n`checked` | Set when the radio button is checked. | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-radio-group.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-radio-group.json index 09b83b3689b..f70b84da23e 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-radio-group.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-radio-group.json @@ -2,7 +2,7 @@ "name": "Vaadin.RadioGroupElement", "tag": "vaadin-radio-group", "baseUrl": "vaadin-radio-button/src/vaadin-radio-group.html", - "version": "1.0.1", + "version": "1.1.0-alpha3", "properties": [ { "name": "disabled", @@ -12,6 +12,47 @@ "objectType": [], "description": "The current disabled state of the radio group. True if group and all internal radio buttons are disabled.\n " }, + { + "name": "readonly", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "This attribute indicates that the user cannot modify the value of the control.\n " + }, + { + "name": "invalid", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "This property is set to true when the value is invalid.\n ", + "notify": true + }, + { + "name": "required", + "type": [ + "BOOLEAN" + ], + "objectType": [], + "description": "Specifies that the user must fill in a value.\n " + }, + { + "name": "errorMessage", + "type": [ + "STRING" + ], + "objectType": [], + "description": "Error to show when the input value is invalid.\n " + }, + { + "name": "label", + "type": [ + "STRING" + ], + "objectType": [], + "description": "String used for the label element.\n " + }, { "name": "value", "type": [ @@ -22,8 +63,32 @@ "notify": true } ], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, + { + "name": "validate", + "description": "Returns true if `value` is valid.\n`` uses this to check the validity or all its elements.", + "parameters": [], + "returns": "BOOLEAN" + }, + { + "name": "checkValidity", + "description": "Returns true if the current input value satisfies all constraints (if any)", + "parameters": [], + "returns": "BOOLEAN" + } + ], "events": [ + { + "name": "invalid-changed", + "description": "Fired when the `invalid` property changes.", + "properties": [] + }, { "name": "value-changed", "description": "Fired when the `value` property changes.", @@ -37,5 +102,13 @@ "mixins": [ "Vaadin.ThemableMixin" ], - "description": "`` is a Polymer element for grouping vaadin-radio-buttons.\n\n```html\n\n Foo\n Bar\n Baz\n\n```\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`disabled` | Set when the radio group and its children are disabled. | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" + "variants": { + "lumo": [ + "vertical" + ], + "material": [ + "vertical" + ] + }, + "description": "`` is a Polymer element for grouping vaadin-radio-buttons.\n\n```html\n\n Foo\n Bar\n Baz\n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label element\n`group-field` | The element that wraps radio-buttons\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`disabled` | Set when the radio group and its children are disabled. | :host\n`readonly` | Set to a readonly text field | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-split-layout.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-split-layout.json index 213e320d610..76b2d94552e 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-split-layout.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-split-layout.json @@ -2,7 +2,7 @@ "name": "Vaadin.SplitLayoutElement", "tag": "vaadin-split-layout", "baseUrl": "vaadin-split-layout/src/vaadin-split-layout.html", - "version": "4.0.1", + "version": "4.1.0-alpha3", "properties": [ { "name": "orientation", @@ -13,7 +13,14 @@ "description": "The split layout's orientation. Possible values are: `horizontal|vertical`.\n " } ], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], "events": [ { "name": "iron-resize", @@ -36,5 +43,11 @@ "Vaadin.ThemableMixin", "Polymer.GestureEventListeners" ], + "variants": { + "lumo": [ + "small", + "minimal" + ] + }, "description": "`` is a Polymer element implementing a split layout for two\ncontent elements with a draggable splitter between them.\n\n```html\n\n
First content element
\n
Second content element
\n
\n```\n\n### Horizontal and Vertical Layouts\n\nBy default, the split's orientation is horizontal, meaning that the content elements are\npositioned side by side in a flex container with a horizontal layout.\n\nYou can change the split mode to vertical by setting the `orientation` attribute to `\"vertical\"`:\n\n```html\n\n
Content on the top
\n
Content on the bottom
\n
\n```\n\n### Layouts Combination\n\nFor the layout contents, we usually use `
` elements in the examples,\nalthough you can use any other elements as well.\n\nFor instance, in order to have a nested vertical split layout inside a\nhorizontal one, you can include `` as a content element\ninside another split layout:\n\n```html\n\n
First content element
\n \n
Second content element
\n
Third content element
\n
\n
\n```\n\nYou can also trigger the vertical mode in JavaScript by setting the property:\n`splitLayout.orientation = \"vertical\";`.\n\n### Split Layout Element Height\n\n`` element itself is a flex container. It does not inherit\nthe parent height by default, but rather sets its height depending on the\ncontent.\n\nYou can use CSS to set the fixed height for the split layout, as usual with any\nblock element:\n\n```html\n\n
First content element
\n
Second content element
\n
\n```\n\nIt is possible to define percentage height as well. Note that you have to set\nthe parent height in order to make percentages work correctly. In the following\nexample, the `` is resized to fill the entire viewport, and the\n`` element is set to take 100% height of the ``:\n\n```html\n\n \n
First
\n
Second
\n
\n\n```\n\nAlternatively, you can use a flexbox layout to make ``\nfill up the parent:\n\n```html\n\n \n
First
\n
Second
\n
\n\n```\n\n### Initial Splitter Position\n\nThe initial splitter position is determined from the sizes of the content elements\ninside the split layout. Therefore, changing `width` on the content elements\naffects the initial splitter position for the horizontal layouts, while `height`\naffects the vertical ones.\n\nNote that when the total size of the content elements does not fit the layout,\nthe content elements are scaled proportionally.\n\nWhen setting initial sizes with relative units, such as percentages, it is\nrecommended to assign the size for both content elements:\n\n```html\n\n
Three fourths
\n
One fourth
\n
\n```\n\n### Size Limits\n\nThe `min-width`/`min-height`, and `max-width`/`max-height` CSS size values\nfor the content elements are respected and used to limit the splitter position\nwhen it is dragged.\n\nIt is preferred to set the limits only for a single content element, in order\nto avoid size conflicts:\n\n```html\n\n
First
\n
Second
\n
\n```\n\n### Resize Notification\n\nThis element implements `IronResizableBehavior` to notify the nested resizables\nwhen the splitter is dragged. In order to define a resizable and receive that\nnotification in a nested element, include `IronResizableBehavior` and listen\nfor the `iron-resize` event.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description | Theme for Element\n----------------|----------------|----------------\n`splitter` | Split element | vaadin-split-layout\n`handle` | The handle of the splitter | vaadin-split-layout\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-tab.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-tab.json index a0eab3c618b..fa87afb6a7b 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-tab.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-tab.json @@ -2,7 +2,7 @@ "name": "Vaadin.TabElement", "tag": "vaadin-tab", "baseUrl": "vaadin-tabs/src/vaadin-tab.html", - "version": "2.0.0", + "version": "2.1.0-alpha3", "properties": [ { "name": "value", @@ -29,7 +29,14 @@ "description": "If true, the item is in selected state.\n " } ], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], "events": [], "slots": [ "" @@ -40,5 +47,10 @@ "Vaadin.ThemableMixin", "Vaadin.ItemMixin" ], + "variants": { + "lumo": [ + "icon-on-top" + ] + }, "description": "`` is a Polymer 2 element providing an accessible and customizable tab.\n\n```\n \n Tab 1\n \n```\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`disabled` | Set to a disabled tab | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`selected` | Set when the tab is selected | :host\n`active` | Set when mousedown or enter/spacebar pressed | :host\n`orientation` | Set to `horizontal` or `vertical` depending on the direction of items | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-tabs.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-tabs.json index cb5826aec08..f0bfa00328a 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-tabs.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-tabs.json @@ -2,7 +2,7 @@ "name": "Vaadin.TabsElement", "tag": "vaadin-tabs", "baseUrl": "vaadin-tabs/src/vaadin-tabs.html", - "version": "2.0.0", + "version": "2.1.0-alpha3", "properties": [ { "name": "selected", @@ -26,7 +26,7 @@ "ARRAY" ], "objectType": [], - "description": " The array of list items ", + "description": "The list of items from which a selection can be made.\nIs is populated from the elements passed to the light DOM,\nand updated dynamically when adding or removing items.\n\nThe item elements must implement `Vaadin.ItemMixin`.\n\nNote: unlike ``, this property is read-only,\nso if you want to provide items by iterating array of data,\nyou have to use `dom-repeat` and place it to the light DOM.\n ", "readOnly": true, "notify": true } @@ -37,6 +37,12 @@ "description": "", "parameters": [], "returns": "UNDEFINED" + }, + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" } ], "events": [], @@ -49,5 +55,16 @@ "Vaadin.ListMixin", "Vaadin.ThemableMixin" ], + "variants": { + "lumo": [ + "small", + "minimal", + "hide-scroll-buttons", + "equal-width-tabs" + ], + "material": [ + "fixed" + ] + }, "description": "`` is a Polymer 2 element for easy switching between different view\n\n```\n \n Page 1\n Page 2\n Page 3\n Page 4\n \n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|--------------------------------------\n`back-button` | Button for moving the scroll back\n`tabs` | The tabs container\n`forward-button` | Button for moving the scroll forward\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`orientation` | Tabs disposition, valid values are `horizontal` and `vertical`. | :host\n`overflow` | It's set to `start`, `end`, none or both. | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-text-area.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-text-area.json index 037f25ba71b..b6b19dbf29c 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-text-area.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-text-area.json @@ -2,7 +2,7 @@ "name": "Vaadin.TextAreaElement", "tag": "vaadin-text-area", "baseUrl": "vaadin-text-field/src/vaadin-text-area.html", - "version": "2.0.1", + "version": "2.1.0-alpha3", "properties": [ { "name": "autofocus", @@ -147,6 +147,12 @@ "description": "Returns true if `value` is valid.\n`` uses this to check the validity or all its elements.", "parameters": [], "returns": "BOOLEAN" + }, + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" } ], "events": [ @@ -166,5 +172,15 @@ "Vaadin.ThemableMixin", "Vaadin.ControlStateMixin" ], - "description": "`` is a Polymer 2 element for text area control in forms.\n\n```html\n\n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`value` | The text value element inside the `input-field` element\n`error-message` | The error message element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`disabled` | Set to a disabled text field | :host\n`has-value` | Set when the element has a value | :host\n`has-label` | Set when the element has a label | :host\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set to a readonly text field | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" + "variants": { + "lumo": [ + "small", + "align-center", + "align-right" + ], + "material": [ + "always-float-label" + ] + }, + "description": "`` is a Polymer 2 element for text area control in forms.\n\n```html\n\n\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `` that are displayed\ninline with the input, before or after.\nIn order for an element to be considered as a prefix, it must have the slot\nattribute set to `prefix` (and similarly for `suffix`).\n\n```html\n\n
Details:
\n
The end!
\n
\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`value` | The text value element inside the `input-field` element\n`error-message` | The error message element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`disabled` | Set to a disabled text field | :host\n`has-value` | Set when the element has a value | :host\n`has-label` | Set when the element has a label | :host\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set to a readonly text field | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-text-field.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-text-field.json index c54b27712c5..19d4807050c 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-text-field.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-text-field.json @@ -2,7 +2,7 @@ "name": "Vaadin.TextFieldElement", "tag": "vaadin-text-field", "baseUrl": "vaadin-text-field/src/vaadin-text-field.html", - "version": "2.0.1", + "version": "2.1.0-alpha3", "properties": [ { "name": "autofocus", @@ -171,6 +171,12 @@ "description": "Returns true if `value` is valid.\n`` uses this to check the validity or all its elements.", "parameters": [], "returns": "BOOLEAN" + }, + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" } ], "events": [ @@ -190,5 +196,15 @@ "Vaadin.ThemableMixin", "Vaadin.ControlStateMixin" ], - "description": "`` is a Polymer 2 element for text field control in forms.\n\n```html\n\n\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|-------------\n`--vaadin-text-field-default-width` | Set the default width of the input field | `12em`\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`value` | The text value element inside the `input-field` element\n`error-message` | The error message element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`disabled` | Set to a disabled text field | :host\n`has-value` | Set when the element has a value | :host\n`has-label` | Set when the element has a label | :host\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set to a readonly text field | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" + "variants": { + "lumo": [ + "small", + "align-center", + "align-right" + ], + "material": [ + "always-float-label" + ] + }, + "description": "`` is a Polymer 2 element for text field control in forms.\n\n```html\n\n\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `` that are displayed\ninline with the input, before or after.\nIn order for an element to be considered as a prefix, it must have the slot\nattribute set to `prefix` (and similarly for `suffix`).\n\n```html\n\n
Sent to:
\n
@vaadin.com
\n
\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|-------------\n`--vaadin-text-field-default-width` | Set the default width of the input field | `12em`\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`value` | The text value element inside the `input-field` element\n`error-message` | The error message element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`disabled` | Set to a disabled text field | :host\n`has-value` | Set when the element has a value | :host\n`has-label` | Set when the element has a label | :host\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set to a readonly text field | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-upload-file.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-upload-file.json index 82fdddc1339..bd53a6bc38d 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-upload-file.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-upload-file.json @@ -13,7 +13,14 @@ "description": "" } ], - "methods": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], "events": [ { "name": "file-abort", @@ -109,5 +116,6 @@ "mixins": [ "Vaadin.ThemableMixin" ], - "description": "`` element represents a file in the file list of ``.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---|---\n`row` | File container\n`info` | Container for file status icon, file name, status and error messages\n`done-icon` | File done status icon\n`warning-icon` | File warning status icon\n`meta` | Container for file name, status and error messages\n`name` | File name\n`error` | Error message, shown when error happens\n`status` | Status message\n`commands` | Container for file command icons\n`start-button` | Start file upload button\n`retry-button` | Retry file upload button\n`clear-button` | Clear file button\n`progress`| Progress bar\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n---|---|---\n`error` | An error has happened during uploading | `progress`\n`indeterminate` | Uploading is in progress, but the progress value is unknown | `progress`\n`uploading` | Uploading is in progress | `progress`\n`complete` | Uploading has finished successfully | `progress`\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" + "variants": {}, + "description": "`` element represents a file in the file list of ``.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---|---\n`row` | File container\n`info` | Container for file status icon, file name, status and error messages\n`done-icon` | File done status icon\n`warning-icon` | File warning status icon\n`meta` | Container for file name, status and error messages\n`name` | File name\n`error` | Error message, shown when error happens\n`status` | Status message\n`commands` | Container for file command icons\n`start-button` | Start file upload button\n`retry-button` | Retry file upload button\n`clear-button` | Clear file button\n`progress`| Progress bar\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n---|---|---\n`error` | An error has happened during uploading | `:host`\n`indeterminate` | Uploading is in progress, but the progress value is unknown | `:host`\n`uploading` | Uploading is in progress | `:host`\n`complete` | Uploading has finished successfully | `:host`\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-upload.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-upload.json index c4f2c275799..e5e0d2e2a6e 100644 --- a/flow-components-parent/flow-generated-components/json_metadata/vaadin-upload.json +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-upload.json @@ -2,7 +2,7 @@ "name": "Vaadin.UploadElement", "tag": "vaadin-upload", "baseUrl": "vaadin-upload/src/vaadin-upload.html", - "version": "4.0.0", + "version": "4.2.0-alpha3", "properties": [ { "name": "nodrop", @@ -129,6 +129,12 @@ } ], "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + }, { "name": "uploadFiles", "description": "Triggers the upload of any files that are not completed", @@ -484,5 +490,6 @@ "mixins": [ "Vaadin.ThemableMixin" ], + "variants": {}, "description": "`` is a Polymer 2 element for uploading multiple files with drag and drop support.\n\nExample:\n\n```\n\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---|---\n`primary-buttons` | Upload container\n`upload-button` | Upload button\n`drop-label` | Label for drop indicator\n`drop-label-icon` | Icon for drop indicator\n`file-list` | File list container\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n---|---|---\n`nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`\n`dragover` | A file is being dragged over the element | `:host`\n`dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)" } diff --git a/flow-components-parent/flow-generated-components/json_metadata/vaadin-vertical-layout.json b/flow-components-parent/flow-generated-components/json_metadata/vaadin-vertical-layout.json new file mode 100644 index 00000000000..7c7c60a6bd4 --- /dev/null +++ b/flow-components-parent/flow-generated-components/json_metadata/vaadin-vertical-layout.json @@ -0,0 +1,40 @@ +{ + "name": "Vaadin.VerticalLayoutElement", + "tag": "vaadin-vertical-layout", + "baseUrl": "vaadin-ordered-layout/src/vaadin-vertical-layout.html", + "version": "1.1.0-alpha3", + "properties": [], + "methods": [ + { + "name": "updateStyles", + "description": "", + "parameters": [], + "returns": "UNDEFINED" + } + ], + "events": [], + "slots": [ + "" + ], + "behaviors": [], + "mixins": [ + "Vaadin.ThemableMixin" + ], + "variants": { + "lumo": [ + "spacing-xs", + "spacing-s", + "spacing", + "spacing-l", + "spacing-xl" + ], + "material": [ + "spacing-xs", + "spacing-s", + "spacing", + "spacing-l", + "spacing-xl" + ] + }, + "description": "`` provides a simple way to vertically align your HTML elements.\n\n```\n\n
Item 1
\n
Item 2
\n
\n```\n\n### Built-in Theme Variations\n\n`` supports the following theme variations:\n\nTheme variation | Description\n---|---\n`theme=\"margin\"` | Applies the default amount of CSS margin for the host element (specified by the theme)\n`theme=\"padding\"` | Applies the default amount of CSS padding for the host element (specified by the theme)\n`theme=\"spacing\"` | Applies the default amount of CSS margin between items (specified by the theme)" +} diff --git a/flow-components-parent/flow-generated-components/license_header b/flow-components-parent/flow-generated-components/license_header index db0b86ef225..90f97f2092b 100644 --- a/flow-components-parent/flow-generated-components/license_header +++ b/flow-components-parent/flow-generated-components/license_header @@ -1,4 +1,4 @@ -Copyright 2000-2017 Vaadin Ltd. +Copyright 2000-2018 Vaadin Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-generated-components/pom.xml b/flow-components-parent/flow-generated-components/pom.xml index e13f986d03b..276ee72830a 100644 --- a/flow-components-parent/flow-generated-components/pom.xml +++ b/flow-components-parent/flow-generated-components/pom.xml @@ -5,7 +5,7 @@ com.vaadin flow-components-parent - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-generated-components Flow Generated Component diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/button/ButtonVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/button/ButtonVariant.java new file mode 100644 index 00000000000..13fb27d6315 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/button/ButtonVariant.java @@ -0,0 +1,49 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.button; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-button} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ButtonElement#2.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum ButtonVariant { + LUMO_SMALL("small"), LUMO_LARGE("large"), LUMO_TERTIARY( + "tertiary"), LUMO_TERTIARY_INLINE("tertiary-inline"), LUMO_PRIMARY( + "primary"), LUMO_SUCCESS("success"), LUMO_ERROR( + "error"), LUMO_CONTRAST("contrast"), LUMO_ICON( + "icon"), MATERIAL_CONTAINED( + "contained"), MATERIAL_OUTLINED( + "outlined"); + + private final String variant; + + ButtonVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/button/GeneratedVaadinButton.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/button/GeneratedVaadinButton.java index 1f4b31a6889..e404b5e13eb 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/button/GeneratedVaadinButton.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/button/GeneratedVaadinButton.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,9 @@ import com.vaadin.flow.component.ClickNotifier; import com.vaadin.flow.component.HasText; import com.vaadin.flow.component.Focusable; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; import com.vaadin.flow.component.Component; import com.vaadin.flow.dom.Element; @@ -36,6 +39,9 @@ *

* <vaadin-button> </vaadin-button> *

+ *

+ * {@code document.querySelector('vaadin-button').addEventListener('click', () => alert('Hello World!'));} + *

*

Styling

*

* The following shadow DOM parts are exposed for styling: @@ -96,13 +102,38 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.ButtonElement#2.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ButtonElement#2.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-button") @HtmlImport("frontend://bower_components/vaadin-button/src/vaadin-button.html") public abstract class GeneratedVaadinButton> extends Component - implements HasStyle, ClickNotifier, HasText, Focusable { + implements HasStyle, ClickNotifier, HasText, Focusable, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(ButtonVariant... variants) { + getThemeNames() + .addAll(Stream.of(variants).map(ButtonVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(ButtonVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(ButtonVariant::getVariantName) + .collect(Collectors.toList())); + } /** *

@@ -168,6 +199,10 @@ protected void setDisabled(boolean disabled) { getElement().setProperty("disabled", disabled); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + /** * Adds the given components as children of this component at the slot * 'prefix'. diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/CheckboxGroupVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/CheckboxGroupVariant.java new file mode 100644 index 00000000000..b2a1b5684d0 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/CheckboxGroupVariant.java @@ -0,0 +1,43 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.checkbox; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-checkbox-group} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.CheckboxGroupElement#2.2.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum CheckboxGroupVariant { + LUMO_VERTICAL("vertical"), MATERIAL_VERTICAL("vertical"); + + private final String variant; + + CheckboxGroupVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/GeneratedVaadinCheckbox.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/GeneratedVaadinCheckbox.java index 3bf38aa3626..b31e1bf298f 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/GeneratedVaadinCheckbox.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/GeneratedVaadinCheckbox.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -104,8 +104,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.CheckboxElement#2.1.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.CheckboxElement#2.2.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-checkbox") @HtmlImport("frontend://bower_components/vaadin-checkbox/src/vaadin-checkbox.html") public abstract class GeneratedVaadinCheckbox, T> @@ -233,6 +234,10 @@ protected void setIndeterminate(boolean indeterminate) { getElement().setProperty("indeterminate", indeterminate); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + @DomEvent("change") public static class ChangeEvent> extends ComponentEvent { diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/GeneratedVaadinCheckboxGroup.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/GeneratedVaadinCheckboxGroup.java new file mode 100644 index 00000000000..1afbac722ea --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/checkbox/GeneratedVaadinCheckboxGroup.java @@ -0,0 +1,450 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.checkbox; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; +import com.vaadin.flow.component.Synchronize; +import com.vaadin.flow.component.NotSupported; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; +import com.vaadin.flow.function.SerializableFunction; +import com.vaadin.flow.function.SerializableBiFunction; +import com.vaadin.flow.component.AbstractSinglePropertyField; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code } is a Polymer element for grouping + * vaadin-checkboxes. + *

+ *

+ * <vaadin-checkbox-group label="Preferred language of + * contact:"> <vaadin-checkbox + * value="en">English</vaadin-checkbox> <vaadin-checkbox + * value="fr">Français</vaadin-checkbox> <vaadin-checkbox + * value="de">Deutsch</vaadin-checkbox> + * </vaadin-checkbox-group> + *

+ *

Styling

+ *

+ * The following shadow DOM parts are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Part nameDescription
{@code label}The label element
{@code group-field}The element that wraps checkboxes
{@code error-message}The error message element
+ *

+ * The following state attributes are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescriptionPart name
{@code disabled}Set when the checkbox group and its children are disabled.:host
{@code has-label}Set when the element has a label:host
{@code required}Set when the element is required:host
{@code invalid}Set when the element is invalid:host
+ *

+ * See ThemableMixin – + * how to apply styles for shadow parts + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.CheckboxGroupElement#2.2.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-checkbox-group") +@HtmlImport("frontend://bower_components/vaadin-checkbox/src/vaadin-checkbox-group.html") +public abstract class GeneratedVaadinCheckboxGroup, T> + extends AbstractSinglePropertyField + implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(CheckboxGroupVariant... variants) { + getThemeNames().addAll( + Stream.of(variants).map(CheckboxGroupVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(CheckboxGroupVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(CheckboxGroupVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The current disabled state of the checkbox group. True if group and all + * internal checkboxes are disabled. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code disabled} property from the webcomponent + */ + protected boolean isDisabledBoolean() { + return getElement().getProperty("disabled", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The current disabled state of the checkbox group. True if group and all + * internal checkboxes are disabled. + *

+ * + * @param disabled + * the boolean value to set + */ + protected void setDisabled(boolean disabled) { + getElement().setProperty("disabled", disabled); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * String used for the label element. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code label} property from the webcomponent + */ + protected String getLabelString() { + return getElement().getProperty("label"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * String used for the label element. + *

+ * + * @param label + * the String value to set + */ + protected void setLabel(String label) { + getElement().setProperty("label", label == null ? "" : label); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Error to show when the input value is invalid. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code errorMessage} property from the webcomponent + */ + protected String getErrorMessageString() { + return getElement().getProperty("errorMessage"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Error to show when the input value is invalid. + *

+ * + * @param errorMessage + * the String value to set + */ + protected void setErrorMessage(String errorMessage) { + getElement().setProperty("errorMessage", + errorMessage == null ? "" : errorMessage); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Specifies that the user must fill in a value. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code required} property from the webcomponent + */ + protected boolean isRequiredBoolean() { + return getElement().getProperty("required", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Specifies that the user must fill in a value. + *

+ * + * @param required + * the boolean value to set + */ + protected void setRequired(boolean required) { + getElement().setProperty("required", required); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * This property is set to true when the control value is invalid. + *

+ * This property is synchronized automatically from client side when a + * 'invalid-changed' event happens. + *

+ * + * @return the {@code invalid} property from the webcomponent + */ + @Synchronize(property = "invalid", value = "invalid-changed") + protected boolean isInvalidBoolean() { + return getElement().getProperty("invalid", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * This property is set to true when the control value is invalid. + *

+ * + * @param invalid + * the boolean value to set + */ + protected void setInvalid(boolean invalid) { + getElement().setProperty("invalid", invalid); + } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Returns true if {@code value} is valid. {@code } uses this to + * check the validity or all its elements. + *

+ *

+ * This function is not supported by Flow because it returns a + * boolean. Functions with return types different than void are + * not supported at this moment. + */ + @NotSupported + protected void validate() { + } + + public static class InvalidChangeEvent> + extends ComponentEvent { + private final boolean invalid; + + public InvalidChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.invalid = source.isInvalidBoolean(); + } + + public boolean isInvalid() { + return invalid; + } + } + + /** + * Adds a listener for {@code invalid-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addInvalidChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("invalid", + event -> listener.onComponentEvent( + new InvalidChangeEvent((R) this, + event.isUserOriginated()))); + } + + /** + * Constructs a new GeneratedVaadinCheckboxGroup component with the given + * arguments. + * + * @param initialValue + * the initial value to set to the value + * @param defaultValue + * the default value to use if the value isn't defined + * @param elementPropertyType + * the type of the element property + * @param presentationToModel + * a function that converts a string value to a model value + * @param modelToPresentation + * a function that converts a model value to a string value + * @param

+ * the property type + */ + public

GeneratedVaadinCheckboxGroup(T initialValue, T defaultValue, + Class

elementPropertyType, + SerializableFunction presentationToModel, + SerializableFunction modelToPresentation) { + super("value", defaultValue, elementPropertyType, presentationToModel, + modelToPresentation); + if (initialValue != null) { + setModelValue(initialValue, false); + setPresentationValue(initialValue); + } + } + + /** + * Constructs a new GeneratedVaadinCheckboxGroup component with the given + * arguments. + * + * @param initialValue + * the initial value to set to the value + * @param defaultValue + * the default value to use if the value isn't defined + * @param acceptNullValues + * whether null is accepted as a model value + */ + public GeneratedVaadinCheckboxGroup(T initialValue, T defaultValue, + boolean acceptNullValues) { + super("value", defaultValue, acceptNullValues); + if (initialValue != null) { + setModelValue(initialValue, false); + setPresentationValue(initialValue); + } + } + + /** + * Constructs a new GeneratedVaadinCheckboxGroup component with the given + * arguments. + * + * @param initialValue + * the initial value to set to the value + * @param defaultValue + * the default value to use if the value isn't defined + * @param elementPropertyType + * the type of the element property + * @param presentationToModel + * a function that accepts this component and a property value + * and returns a model value + * @param modelToPresentation + * a function that accepts this component and a model value and + * returns a property value + * @param

+ * the property type + */ + public

GeneratedVaadinCheckboxGroup(T initialValue, T defaultValue, + Class

elementPropertyType, + SerializableBiFunction presentationToModel, + SerializableBiFunction modelToPresentation) { + super("value", defaultValue, elementPropertyType, presentationToModel, + modelToPresentation); + if (initialValue != null) { + setModelValue(initialValue, false); + setPresentationValue(initialValue); + } + } + + /** + * Default constructor. + */ + public GeneratedVaadinCheckboxGroup() { + this(null, null, null, (SerializableFunction) null, + (SerializableFunction) null); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBox.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBox.java index 0ec563b2af9..4ca297cf5af 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBox.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBox.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -223,8 +223,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.ComboBoxElement#4.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ComboBoxElement#4.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-combo-box") @HtmlImport("frontend://bower_components/vaadin-combo-box/src/vaadin-combo-box.html") public abstract class GeneratedVaadinComboBox, T> @@ -835,6 +836,10 @@ protected void checkValidity() { getElement().callFunction("checkValidity"); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + @DomEvent("custom-value-set") public static class CustomValueSetEvent> extends ComponentEvent { diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxDropdown.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxDropdown.java index be06a23b270..1af89b482c3 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxDropdown.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxDropdown.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,9 +35,9 @@ * Element for internal use only. *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.ComboBoxDropdownElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-combo-box-dropdown") @HtmlImport("frontend://bower_components/vaadin-combo-box/src/vaadin-combo-box-dropdown.html") public abstract class GeneratedVaadinComboBoxDropdown> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxDropdownWrapper.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxDropdownWrapper.java index 91a5392b2ff..1ab0cf76d75 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxDropdownWrapper.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxDropdownWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,9 +31,9 @@ * Element for internal use only. *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.ComboBoxDropdownWrapperElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-combo-box-dropdown-wrapper") @HtmlImport("frontend://bower_components/vaadin-combo-box/src/vaadin-combo-box-dropdown-wrapper.html") public abstract class GeneratedVaadinComboBoxDropdownWrapper> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxItem.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxItem.java index 3b593746431..91e55dc7e25 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxItem.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxItem.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -75,9 +75,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.ComboBoxItemElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-combo-box-item") @HtmlImport("frontend://bower_components/vaadin-combo-box/src/vaadin-combo-box-item.html") public abstract class GeneratedVaadinComboBoxItem> @@ -128,25 +128,10 @@ protected void setIndex(double index) { * * @return the {@code item} property from the webcomponent */ - protected JsonObject getItemObjectJsonObject() { + protected JsonObject getItemJsonObject() { return (JsonObject) getElement().getPropertyRaw("item"); } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * The item to render - *

- * - * @param item - * the String value to set - */ - protected void setItem(String item) { - getElement().setProperty("item", item == null ? "" : item); - } - /** *

* Description copied from corresponding location in WebComponent: @@ -257,4 +242,8 @@ protected boolean isFocusedBoolean() { protected void setFocused(boolean focused) { getElement().setProperty("focused", focused); } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } } \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxLight.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxLight.java index a2c316960a4..f0fb02271b1 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxLight.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxLight.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -80,9 +80,9 @@ * </paper-input> </vaadin-combo-box-light> *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.ComboBoxLightElement#4.0.1", - "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ComboBoxLightElement#4.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-combo-box-light") @HtmlImport("frontend://bower_components/vaadin-combo-box/src/vaadin-combo-box-light.html") public abstract class GeneratedVaadinComboBoxLight, T> @@ -672,6 +672,10 @@ protected void checkValidity() { getElement().callFunction("checkValidity"); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + @DomEvent("change") public static class ChangeEvent> extends ComponentEvent { diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxOverlay.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxOverlay.java index 7fcac4fd9f7..a424fa13c7d 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxOverlay.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/combobox/GeneratedVaadinComboBoxOverlay.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -47,9 +47,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.ComboBoxOverlayElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-combo-box-overlay") @HtmlImport("frontend://bower_components/vaadin-combo-box/src/vaadin-combo-box-dropdown.html") public abstract class GeneratedVaadinComboBoxOverlay> @@ -258,6 +258,10 @@ protected void setFocusTrap(boolean focusTrap) { getElement().setProperty("focusTrap", focusTrap); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + /** * @param sourceEvent * Missing documentation! diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinContextMenu.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinContextMenu.java new file mode 100644 index 00000000000..5d08a27104c --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinContextMenu.java @@ -0,0 +1,352 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.contextmenu; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.ClickNotifier; +import com.vaadin.flow.component.Synchronize; +import elemental.json.JsonObject; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * <vaadin-context-menu> <template> <vaadin-list-box> + * <vaadin-item>First menu item</vaadin-item> + * <vaadin-item>Second menu item</vaadin-item> + * </vaadin-list-box> </template> </vaadin-context-menu> + *

+ *

“vaadin-contextmenu” Gesture Event

+ *

+ * {@code vaadin-contextmenu} is a gesture event (a custom event fired by + * Polymer), which is dispatched after either {@code contextmenu} and long touch + * events. This enables support for both mouse and touch environments in a + * uniform way. + *

+ *

+ * {@code } opens the menu overlay on the + * {@code vaadin-contextmenu} event by default. + *

+ *

Menu Listener

+ *

+ * By default, the {@code } element listens for the menu + * opening event on itself. In order to have a context menu on your content, + * wrap your content with the {@code } element, and add a + * template element with a menu. Example: + *

+ *

+ * <vaadin-context-menu> <template> <vaadin-list-box> + * <vaadin-item>First menu item</vaadin-item> + * <vaadin-item>Second menu item</vaadin-item> + * </vaadin-list-box> </template> + *

+ *

+ * <p>This paragraph has the context menu provided in the above + * template.</p> <p>Another paragraph with the context + * menu.</p> </vaadin-context-menu> + *

+ *

+ * In case if you do not want to wrap the page content, you can listen for + * events on an element outside the {@code } by setting the + * {@code listenOn} property: + *

+ *

+ * <vaadin-context-menu id="customListener"> <template> + * <vaadin-list-box> ... </vaadin-list-box> </template> + * </vaadin-context-menu> + *

+ *

+ * <div id="menuListener">The element that listens for the + * context menu.</div> + *

+ *

+ * &lt;script&gt; const contextMenu = + * document.querySelector('vaadin-context-menu#customListener'); + * contextMenu.listenOn = document.querySelector('#menuListener'); + * &lt;/script&gt; + *

+ *

Filtering Menu Targets

+ *

+ * By default, the listener element and all its descendants open the context + * menu. You can filter the menu targets to a smaller set of elements inside the + * listener element by setting the {@code selector} property. + *

+ *

+ * In the following example, only the elements matching {@code .has-menu} will + * open the context menu: + *

+ *

+ * <vaadin-context-menu selector=".has-menu"> <template> + * <vaadin-list-box> ... </vaadin-list-box> </template> + *

+ *

+ * <p class="has-menu">This paragraph opens the context + * menu</p> <p>This paragraph does not open the context + * menu</p> </vaadin-context-menu> + *

+ *

Menu Context

+ *

+ * You can bind to the following properties in the menu template: + *

+ *
    + *
  • {@code target} is the menu opening event target, which is the element + * that the user has called the context menu for
  • + *
  • {@code detail} is the menu opening event detail
  • + *
+ *

+ * In the following example, the menu item text is composed with the contents of + * the element that opened the menu: + *

+ *

+ * <vaadin-context-menu selector="li"> <template> + * <vaadin-list-box> <vaadin-item>The menu target: + * [[target.textContent]]</vaadin-item> </vaadin-list-box> + * </template> + *

+ *

+ * <ul> <li>Foo</li> <li>Bar</li> + * <li>Baz</li> </ul> </vaadin-context-menu> + *

+ *

Styling

+ *

+ * See ThemableMixin – + * how to apply styles for shadow parts + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ContextMenuElement#4.1.0-alpha4", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-context-menu") +@HtmlImport("frontend://bower_components/vaadin-context-menu/src/vaadin-context-menu.html") +public abstract class GeneratedVaadinContextMenu> + extends Component implements HasStyle, ClickNotifier { + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * CSS selector that can be used to target any child element of the context + * menu to listen for {@code openOn} events. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code selector} property from the webcomponent + */ + protected String getSelectorString() { + return getElement().getProperty("selector"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * CSS selector that can be used to target any child element of the context + * menu to listen for {@code openOn} events. + *

+ * + * @param selector + * the String value to set + */ + protected void setSelector(String selector) { + getElement().setProperty("selector", selector == null ? "" : selector); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * True if the overlay is currently displayed. + *

+ * This property is synchronized automatically from client side when a + * 'opened-changed' event happens. + *

+ * + * @return the {@code opened} property from the webcomponent + */ + @Synchronize(property = "opened", value = "opened-changed") + protected boolean isOpenedBoolean() { + return getElement().getProperty("opened", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Event name to listen for opening the context menu. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code openOn} property from the webcomponent + */ + protected String getOpenOnString() { + return getElement().getProperty("openOn"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Event name to listen for opening the context menu. + *

+ * + * @param openOn + * the String value to set + */ + protected void setOpenOn(String openOn) { + getElement().setProperty("openOn", openOn == null ? "" : openOn); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The target element that's listened to for context menu opening events. By + * default the vaadin-context-menu listens to the target's + * {@code vaadin-contextmenu} events. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code listenOn} property from the webcomponent + */ + protected JsonObject getListenOnJsonObject() { + return (JsonObject) getElement().getPropertyRaw("listenOn"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The target element that's listened to for context menu opening events. By + * default the vaadin-context-menu listens to the target's + * {@code vaadin-contextmenu} events. + *

+ * + * @param listenOn + * the JsonObject value to set + */ + protected void setListenOn(JsonObject listenOn) { + getElement().setPropertyJson("listenOn", listenOn); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Event name to listen for closing the context menu. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code closeOn} property from the webcomponent + */ + protected String getCloseOnString() { + return getElement().getProperty("closeOn"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Event name to listen for closing the context menu. + *

+ * + * @param closeOn + * the String value to set + */ + protected void setCloseOn(String closeOn) { + getElement().setProperty("closeOn", closeOn == null ? "" : closeOn); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Closes the overlay. + *

+ */ + protected void close() { + getElement().callFunction("close"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Opens the overlay. + *

+ */ + protected void open() { + getElement().callFunction("open"); + } + + public static class OpenedChangeEvent> + extends ComponentEvent { + private final boolean opened; + + public OpenedChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.opened = source.isOpenedBoolean(); + } + + public boolean isOpened() { + return opened; + } + } + + /** + * Adds a listener for {@code opened-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addOpenedChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("opened", + event -> listener.onComponentEvent( + new OpenedChangeEvent((R) this, + event.isUserOriginated()))); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinContextMenuOverlay.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinContextMenuOverlay.java new file mode 100644 index 00000000000..220ec51fe1d --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinContextMenuOverlay.java @@ -0,0 +1,443 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.contextmenu; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.Synchronize; +import elemental.json.JsonObject; +import com.vaadin.flow.component.DomEvent; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The overlay element. + *

+ *

Styling

+ *

+ * See {@code } documentation for + * {@code } parts. + *

+ *

+ * See ThemableMixin – + * how to apply styles for shadow parts + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ContextMenuOverlayElement#UNKNOWN", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-context-menu-overlay") +@HtmlImport("frontend://bower_components/vaadin-context-menu/src/vaadin-context-menu-overlay.html") +public abstract class GeneratedVaadinContextMenuOverlay> + extends Component implements HasStyle { + + /** + * This property is synchronized automatically from client side when a + * 'opened-changed' event happens. + * + * @return the {@code opened} property from the webcomponent + */ + @Synchronize(property = "opened", value = "opened-changed") + protected boolean isOpenedBoolean() { + return getElement().getProperty("opened", false); + } + + /** + * @param opened + * the boolean value to set + */ + protected void setOpened(boolean opened) { + getElement().setProperty("opened", opened); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The template of the overlay content. + *

+ * This property is synchronized automatically from client side when a + * 'template-changed' event happens. + *

+ * + * @return the {@code template} property from the webcomponent + */ + @Synchronize(property = "template", value = "template-changed") + protected JsonObject getTemplateJsonObject() { + return (JsonObject) getElement().getPropertyRaw("template"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The template of the overlay content. + *

+ * + * @param template + * the JsonObject value to set + */ + protected void setTemplate(JsonObject template) { + getElement().setPropertyJson("template", template); + } + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code instanceProps} property from the webcomponent + */ + protected JsonObject getInstancePropsJsonObject() { + return (JsonObject) getElement().getPropertyRaw("instanceProps"); + } + + /** + * @param instanceProps + * the JsonObject value to set + */ + protected void setInstanceProps(JsonObject instanceProps) { + getElement().setPropertyJson("instanceProps", instanceProps); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * References the content container after the template is stamped. + *

+ * This property is synchronized automatically from client side when a + * 'content-changed' event happens. + *

+ * + * @return the {@code content} property from the webcomponent + */ + @Synchronize(property = "content", value = "content-changed") + protected JsonObject getContentJsonObject() { + return (JsonObject) getElement().getPropertyRaw("content"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * References the content container after the template is stamped. + *

+ * + * @param content + * the JsonObject value to set + */ + protected void setContent(JsonObject content) { + getElement().setPropertyJson("content", content); + } + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code withBackdrop} property from the webcomponent + */ + protected boolean isWithBackdropBoolean() { + return getElement().getProperty("withBackdrop", false); + } + + /** + * @param withBackdrop + * the boolean value to set + */ + protected void setWithBackdrop(boolean withBackdrop) { + getElement().setProperty("withBackdrop", withBackdrop); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true the overlay won't disable the main content, showing it doesn’t + * change the functionality of the user interface. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code modeless} property from the webcomponent + */ + protected boolean isModelessBoolean() { + return getElement().getProperty("modeless", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true the overlay won't disable the main content, showing it doesn’t + * change the functionality of the user interface. + *

+ * + * @param modeless + * the boolean value to set + */ + protected void setModeless(boolean modeless) { + getElement().setProperty("modeless", modeless); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true move focus to the first focusable element in the overlay, or to + * the overlay if there are no focusable elements. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code focusTrap} property from the webcomponent + */ + protected boolean isFocusTrapBoolean() { + return getElement().getProperty("focusTrap", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true move focus to the first focusable element in the overlay, or to + * the overlay if there are no focusable elements. + *

+ * + * @param focusTrap + * the boolean value to set + */ + protected void setFocusTrap(boolean focusTrap) { + getElement().setProperty("focusTrap", focusTrap); + } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + + /** + * @param sourceEvent + * Missing documentation! + */ + protected void close(JsonObject sourceEvent) { + getElement().callFunction("close", sourceEvent); + } + + @DomEvent("vaadin-overlay-close") + public static class VaadinOverlayCloseEvent> + extends ComponentEvent { + public VaadinOverlayCloseEvent(R source, boolean fromClient) { + super(source, fromClient); + } + } + + /** + * Adds a listener for {@code vaadin-overlay-close} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + protected Registration addVaadinOverlayCloseListener( + ComponentEventListener> listener) { + return addListener(VaadinOverlayCloseEvent.class, + (ComponentEventListener) listener); + } + + @DomEvent("vaadin-overlay-escape-press") + public static class VaadinOverlayEscapePressEvent> + extends ComponentEvent { + public VaadinOverlayEscapePressEvent(R source, boolean fromClient) { + super(source, fromClient); + } + } + + /** + * Adds a listener for {@code vaadin-overlay-escape-press} events fired by + * the webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + protected Registration addVaadinOverlayEscapePressListener( + ComponentEventListener> listener) { + return addListener(VaadinOverlayEscapePressEvent.class, + (ComponentEventListener) listener); + } + + @DomEvent("vaadin-overlay-open") + public static class VaadinOverlayOpenEvent> + extends ComponentEvent { + public VaadinOverlayOpenEvent(R source, boolean fromClient) { + super(source, fromClient); + } + } + + /** + * Adds a listener for {@code vaadin-overlay-open} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + protected Registration addVaadinOverlayOpenListener( + ComponentEventListener> listener) { + return addListener(VaadinOverlayOpenEvent.class, + (ComponentEventListener) listener); + } + + @DomEvent("vaadin-overlay-outside-click") + public static class VaadinOverlayOutsideClickEvent> + extends ComponentEvent { + public VaadinOverlayOutsideClickEvent(R source, boolean fromClient) { + super(source, fromClient); + } + } + + /** + * Adds a listener for {@code vaadin-overlay-outside-click} events fired by + * the webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + protected Registration addVaadinOverlayOutsideClickListener( + ComponentEventListener> listener) { + return addListener(VaadinOverlayOutsideClickEvent.class, + (ComponentEventListener) listener); + } + + public static class OpenedChangeEvent> + extends ComponentEvent { + private final boolean opened; + + public OpenedChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.opened = source.isOpenedBoolean(); + } + + public boolean isOpened() { + return opened; + } + } + + /** + * Adds a listener for {@code opened-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addOpenedChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("opened", + event -> listener.onComponentEvent( + new OpenedChangeEvent((R) this, + event.isUserOriginated()))); + } + + public static class TemplateChangeEvent> + extends ComponentEvent { + private final JsonObject template; + + public TemplateChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.template = source.getTemplateJsonObject(); + } + + public JsonObject getTemplate() { + return template; + } + } + + /** + * Adds a listener for {@code template-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addTemplateChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("template", + event -> listener.onComponentEvent( + new TemplateChangeEvent((R) this, + event.isUserOriginated()))); + } + + public static class ContentChangeEvent> + extends ComponentEvent { + private final JsonObject content; + + public ContentChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.content = source.getContentJsonObject(); + } + + public JsonObject getContent() { + return content; + } + } + + /** + * Adds a listener for {@code content-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addContentChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("content", + event -> listener.onComponentEvent( + new ContentChangeEvent((R) this, + event.isUserOriginated()))); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinDeviceDetector.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinDeviceDetector.java new file mode 100644 index 00000000000..af230ee1d84 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/contextmenu/GeneratedVaadinDeviceDetector.java @@ -0,0 +1,220 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.contextmenu; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.Synchronize; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Element for internal use only. + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.DeviceDetectorElement#UNKNOWN", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-device-detector") +@HtmlImport("frontend://bower_components/vaadin-context-menu/src/vaadin-device-detector.html") +public abstract class GeneratedVaadinDeviceDetector> + extends Component implements HasStyle { + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code true}, when running in a phone. + *

+ * This property is synchronized automatically from client side when a + * 'phone-changed' event happens. + *

+ * + * @return the {@code phone} property from the webcomponent + */ + @Synchronize(property = "phone", value = "phone-changed") + protected boolean isPhoneBoolean() { + return getElement().getProperty("phone", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code true}, when running in a touch device. + *

+ * This property is synchronized automatically from client side when a + * 'touch-changed' event happens. + *

+ * + * @return the {@code touch} property from the webcomponent + */ + @Synchronize(property = "touch", value = "touch-changed") + protected boolean isTouchBoolean() { + return getElement().getProperty("touch", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code true}, when running in a touch device. + *

+ * + * @param touch + * the boolean value to set + */ + protected void setTouch(boolean touch) { + getElement().setProperty("touch", touch); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code true}, when running in a tablet/desktop device. + *

+ * This property is synchronized automatically from client side when a + * 'wide-changed' event happens. + *

+ * + * @return the {@code wide} property from the webcomponent + */ + @Synchronize(property = "wide", value = "wide-changed") + protected boolean isWideBoolean() { + return getElement().getProperty("wide", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code true}, when running in a tablet/desktop device. + *

+ * + * @param wide + * the boolean value to set + */ + protected void setWide(boolean wide) { + getElement().setProperty("wide", wide); + } + + public static class PhoneChangeEvent> + extends ComponentEvent { + private final boolean phone; + + public PhoneChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.phone = source.isPhoneBoolean(); + } + + public boolean isPhone() { + return phone; + } + } + + /** + * Adds a listener for {@code phone-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addPhoneChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("phone", + event -> listener.onComponentEvent( + new PhoneChangeEvent((R) this, + event.isUserOriginated()))); + } + + public static class TouchChangeEvent> + extends ComponentEvent { + private final boolean touch; + + public TouchChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.touch = source.isTouchBoolean(); + } + + public boolean isTouch() { + return touch; + } + } + + /** + * Adds a listener for {@code touch-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addTouchChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("touch", + event -> listener.onComponentEvent( + new TouchChangeEvent((R) this, + event.isUserOriginated()))); + } + + public static class WideChangeEvent> + extends ComponentEvent { + private final boolean wide; + + public WideChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.wide = source.isWideBoolean(); + } + + public boolean isWide() { + return wide; + } + } + + /** + * Adds a listener for {@code wide-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addWideChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("wide", + event -> listener.onComponentEvent( + new WideChangeEvent((R) this, + event.isUserOriginated()))); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePicker.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePicker.java index e05c88d370b..45661bd3815 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePicker.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePicker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -23,6 +23,7 @@ import com.vaadin.flow.component.Synchronize; import elemental.json.JsonObject; import com.vaadin.flow.component.NotSupported; +import com.vaadin.flow.component.DomEvent; import com.vaadin.flow.component.ComponentEvent; import com.vaadin.flow.component.ComponentEventListener; import com.vaadin.flow.shared.Registration; @@ -236,8 +237,9 @@ * {@code } element. *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.DatePickerElement#3.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.DatePickerElement#3.2.0-alpha4", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-date-picker") @HtmlImport("frontend://bower_components/vaadin-date-picker/src/vaadin-date-picker.html") public abstract class GeneratedVaadinDatePicker, T> @@ -920,6 +922,10 @@ protected void setInvalid(boolean invalid) { getElement().setProperty("invalid", invalid); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + /** *

* Description copied from corresponding location in WebComponent: @@ -987,6 +993,28 @@ protected void validate(String value) { protected void checkValidity(String value) { } + @DomEvent("change") + public static class ChangeEvent> + extends ComponentEvent { + public ChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + } + } + + /** + * Adds a listener for {@code change} events fired by the webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + protected Registration addChangeListener( + ComponentEventListener> listener) { + return addListener(ChangeEvent.class, + (ComponentEventListener) listener); + } + public static class InvalidChangeEvent> extends ComponentEvent { private final boolean invalid; diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerLight.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerLight.java index 3cfea549988..fb58302b6ad 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerLight.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerLight.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ import com.vaadin.flow.component.Synchronize; import elemental.json.JsonObject; import com.vaadin.flow.component.NotSupported; +import com.vaadin.flow.component.DomEvent; import com.vaadin.flow.component.ComponentEvent; import com.vaadin.flow.component.ComponentEventListener; import com.vaadin.flow.shared.Registration; @@ -84,9 +85,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.DatePickerLightElement#3.0.1", - "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.DatePickerLightElement#3.2.0-alpha4", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-date-picker-light") @HtmlImport("frontend://bower_components/vaadin-date-picker/src/vaadin-date-picker-light.html") public abstract class GeneratedVaadinDatePickerLight, T> @@ -606,6 +607,10 @@ protected void setAttrForValue(String attrForValue) { attrForValue == null ? "" : attrForValue); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + /** *

* Description copied from corresponding location in WebComponent: @@ -673,6 +678,28 @@ protected void validate(String value) { protected void checkValidity(String value) { } + @DomEvent("change") + public static class ChangeEvent> + extends ComponentEvent { + public ChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + } + } + + /** + * Adds a listener for {@code change} events fired by the webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + protected Registration addChangeListener( + ComponentEventListener> listener) { + return addListener(ChangeEvent.class, + (ComponentEventListener) listener); + } + public static class OpenedChangeEvent> extends ComponentEvent { private final boolean opened; diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerOverlay.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerOverlay.java index 8aec2125304..24f6439cb1c 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerOverlay.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerOverlay.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -47,9 +47,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.DatePickerOverlayElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-date-picker-overlay") @HtmlImport("frontend://bower_components/vaadin-date-picker/src/vaadin-date-picker-overlay.html") public abstract class GeneratedVaadinDatePickerOverlay> @@ -258,6 +258,10 @@ protected void setFocusTrap(boolean focusTrap) { getElement().setProperty("focusTrap", focusTrap); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + /** * @param sourceEvent * Missing documentation! diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerOverlayContent.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerOverlayContent.java index d1c8d12f890..d198021bcd9 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerOverlayContent.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinDatePickerOverlayContent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,9 +28,9 @@ import com.vaadin.flow.shared.Registration; import com.vaadin.flow.component.Component; -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.DatePickerOverlayContentElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-date-picker-overlay-content") @HtmlImport("frontend://bower_components/vaadin-date-picker/src/vaadin-date-picker-overlay-content.html") public abstract class GeneratedVaadinDatePickerOverlayContent> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinInfiniteScroller.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinInfiniteScroller.java index 293b6496022..ee35f24d746 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinInfiniteScroller.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinInfiniteScroller.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,9 +24,9 @@ import elemental.json.JsonArray; import com.vaadin.flow.component.Component; -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.InfiniteScrollerElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-infinite-scroller") @HtmlImport("frontend://bower_components/vaadin-date-picker/src/vaadin-infinite-scroller.html") public abstract class GeneratedVaadinInfiniteScroller> @@ -210,72 +210,6 @@ protected void setProperties(JsonObject props, JsonObject setReadOnly) { protected void linkPaths(JsonObject to, JsonObject from) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Aliases one data path as another, such that path notifications from one - * are routed to the other. - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonObject. Functions with return types - * different than void are not supported at this moment. - * - * @param to - * Target path to link. - * @param from - * Source path to link. - */ - @NotSupported - protected void linkPaths(JsonObject to, String from) { - } - - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Aliases one data path as another, such that path notifications from one - * are routed to the other. - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonObject. Functions with return types - * different than void are not supported at this moment. - * - * @param to - * Target path to link. - * @param from - * Source path to link. - */ - @NotSupported - protected void linkPaths(String to, JsonObject from) { - } - - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Aliases one data path as another, such that path notifications from one - * are routed to the other. - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonObject. Functions with return types - * different than void are not supported at this moment. - * - * @param to - * Target path to link. - * @param from - * Source path to link. - */ - @NotSupported - protected void linkPaths(String to, String from) { - } - /** *

* Description copied from corresponding location in WebComponent: @@ -299,29 +233,6 @@ protected void linkPaths(String to, String from) { protected void unlinkPaths(JsonObject path) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Removes a data path alias previously established with {@code _linkPaths}. - *

- *

- * Note, the path to unlink should be the target ({@code to}) used when - * linking the paths. - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonObject. Functions with return types - * different than void are not supported at this moment. - * - * @param path - * Target path to unlink. - */ - @NotSupported - protected void unlinkPaths(String path) { - } - /** *

* Description copied from corresponding location in WebComponent: @@ -400,38 +311,6 @@ protected void notifySplices(String path, JsonArray splices) { protected void get(JsonObject path, JsonObject root) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Convenience method for reading a value from a path. - *

- *

- * Note, if any part in the path is undefined, this method returns - * {@code undefined} (this method does not throw when dereferencing - * undefined paths). - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonObject. Functions with return types - * different than void are not supported at this moment. - * - * @param path - * Path to the value to read. The path may be specified as a - * string (e.g. `foo.bar.baz`) or an array of path parts (e.g. - * `['foo.bar', 'baz']`). Note that bracketed expressions are not - * supported; string-based path parts must* be separated by dots. - * Note that when dereferencing array indices, the index may be - * used as a dotted part directly (e.g. `users.12.name` or - * `['users', 12, 'name']`). - * @param root - * Root object from which the path is evaluated. - */ - @NotSupported - protected void get(String path, JsonObject root) { - } - /** *

* Description copied from corresponding location in WebComponent: @@ -468,42 +347,6 @@ protected void get(String path, JsonObject root) { protected void set(JsonObject path, JsonObject value, JsonObject root) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Convenience method for setting a value to a path and notifying any - * elements bound to the same path. - *

- *

- * Note, if any part in the path except for the last is undefined, this - * method does nothing (this method does not throw when dereferencing - * undefined paths). - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonObject. Functions with return types - * different than void are not supported at this moment. - * - * @param path - * Path to the value to write. The path may be specified as a - * string (e.g. `'foo.bar.baz'`) or an array of path parts (e.g. - * `['foo.bar', 'baz']`). Note that bracketed expressions are not - * supported; string-based path parts must* be separated by dots. - * Note that when dereferencing array indices, the index may be - * used as a dotted part directly (e.g. `'users.12.name'` or - * `['users', 12, 'name']`). - * @param value - * Value to set at the specified path. - * @param root - * Root object from which the path is evaluated. When specified, - * no notification will occur. - */ - @NotSupported - protected void set(String path, JsonObject value, JsonObject root) { - } - /** *

* Description copied from corresponding location in WebComponent: @@ -533,35 +376,6 @@ protected void set(String path, JsonObject value, JsonObject root) { protected void push(JsonObject path, JsonObject _Items) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Adds items onto the end of the array at the path specified. - *

- *

- * The arguments after {@code path} and return value match that of - * {@code Array.prototype.push}. - *

- *

- * This method notifies other paths to the same array that a splice occurred - * to the array. - *

- *

- * This function is not supported by Flow because it returns a - * double. Functions with return types different than void are - * not supported at this moment. - * - * @param path - * Path to array. - * @param _Items - * Missing documentation! - */ - @NotSupported - protected void push(String path, JsonObject _Items) { - } - /** *

* Description copied from corresponding location in WebComponent: @@ -589,33 +403,6 @@ protected void push(String path, JsonObject _Items) { protected void pop(JsonObject path) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Removes an item from the end of array at the path specified. - *

- *

- * The arguments after {@code path} and return value match that of - * {@code Array.prototype.pop}. - *

- *

- * This method notifies other paths to the same array that a splice occurred - * to the array. - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonObject. Functions with return types - * different than void are not supported at this moment. - * - * @param path - * Path to array. - */ - @NotSupported - protected void pop(String path) { - } - /** *

* Description copied from corresponding location in WebComponent: @@ -651,41 +438,6 @@ protected void splice(JsonObject path, double start, double deleteCount, JsonObject _Items) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Starting from the start index specified, removes 0 or more items from the - * array and inserts 0 or more new items in their place. - *

- *

- * The arguments after {@code path} and return value match that of - * {@code Array.prototype.splice}. - *

- *

- * This method notifies other paths to the same array that a splice occurred - * to the array. - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonArray. Functions with return types - * different than void are not supported at this moment. - * - * @param path - * Path to array. - * @param start - * Index from which to start removing/inserting. - * @param deleteCount - * Number of items to remove. - * @param _Items - * Missing documentation! - */ - @NotSupported - protected void splice(String path, double start, double deleteCount, - JsonObject _Items) { - } - /** *

* Description copied from corresponding location in WebComponent: @@ -713,33 +465,6 @@ protected void splice(String path, double start, double deleteCount, protected void shift(JsonObject path) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Removes an item from the beginning of array at the path specified. - *

- *

- * The arguments after {@code path} and return value match that of - * {@code Array.prototype.pop}. - *

- *

- * This method notifies other paths to the same array that a splice occurred - * to the array. - *

- *

- * This function is not supported by Flow because it returns a - * elemental.json.JsonObject. Functions with return types - * different than void are not supported at this moment. - * - * @param path - * Path to array. - */ - @NotSupported - protected void shift(String path) { - } - /** *

* Description copied from corresponding location in WebComponent: @@ -769,35 +494,6 @@ protected void shift(String path) { protected void unshift(JsonObject path, JsonObject _Items) { } - /** - *

- * Description copied from corresponding location in WebComponent: - *

- *

- * Adds items onto the beginning of the array at the path specified. - *

- *

- * The arguments after {@code path} and return value match that of - * {@code Array.prototype.push}. - *

- *

- * This method notifies other paths to the same array that a splice occurred - * to the array. - *

- *

- * This function is not supported by Flow because it returns a - * double. Functions with return types different than void are - * not supported at this moment. - * - * @param path - * Path to array. - * @param _Items - * Missing documentation! - */ - @NotSupported - protected void unshift(String path, JsonObject _Items) { - } - /** *

* Description copied from corresponding location in WebComponent: diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinMonthCalendar.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinMonthCalendar.java index ae1bb1dc717..bc6c4d38620 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinMonthCalendar.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/datepicker/GeneratedVaadinMonthCalendar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,9 +26,9 @@ import com.vaadin.flow.shared.Registration; import com.vaadin.flow.component.Component; -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.MonthCalendarElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-month-calendar") @HtmlImport("frontend://bower_components/vaadin-date-picker/src/vaadin-month-calendar.html") public abstract class GeneratedVaadinMonthCalendar> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/dialog/GeneratedVaadinDialog.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/dialog/GeneratedVaadinDialog.java index 518d9441773..1e0de935d03 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/dialog/GeneratedVaadinDialog.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/dialog/GeneratedVaadinDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -48,8 +48,8 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.DialogElement#null", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.DialogElement#null", "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-dialog") @HtmlImport("frontend://bower_components/vaadin-dialog/src/vaadin-dialog.html") public abstract class GeneratedVaadinDialog> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/dialog/GeneratedVaadinDialogOverlay.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/dialog/GeneratedVaadinDialogOverlay.java index 10318240054..fdd6e16dc3e 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/dialog/GeneratedVaadinDialogOverlay.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/dialog/GeneratedVaadinDialogOverlay.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -42,9 +42,9 @@ * {@code } parts. *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.DialogOverlayElement#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-dialog-overlay") @HtmlImport("frontend://bower_components/vaadin-dialog/src/vaadin-dialog.html") public abstract class GeneratedVaadinDialogOverlay> @@ -253,6 +253,10 @@ protected void setFocusTrap(boolean focusTrap) { getElement().setProperty("focusTrap", focusTrap); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + /** * @param sourceEvent * Missing documentation! diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/formlayout/GeneratedVaadinFormItem.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/formlayout/GeneratedVaadinFormItem.java index 591bcf2d42d..78fabef845c 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/formlayout/GeneratedVaadinFormItem.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/formlayout/GeneratedVaadinFormItem.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -163,13 +163,18 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.FormItemElement#2.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.FormItemElement#2.1.0-alpha4", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-form-item") @HtmlImport("frontend://bower_components/vaadin-form-layout/src/vaadin-form-item.html") public abstract class GeneratedVaadinFormItem> extends Component implements HasStyle, ClickNotifier { + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + /** * Adds the given components as children of this component at the slot * 'label'. diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/formlayout/GeneratedVaadinFormLayout.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/formlayout/GeneratedVaadinFormLayout.java index e72dd3fd52d..d9cb0ec0ee5 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/formlayout/GeneratedVaadinFormLayout.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/formlayout/GeneratedVaadinFormLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -133,8 +133,9 @@ * * */ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.FormLayoutElement#2.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.FormLayoutElement#2.1.0-alpha4", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-form-layout") @HtmlImport("frontend://bower_components/vaadin-form-layout/src/vaadin-form-layout.html") public abstract class GeneratedVaadinFormLayout> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGrid.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGrid.java new file mode 100644 index 00000000000..62de1a66d84 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGrid.java @@ -0,0 +1,1083 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; +import elemental.json.JsonObject; +import com.vaadin.flow.component.Synchronize; +import elemental.json.JsonArray; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; +import com.vaadin.flow.component.Component; +import com.vaadin.flow.dom.Element; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code } is a free, high quality data grid / data table Polymer + * element. + *

+ *

Quick Start

+ *

+ * Use the {@code } + * element to configure the grid columns. + *

+ *

+ * Then assign an array to the + * {@code items} property to visualize your data. + *

+ *

Example:

+ *

+ * <vaadin-grid items='[{"name": "John", + * "surname": "Lennon", "role": + * "singer"}, {"name": "Ringo", + * "surname": "Starr", "role": + * "drums"}]'> <vaadin-grid-column> <template + * class="header">Name</template> + * <template>[[item.name]]</template> </vaadin-grid-column> + * <vaadin-grid-column> <template + * class="header">Surname</template> + * <template>[[item.surname]]</template> </vaadin-grid-column> + * <vaadin-grid-column> <template + * class="header">Role</template> + * <template>[[item.role]]</template> </vaadin-grid-column> + * </vaadin-grid> + *

+ *

+ * The following helper elements can be used for further customization: + *

+ * + *

+ * Note that the helper elements must be explicitly imported. + * If you want to import everything at once you can use the + * {@code all-imports.html} bundle. + *

+ *

+ * A column template can be decorated with one the following class names to + * specify its purpose + *

+ *
    + *
  • {@code header}: Marks a header template
  • + *
  • {@code footer}: Marks a footer template
  • + *
  • {@code row-details}: Marks a row details template
  • + *
+ *

+ * The following built-in template variables can be bound to inside the column + * templates: + *

+ *
    + *
  • {@code [[index]]}: Number representing the row index
  • + *
  • {@code [[item]]} and it's sub-properties: Data object (provided by a data + * provider / items array)
  • + *
  • {@code {selected}}}: True if the item is selected (can be two-way bound) + *
  • + *
  • {@code {detailsOpened}}}: True if the item has row details opened (can + * be two-way bound)
  • + *
  • {@code {expanded}}}: True if the item has tree sublevel expanded (can be + * two-way bound)
  • + *
  • {@code [[level]]}: Number of the tree sublevel of the item, first + * level-items have 0
  • + *
+ *

Lazy Loading with Function Data Provider

+ *

+ * In addition to assigning an array to the items property, you can + * alternatively provide the {@code } data through the {@code dataProvider} + * function property. The {@code } calls this function lazily, only + * when it needs more data to be displayed. + *

+ *

+ * See the + * {@code dataProvider} in the API reference below for the detailed data + * provider arguments description, and the “Assigning Data” page in the demos. + *

+ *

+ * Note that expanding the tree grid's item will trigger a call to the + * {@code dataProvider}. + *

+ *

+ * Also, note that when using function data providers, the total number + * of items needs to be set manually. The total number of items can be returned + * in the second argument of the data provider callback: + *

+ *

+ * {@code javascript grid.dataProvider = function(params, callback) var url = + * 'https://api.example/data' + '?page=' + params.page + // the requested page + * index '&per_page=' + params.pageSize; // number of items on the page var + * xhr = new XMLHttpRequest(); xhr.onload = function() { var response = + * JSON.parse(xhr.responseText); callback( response.employees, // requested page + * of items response.totalSize // total number of items ); }; xhr.open('GET', + * url, true); xhr.send(); };} + *

+ *

+ * Alternatively, you can use the {@code size} property to set the total + * number of items: + *

+ *

+ * {@code javascript +grid.size = 200; // The total number of items + * + * grid.dataProvider = function(params, callback) var url = + * 'https://api.example/data' + '?page=' + params.page + // the requested page + * index '&per_page=' + params.pageSize; // number of items on the page var + * xhr = new XMLHttpRequest(); xhr.onload = function() { var response = + * JSON.parse(xhr.responseText); callback(response.employees); }; + * xhr.open('GET', url, true); xhr.send(); };} + *

+ *

Styling

+ *

+ * The following shadow DOM parts are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Part nameDescription
{@code row}Row in the internal table
{@code cell}Cell in the internal table
{@code header-cell}Header cell in the internal table
{@code body-cell}Body cell in the internal table
{@code footer-cell}Footer cell in the internal table
{@code details-cell}Row details cell in the internal table
{@code resize-handle}Handle for resizing the columns
{@code reorder-ghost}Ghost element of the header cell being dragged
+ *

+ * The following state attributes are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescriptionPart name
{@code loading}Set when the grid is loading data from data provider:host
{@code interacting}Keyboard navigation in interaction mode:host
{@code navigating}Keyboard navigation in navigation mode:host
{@code overflow}Set when rows are overflowing the grid viewport. Possible values: + * {@code top}, {@code bottom}, {@code left}, {@code right}:host
{@code reordering}Set when the grid's columns are being reordered:host
{@code reorder-status}Reflects the status of a cell while columns are being reorderedcell
{@code frozen}Frozen cellcell
{@code last-frozen}Last frozen cellcell
{@code last-column}Last visible cell on a rowcell
{@code selected}Selected rowrow
{@code expanded}Expanded rowrow
{@code loading}Row that is waiting for data from data providerrow
{@code odd}Odd rowrow
{@code first}The first body rowrow
+ *

+ * See ThemableMixin – + * how to apply styles for shadow parts + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridElement#5.1.0-alpha3", "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid.html") +public abstract class GeneratedVaadinGrid> + extends Component implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(GridVariant... variants) { + getThemeNames().addAll(Stream.of(variants) + .map(GridVariant::getVariantName).collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(GridVariant... variants) { + getThemeNames().removeAll(Stream.of(variants) + .map(GridVariant::getVariantName).collect(Collectors.toList())); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Number of items fetched at a time from the dataprovider. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code pageSize} property from the webcomponent + */ + protected double getPageSizeDouble() { + return getElement().getProperty("pageSize", 0.0); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Number of items fetched at a time from the dataprovider. + *

+ * + * @param pageSize + * the double value to set + */ + protected void setPageSize(double pageSize) { + getElement().setProperty("pageSize", pageSize); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Function that provides items lazily. Receives arguments {@code params}, + * {@code callback} + *

+ *

+ * {@code params.page} Requested page index + *

+ *

+ * {@code params.pageSize} Current page size + *

+ *

+ * {@code params.filters} Currently applied filters + *

+ *

+ * {@code params.sortOrders} Currently applied sorting orders + *

+ *

+ * {@code params.parentItem} When tree is used, and sublevel items are + * requested, reference to parent item of the requested sublevel. Otherwise + * {@code undefined}. + *

+ *

+ * {@code callback(items, size)} Callback function with arguments: + *

+ *
    + *
  • {@code items} Current page of items
  • + *
  • {@code size} Total number of items. When tree sublevel items are + * requested, total number of items in the requested sublevel. Optional when + * tree is not used, required for tree. + *

    + * This property is synchronized automatically from client side when a + * 'data-provider-changed' event happens.

  • + *
+ * + * @return the {@code dataProvider} property from the webcomponent + */ + @Synchronize(property = "dataProvider", value = "data-provider-changed") + protected JsonObject getDataProviderJsonObject() { + return (JsonObject) getElement().getPropertyRaw("dataProvider"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Function that provides items lazily. Receives arguments {@code params}, + * {@code callback} + *

+ *

+ * {@code params.page} Requested page index + *

+ *

+ * {@code params.pageSize} Current page size + *

+ *

+ * {@code params.filters} Currently applied filters + *

+ *

+ * {@code params.sortOrders} Currently applied sorting orders + *

+ *

+ * {@code params.parentItem} When tree is used, and sublevel items are + * requested, reference to parent item of the requested sublevel. Otherwise + * {@code undefined}. + *

+ *

+ * {@code callback(items, size)} Callback function with arguments: + *

+ *
    + *
  • {@code items} Current page of items
  • + *
  • {@code size} Total number of items. When tree sublevel items are + * requested, total number of items in the requested sublevel. Optional when + * tree is not used, required for tree.
  • + *
+ * + * @param dataProvider + * the JsonObject value to set + */ + protected void setDataProvider(JsonObject dataProvider) { + getElement().setPropertyJson("dataProvider", dataProvider); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code true} while data is being requested from the data provider. + *

+ * This property is synchronized automatically from client side when a + * 'loading-changed' event happens. + *

+ * + * @return the {@code loading} property from the webcomponent + */ + @Synchronize(property = "loading", value = "loading-changed") + protected boolean isLoadingBoolean() { + return getElement().getProperty("loading", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Path to an item sub-property that identifies the item. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code itemIdPath} property from the webcomponent + */ + protected String getItemIdPathString() { + return getElement().getProperty("itemIdPath"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Path to an item sub-property that identifies the item. + *

+ * + * @param itemIdPath + * the String value to set + */ + protected void setItemIdPath(String itemIdPath) { + getElement().setProperty("itemIdPath", + itemIdPath == null ? "" : itemIdPath); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * An array that contains the expanded items. + *

+ * This property is synchronized automatically from client side when a + * 'expanded-items-changed' event happens. + *

+ * + * @return the {@code expandedItems} property from the webcomponent + */ + @Synchronize(property = "expandedItems", value = "expanded-items-changed") + protected JsonObject getExpandedItemsJsonObject() { + return (JsonObject) getElement().getPropertyRaw("expandedItems"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * An array that contains the expanded items. + *

+ * + * @param expandedItems + * the JsonObject value to set + */ + protected void setExpandedItems(JsonObject expandedItems) { + getElement().setPropertyJson("expandedItems", expandedItems); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The item user has last interacted with. Turns to {@code null} after user + * deactivates the item by re-interacting with the currently active item. + *

+ * This property is synchronized automatically from client side when a + * 'active-item-changed' event happens. + *

+ * + * @return the {@code activeItem} property from the webcomponent + */ + @Synchronize(property = "activeItem", value = "active-item-changed") + protected JsonObject getActiveItemJsonObject() { + return (JsonObject) getElement().getPropertyRaw("activeItem"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * The item user has last interacted with. Turns to {@code null} after user + * deactivates the item by re-interacting with the currently active item. + *

+ * + * @param activeItem + * the JsonObject value to set + */ + protected void setActiveItem(JsonObject activeItem) { + getElement().setPropertyJson("activeItem", activeItem); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * An array containing the items which will be stamped to the column + * template instances. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code items} property from the webcomponent + */ + protected JsonArray getItemsJsonArray() { + return (JsonArray) getElement().getPropertyRaw("items"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * An array containing the items which will be stamped to the column + * template instances. + *

+ * + * @param items + * the JsonArray value to set + */ + protected void setItems(JsonArray items) { + getElement().setPropertyJson("items", items); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * An array containing references to items with open row details. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code detailsOpenedItems} property from the webcomponent + */ + protected JsonArray getDetailsOpenedItemsJsonArray() { + return (JsonArray) getElement().getPropertyRaw("detailsOpenedItems"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * An array containing references to items with open row details. + *

+ * + * @param detailsOpenedItems + * the JsonArray value to set + */ + protected void setDetailsOpenedItems(JsonArray detailsOpenedItems) { + getElement().setPropertyJson("detailsOpenedItems", detailsOpenedItems); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When {@code true}, all {@code } are applied for + * sorting. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code multiSort} property from the webcomponent + */ + protected boolean isMultiSortBoolean() { + return getElement().getProperty("multiSort", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When {@code true}, all {@code } are applied for + * sorting. + *

+ * + * @param multiSort + * the boolean value to set + */ + protected void setMultiSort(boolean multiSort) { + getElement().setProperty("multiSort", multiSort); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * An array that contains the selected items. + *

+ * This property is synchronized automatically from client side when a + * 'selected-items-changed' event happens. + *

+ * + * @return the {@code selectedItems} property from the webcomponent + */ + @Synchronize(property = "selectedItems", value = "selected-items-changed") + protected JsonObject getSelectedItemsJsonObject() { + return (JsonObject) getElement().getPropertyRaw("selectedItems"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * An array that contains the selected items. + *

+ * + * @param selectedItems + * the JsonObject value to set + */ + protected void setSelectedItems(JsonObject selectedItems) { + getElement().setPropertyJson("selectedItems", selectedItems); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Set to true to allow column reordering. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code columnReorderingAllowed} property from the + * webcomponent + */ + protected boolean isColumnReorderingAllowedBoolean() { + return getElement().getProperty("columnReorderingAllowed", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Set to true to allow column reordering. + *

+ * + * @param columnReorderingAllowed + * the boolean value to set + */ + protected void setColumnReorderingAllowed(boolean columnReorderingAllowed) { + getElement().setProperty("columnReorderingAllowed", + columnReorderingAllowed); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * If true, the grid's height is defined by the number of its rows. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code heightByRows} property from the webcomponent + */ + protected boolean isHeightByRowsBoolean() { + return getElement().getProperty("heightByRows", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * If true, the grid's height is defined by the number of its rows. + *

+ * + * @param heightByRows + * the boolean value to set + */ + protected void setHeightByRows(boolean heightByRows) { + getElement().setProperty("heightByRows", heightByRows); + } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Returns a value that identifies the item. Uses {@code itemIdPath} if + * available. Can be customized by overriding. + *

+ * + * @param item + * Missing documentation! + */ + protected void getItemId(JsonObject item) { + getElement().callFunction("getItemId", item); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Expands the given item tree. + *

+ * + * @param item + * Missing documentation! + */ + protected void expandItem(JsonObject item) { + getElement().callFunction("expandItem", item); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Collapses the given item tree. + *

+ * + * @param item + * Missing documentation! + */ + protected void collapseItem(JsonObject item) { + getElement().callFunction("collapseItem", item); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Clears the cached pages and reloads data from dataprovider when needed. + *

+ */ + protected void clearCache() { + getElement().callFunction("clearCache"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Open the details row of a given item. + *

+ * + * @param item + * Missing documentation! + */ + protected void openItemDetails(JsonObject item) { + getElement().callFunction("openItemDetails", item); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Close the details row of a given item. + *

+ * + * @param item + * Missing documentation! + */ + protected void closeItemDetails(JsonObject item) { + getElement().callFunction("closeItemDetails", item); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Selects the given item. + *

+ * + * @param item + * The item object + */ + protected void selectItem(JsonObject item) { + getElement().callFunction("selectItem", item); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Deselects the given item if it is already selected. + *

+ * + * @param item + * The item object + */ + protected void deselectItem(JsonObject item) { + getElement().callFunction("deselectItem", item); + } + + public static class DataProviderChangeEvent> + extends ComponentEvent { + private final JsonObject dataProvider; + + public DataProviderChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.dataProvider = source.getDataProviderJsonObject(); + } + + public JsonObject getDataProvider() { + return dataProvider; + } + } + + /** + * Adds a listener for {@code data-provider-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addDataProviderChangeListener( + ComponentEventListener> listener) { + return getElement().addPropertyChangeListener("dataProvider", + event -> listener.onComponentEvent( + new DataProviderChangeEvent((R) this, + event.isUserOriginated()))); + } + + public static class LoadingChangeEvent> + extends ComponentEvent { + private final boolean loading; + + public LoadingChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.loading = source.isLoadingBoolean(); + } + + public boolean isLoading() { + return loading; + } + } + + /** + * Adds a listener for {@code loading-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addLoadingChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("loading", + event -> listener.onComponentEvent( + new LoadingChangeEvent((R) this, + event.isUserOriginated()))); + } + + public static class ExpandedItemsChangeEvent> + extends ComponentEvent { + private final JsonObject expandedItems; + + public ExpandedItemsChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.expandedItems = source.getExpandedItemsJsonObject(); + } + + public JsonObject getExpandedItems() { + return expandedItems; + } + } + + /** + * Adds a listener for {@code expanded-items-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addExpandedItemsChangeListener( + ComponentEventListener> listener) { + return getElement().addPropertyChangeListener("expandedItems", + event -> listener.onComponentEvent( + new ExpandedItemsChangeEvent((R) this, + event.isUserOriginated()))); + } + + public static class ActiveItemChangeEvent> + extends ComponentEvent { + private final JsonObject activeItem; + + public ActiveItemChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.activeItem = source.getActiveItemJsonObject(); + } + + public JsonObject getActiveItem() { + return activeItem; + } + } + + /** + * Adds a listener for {@code active-item-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addActiveItemChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("activeItem", + event -> listener.onComponentEvent( + new ActiveItemChangeEvent((R) this, + event.isUserOriginated()))); + } + + public static class SelectedItemsChangeEvent> + extends ComponentEvent { + private final JsonObject selectedItems; + + public SelectedItemsChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.selectedItems = source.getSelectedItemsJsonObject(); + } + + public JsonObject getSelectedItems() { + return selectedItems; + } + } + + /** + * Adds a listener for {@code selected-items-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addSelectedItemsChangeListener( + ComponentEventListener> listener) { + return getElement().addPropertyChangeListener("selectedItems", + event -> listener.onComponentEvent( + new SelectedItemsChangeEvent((R) this, + event.isUserOriginated()))); + } + + /** + * Adds the given components as children of this component at the slot + * 'nodistribute'. + * + * @param components + * The components to add. + * @see MDN + * page about slots + * @see Spec + * website about slots + */ + protected void addToNodistribute(Component... components) { + for (Component component : components) { + component.getElement().setAttribute("slot", "nodistribute"); + getElement().appendChild(component.getElement()); + } + } + + /** + * Removes the given child components from this component. + * + * @param components + * The components to remove. + * @throws IllegalArgumentException + * if any of the components is not a child of this component. + */ + protected void remove(Component... components) { + for (Component component : components) { + if (getElement().equals(component.getElement().getParent())) { + component.getElement().removeAttribute("slot"); + getElement().removeChild(component.getElement()); + } else { + throw new IllegalArgumentException("The given component (" + + component + ") is not a child of this component"); + } + } + } + + /** + * Removes all contents from this component, this includes child components, + * text content as well as child elements that have been added directly to + * this component using the {@link Element} API. + */ + protected void removeAll() { + getElement().getChildren() + .forEach(child -> child.removeAttribute("slot")); + getElement().removeAllChildren(); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridColumn.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridColumn.java new file mode 100644 index 00000000000..51bffd085a5 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridColumn.java @@ -0,0 +1,217 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * A {@code } is used to configure how a column in + * {@code } should look like by using HTML templates. A column can + * have a template for each of the three table sections: header, body and + * footer. + *

+ *

+ * The {@code class} attribute is used to differentiate header and footer + * templates from the body template. + *

+ *

Example:

+ *

+ * <vaadin-grid-column> <template class="header">I'm in + * the header</template> <template>I'm in the body</template> + * <template class="footer">I'm in the footer</template> + * </vaadin-grid-column> + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridColumnElement#5.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-column") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-column.html") +public abstract class GeneratedVaadinGridColumn> + extends Component implements HasStyle { + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When set to true, the column is user-resizable. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code resizable} property from the webcomponent + */ + protected boolean isResizableBoolean() { + return getElement().getProperty("resizable", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When set to true, the column is user-resizable. + *

+ * + * @param resizable + * the boolean value to set + */ + protected void setResizable(boolean resizable) { + getElement().setProperty("resizable", resizable); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true, the column is frozen. When a column inside of a column group + * is frozen, all of the sibling columns inside the group will get frozen + * also. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code frozen} property from the webcomponent + */ + protected boolean isFrozenBoolean() { + return getElement().getProperty("frozen", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true, the column is frozen. When a column inside of a column group + * is frozen, all of the sibling columns inside the group will get frozen + * also. + *

+ * + * @param frozen + * the boolean value to set + */ + protected void setFrozen(boolean frozen) { + getElement().setProperty("frozen", frozen); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When set to true, the cells for this column are hidden. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code hidden} property from the webcomponent + */ + protected boolean isHiddenBoolean() { + return getElement().getProperty("hidden", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When set to true, the cells for this column are hidden. + *

+ * + * @param hidden + * the boolean value to set + */ + protected void setHidden(boolean hidden) { + getElement().setProperty("hidden", hidden); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Width of the cells for this column. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code width} property from the webcomponent + */ + protected String getWidthString() { + return getElement().getProperty("width"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Width of the cells for this column. + *

+ * + * @param width + * the String value to set + */ + protected void setWidth(String width) { + getElement().setProperty("width", width == null ? "" : width); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Flex grow ratio for the cell widths. When set to 0, cell width is fixed. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code flexGrow} property from the webcomponent + */ + protected double getFlexGrowDouble() { + return getElement().getProperty("flexGrow", 0.0); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Flex grow ratio for the cell widths. When set to 0, cell width is fixed. + *

+ * + * @param flexGrow + * the double value to set + */ + protected void setFlexGrow(double flexGrow) { + getElement().setProperty("flexGrow", flexGrow); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridColumnGroup.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridColumnGroup.java new file mode 100644 index 00000000000..f53d4b7e2ec --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridColumnGroup.java @@ -0,0 +1,196 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * A {@code } is used to make groups of columns in + * {@code } and to configure additional headers and footers. + *

+ *

+ * Groups can be nested to create complex header and footer configurations. + *

+ *

+ * The {@code class} attribute is used to differentiate header and footer + * templates. + *

+ *

Example:

+ *

+ * <vaadin-grid-column-group resizable> <template + * class="header">Name</template> + *

+ *

+ * <vaadin-grid-column> <template + * class="header">First</template> + * <template>[[item.name.first]]</template> + * </vaadin-grid-column> <vaadin-grid-column> <template + * class="header">Last</template> + * <template>[[item.name.last]]</template> + * </vaadin-grid-column> </vaadin-grid-column-group> + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridColumnGroupElement#5.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-column-group") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-column-group.html") +public abstract class GeneratedVaadinGridColumnGroup> + extends Component implements HasStyle { + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When set to true, the column is user-resizable. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code resizable} property from the webcomponent + */ + protected boolean isResizableBoolean() { + return getElement().getProperty("resizable", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When set to true, the column is user-resizable. + *

+ * + * @param resizable + * the boolean value to set + */ + protected void setResizable(boolean resizable) { + getElement().setProperty("resizable", resizable); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true, the column is frozen. When a column inside of a column group + * is frozen, all of the sibling columns inside the group will get frozen + * also. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code frozen} property from the webcomponent + */ + protected boolean isFrozenBoolean() { + return getElement().getProperty("frozen", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true, the column is frozen. When a column inside of a column group + * is frozen, all of the sibling columns inside the group will get frozen + * also. + *

+ * + * @param frozen + * the boolean value to set + */ + protected void setFrozen(boolean frozen) { + getElement().setProperty("frozen", frozen); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When set to true, the cells for this column are hidden. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code hidden} property from the webcomponent + */ + protected boolean isHiddenBoolean() { + return getElement().getProperty("hidden", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When set to true, the cells for this column are hidden. + *

+ * + * @param hidden + * the boolean value to set + */ + protected void setHidden(boolean hidden) { + getElement().setProperty("hidden", hidden); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Flex grow ratio for the column group as the sum of the ratios of its + * child columns. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code flexGrow} property from the webcomponent + */ + protected double getFlexGrowDouble() { + return getElement().getProperty("flexGrow", 0.0); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Width of the column group as the sum of the widths of its child columns. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code width} property from the webcomponent + */ + protected String getWidthString() { + return getElement().getProperty("width"); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridFilter.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridFilter.java new file mode 100644 index 00000000000..c111701c0e6 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridFilter.java @@ -0,0 +1,228 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.Component; +import com.vaadin.flow.dom.Element; +import com.vaadin.flow.function.SerializableFunction; +import com.vaadin.flow.function.SerializableBiFunction; +import com.vaadin.flow.component.AbstractSinglePropertyField; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code } is a helper element for the + * {@code } that provides out-of-the-box UI controls, and handlers + * for filtering the grid data. + *

+ *

Example:

+ *

+ * <vaadin-grid-column> <template class="header"> + * <vaadin-grid-filter + * path="name.first"></vaadin-grid-filter> </template> + * <template>[[item.name.first]]</template> + * </vaadin-grid-column> + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridFilterElement#5.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-filter") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-filter.html") +public abstract class GeneratedVaadinGridFilter, T> + extends AbstractSinglePropertyField implements HasStyle { + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * JS Path of the property in the item used for filtering the data. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code path} property from the webcomponent + */ + protected String getPathString() { + return getElement().getProperty("path"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * JS Path of the property in the item used for filtering the data. + *

+ * + * @param path + * the String value to set + */ + protected void setPath(String path) { + getElement().setProperty("path", path == null ? "" : path); + } + + protected void focus() { + getElement().callFunction("focus"); + } + + /** + * Adds the given components as children of this component at the slot + * 'filter'. + * + * @param components + * The components to add. + * @see MDN + * page about slots + * @see Spec + * website about slots + */ + protected void addToFilter(Component... components) { + for (Component component : components) { + component.getElement().setAttribute("slot", "filter"); + getElement().appendChild(component.getElement()); + } + } + + /** + * Removes the given child components from this component. + * + * @param components + * The components to remove. + * @throws IllegalArgumentException + * if any of the components is not a child of this component. + */ + protected void remove(Component... components) { + for (Component component : components) { + if (getElement().equals(component.getElement().getParent())) { + component.getElement().removeAttribute("slot"); + getElement().removeChild(component.getElement()); + } else { + throw new IllegalArgumentException("The given component (" + + component + ") is not a child of this component"); + } + } + } + + /** + * Removes all contents from this component, this includes child components, + * text content as well as child elements that have been added directly to + * this component using the {@link Element} API. + */ + protected void removeAll() { + getElement().getChildren() + .forEach(child -> child.removeAttribute("slot")); + getElement().removeAllChildren(); + } + + /** + * Constructs a new GeneratedVaadinGridFilter component with the given + * arguments. + * + * @param initialValue + * the initial value to set to the value + * @param defaultValue + * the default value to use if the value isn't defined + * @param elementPropertyType + * the type of the element property + * @param presentationToModel + * a function that converts a string value to a model value + * @param modelToPresentation + * a function that converts a model value to a string value + * @param

+ * the property type + */ + public

GeneratedVaadinGridFilter(T initialValue, T defaultValue, + Class

elementPropertyType, + SerializableFunction presentationToModel, + SerializableFunction modelToPresentation) { + super("value", defaultValue, elementPropertyType, presentationToModel, + modelToPresentation); + if (initialValue != null) { + setModelValue(initialValue, false); + setPresentationValue(initialValue); + } + } + + /** + * Constructs a new GeneratedVaadinGridFilter component with the given + * arguments. + * + * @param initialValue + * the initial value to set to the value + * @param defaultValue + * the default value to use if the value isn't defined + * @param acceptNullValues + * whether null is accepted as a model value + */ + public GeneratedVaadinGridFilter(T initialValue, T defaultValue, + boolean acceptNullValues) { + super("value", defaultValue, acceptNullValues); + if (initialValue != null) { + setModelValue(initialValue, false); + setPresentationValue(initialValue); + } + } + + /** + * Constructs a new GeneratedVaadinGridFilter component with the given + * arguments. + * + * @param initialValue + * the initial value to set to the value + * @param defaultValue + * the default value to use if the value isn't defined + * @param elementPropertyType + * the type of the element property + * @param presentationToModel + * a function that accepts this component and a property value + * and returns a model value + * @param modelToPresentation + * a function that accepts this component and a model value and + * returns a property value + * @param

+ * the property type + */ + public

GeneratedVaadinGridFilter(T initialValue, T defaultValue, + Class

elementPropertyType, + SerializableBiFunction presentationToModel, + SerializableBiFunction modelToPresentation) { + super("value", defaultValue, elementPropertyType, presentationToModel, + modelToPresentation); + if (initialValue != null) { + setModelValue(initialValue, false); + setPresentationValue(initialValue); + } + } + + /** + * Default constructor. + */ + public GeneratedVaadinGridFilter() { + this(null, null, null, (SerializableFunction) null, + (SerializableFunction) null); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridOuterScroller.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridOuterScroller.java new file mode 100644 index 00000000000..927c8d558e2 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridOuterScroller.java @@ -0,0 +1,133 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import elemental.json.JsonObject; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * This Element is used internally by vaadin-grid. + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: GridOuterScrollerElement#UNKNOWN", "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-outer-scroller") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-outer-scroller.html") +public abstract class GeneratedVaadinGridOuterScroller> + extends Component implements HasStyle { + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code scrollTarget} property from the webcomponent + */ + protected JsonObject getScrollTargetJsonObject() { + return (JsonObject) getElement().getPropertyRaw("scrollTarget"); + } + + /** + * @param scrollTarget + * the JsonObject value to set + */ + protected void setScrollTarget(JsonObject scrollTarget) { + getElement().setPropertyJson("scrollTarget", scrollTarget); + } + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code scrollHandler} property from the webcomponent + */ + protected JsonObject getScrollHandlerJsonObject() { + return (JsonObject) getElement().getPropertyRaw("scrollHandler"); + } + + /** + * @param scrollHandler + * the JsonObject value to set + */ + protected void setScrollHandler(JsonObject scrollHandler) { + getElement().setPropertyJson("scrollHandler", scrollHandler); + } + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code passthrough} property from the webcomponent + */ + protected boolean isPassthroughBoolean() { + return getElement().getProperty("passthrough", false); + } + + /** + * @param passthrough + * the boolean value to set + */ + protected void setPassthrough(boolean passthrough) { + getElement().setProperty("passthrough", passthrough); + } + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code outerScrolling} property from the webcomponent + */ + protected boolean isOuterScrollingBoolean() { + return getElement().getProperty("outerScrolling", false); + } + + /** + * @param outerScrolling + * the boolean value to set + */ + protected void setOuterScrolling(boolean outerScrolling) { + getElement().setProperty("outerScrolling", outerScrolling); + } + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code noScrollbars} property from the webcomponent + */ + protected boolean isNoScrollbarsBoolean() { + return getElement().getProperty("noScrollbars", false); + } + + /** + * @param noScrollbars + * the boolean value to set + */ + protected void setNoScrollbars(boolean noScrollbars) { + getElement().setProperty("noScrollbars", noScrollbars); + } + + protected void syncOuterScroller() { + getElement().callFunction("syncOuterScroller"); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridScroller.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridScroller.java new file mode 100644 index 00000000000..7886378e1c7 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridScroller.java @@ -0,0 +1,64 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * This Element is used internally by vaadin-grid. + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: GridScrollerElement#UNKNOWN", "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-scroller") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-scroller.html") +public abstract class GeneratedVaadinGridScroller> + extends Component implements HasStyle { + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code size} property from the webcomponent + */ + protected double getSizeDouble() { + return getElement().getProperty("size", 0.0); + } + + /** + * @param size + * the double value to set + */ + protected void setSize(double size) { + getElement().setProperty("size", size); + } + + protected void clearSelection() { + getElement().callFunction("clearSelection"); + } + + protected void updateViewportBoundaries() { + getElement().callFunction("updateViewportBoundaries"); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridSelectionColumn.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridSelectionColumn.java new file mode 100644 index 00000000000..dd44db940f2 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridSelectionColumn.java @@ -0,0 +1,228 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.Synchronize; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code } is a helper element for the + * {@code } that provides default templates and functionality for + * item selection. + *

+ *

Example:

+ *

+ * <vaadin-grid items="[[items]]"> + * <vaadin-grid-selection-column frozen + * auto-select></vaadin-grid-selection-column> + *

+ *

+ * <vaadin-grid-column> ... + *

+ *

+ * By default the selection column displays {@code } elements + * in the column cells. The checkboxes in the body rows toggle selection of the + * corresponding row items. + *

+ *

+ * When the grid data is provided as an array of {@code items}, the column + * header gets an additional checkbox that can be used for toggling selection + * for all the items at once. + *

+ *

+ * The default content templates can also be overridden with custom + * ones. + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridSelectionColumnElement#5.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-selection-column") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-selection-column.html") +public abstract class GeneratedVaadinGridSelectionColumn> + extends GeneratedVaadinGridColumn implements HasStyle { + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Width of the cells for this column. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code width} property from the webcomponent + */ + protected String getWidthString() { + return getElement().getProperty("width"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Width of the cells for this column. + *

+ * + * @param width + * the String value to set + */ + protected void setWidth(String width) { + getElement().setProperty("width", width == null ? "" : width); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Flex grow ratio for the cell widths. When set to 0, cell width is fixed. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code flexGrow} property from the webcomponent + */ + protected double getFlexGrowDouble() { + return getElement().getProperty("flexGrow", 0.0); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Flex grow ratio for the cell widths. When set to 0, cell width is fixed. + *

+ * + * @param flexGrow + * the double value to set + */ + protected void setFlexGrow(double flexGrow) { + getElement().setProperty("flexGrow", flexGrow); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true, all the items are selected. + *

+ * This property is synchronized automatically from client side when a + * 'select-all-changed' event happens. + *

+ * + * @return the {@code selectAll} property from the webcomponent + */ + @Synchronize(property = "selectAll", value = "select-all-changed") + protected boolean isSelectAllBoolean() { + return getElement().getProperty("selectAll", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true, all the items are selected. + *

+ * + * @param selectAll + * the boolean value to set + */ + protected void setSelectAll(boolean selectAll) { + getElement().setProperty("selectAll", selectAll); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true, the active gets automatically selected. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code autoSelect} property from the webcomponent + */ + protected boolean isAutoSelectBoolean() { + return getElement().getProperty("autoSelect", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * When true, the active gets automatically selected. + *

+ * + * @param autoSelect + * the boolean value to set + */ + protected void setAutoSelect(boolean autoSelect) { + getElement().setProperty("autoSelect", autoSelect); + } + + public static class SelectAllChangeEvent> + extends ComponentEvent { + private final boolean selectAll; + + public SelectAllChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.selectAll = source.isSelectAllBoolean(); + } + + public boolean isSelectAll() { + return selectAll; + } + } + + /** + * Adds a listener for {@code select-all-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addSelectAllChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("selectAll", + event -> listener.onComponentEvent( + new SelectAllChangeEvent((R) this, + event.isUserOriginated()))); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridSorter.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridSorter.java new file mode 100644 index 00000000000..0b9fea2f74c --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridSorter.java @@ -0,0 +1,197 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.Synchronize; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code } is a helper element for the + * {@code } that provides out-of-the-box UI controls, visual + * feedback, and handlers for sorting the grid data. + *

+ *

Example:

+ *

+ * <vaadin-grid-column> <template class="header"> + * <vaadin-grid-sorter path="name.first">First + * Name</vaadin-grid-sorter> </template> + * <template>[[item.name.first]]</template> + * </vaadin-grid-column> + *

+ *

Styling

+ *

+ * The following shadow DOM parts are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Part nameDescription
{@code content}The slotted content wrapper
{@code indicators}The internal sorter indicators.
{@code order}The internal sorter order
+ *

+ * The following state attributes are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescriptionPart name
{@code direction}Sort direction of a sorter:host
+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridSorterElement#5.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-sorter") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-sorter.html") +public abstract class GeneratedVaadinGridSorter> + extends Component implements HasStyle { + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * JS Path of the property in the item used for sorting the data. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code path} property from the webcomponent + */ + protected String getPathString() { + return getElement().getProperty("path"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * JS Path of the property in the item used for sorting the data. + *

+ * + * @param path + * the String value to set + */ + protected void setPath(String path) { + getElement().setProperty("path", path == null ? "" : path); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * How to sort the data. Possible values are {@code asc} to use an ascending + * algorithm, {@code desc} to sort the data in descending direction, or + * {@code null} for not sorting the data. + *

+ * This property is synchronized automatically from client side when a + * 'direction-changed' event happens. + *

+ * + * @return the {@code direction} property from the webcomponent + */ + @Synchronize(property = "direction", value = "direction-changed") + protected String getDirectionString() { + return getElement().getProperty("direction"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * How to sort the data. Possible values are {@code asc} to use an ascending + * algorithm, {@code desc} to sort the data in descending direction, or + * {@code null} for not sorting the data. + *

+ * + * @param direction + * the String value to set + */ + protected void setDirection(String direction) { + getElement().setProperty("direction", + direction == null ? "" : direction); + } + + public static class DirectionChangeEvent> + extends ComponentEvent { + private final String direction; + + public DirectionChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.direction = source.getDirectionString(); + } + + public String getDirection() { + return direction; + } + } + + /** + * Adds a listener for {@code direction-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addDirectionChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("direction", + event -> listener.onComponentEvent( + new DirectionChangeEvent((R) this, + event.isUserOriginated()))); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridTemplatizer.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridTemplatizer.java new file mode 100644 index 00000000000..27fc836f498 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridTemplatizer.java @@ -0,0 +1,97 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import elemental.json.JsonObject; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code vaadin-grid-templatizer} is a helper element for the + * {@code vaadin-grid} that is preparing and stamping instances of cells and + * columns templates + *

+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridTemplatizer#UNKNOWN", "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-templatizer") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-templatizer.html") +public abstract class GeneratedVaadinGridTemplatizer> + extends Component implements HasStyle { + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code dataHost} property from the webcomponent + */ + protected JsonObject getDataHostJsonObject() { + return (JsonObject) getElement().getPropertyRaw("dataHost"); + } + + /** + * @param dataHost + * the JsonObject value to set + */ + protected void setDataHost(JsonObject dataHost) { + getElement().setPropertyJson("dataHost", dataHost); + } + + /** + * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + * + * @return the {@code template} property from the webcomponent + */ + protected JsonObject getTemplateJsonObject() { + return (JsonObject) getElement().getPropertyRaw("template"); + } + + /** + * @param template + * the JsonObject value to set + */ + protected void setTemplate(JsonObject template) { + getElement().setPropertyJson("template", template); + } + + protected void createInstance() { + getElement().callFunction("createInstance"); + } + + /** + * @param instance + * Missing documentation! + */ + protected void addInstance(JsonObject instance) { + getElement().callFunction("addInstance", instance); + } + + /** + * @param instance + * Missing documentation! + */ + protected void removeInstance(JsonObject instance) { + getElement().callFunction("removeInstance", instance); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridTreeToggle.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridTreeToggle.java new file mode 100644 index 00000000000..436c7b9fb44 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GeneratedVaadinGridTreeToggle.java @@ -0,0 +1,275 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; +import com.vaadin.flow.component.Synchronize; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code } is a helper element for the + * {@code } that provides toggle and level display functionality + * for the item tree. + *

+ *

Example:

+ *

+ * <vaadin-grid-column> <template class="header">Package + * name</template> <template> <vaadin-grid-tree-toggle + * leaf="[[!item.hasChildren]]" expanded="{{expanded}}" + * level="[[level]]"> [[item.name]] + * </vaadin-grid-tree-toggle> </template> + * </vaadin-grid-column> + *

+ *

Styling

+ *

+ * The following shadow DOM parts are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Part nameDescription
{@code toggle}The tree toggle icon
+ *

+ * The following state attributes are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescriptionPart name
{@code expanded}When present, the toggle is expanded:host
{@code leaf}When present, the toggle is not expandable, i. e., the current item is a + * leaf:host
+ *

+ * The following custom CSS properties are available on the + * {@code } element: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Custom CSS propertyDescriptionDefault
{@code --vaadin-grid-tree-toggle-level-offset}Visual offset step for each tree sublevel{@code 1em}
+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridTreeToggleElement#5.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-grid-tree-toggle") +@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-tree-toggle.html") +public abstract class GeneratedVaadinGridTreeToggle> + extends Component implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(GridTreeToggleVariant... variants) { + getThemeNames().addAll( + Stream.of(variants).map(GridTreeToggleVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(GridTreeToggleVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(GridTreeToggleVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Current level of the tree represented with a horizontal offset of the + * toggle button. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code level} property from the webcomponent + */ + protected double getLevelDouble() { + return getElement().getProperty("level", 0.0); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Current level of the tree represented with a horizontal offset of the + * toggle button. + *

+ * + * @param level + * the double value to set + */ + protected void setLevel(double level) { + getElement().setProperty("level", level); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Hides the toggle icon and disables toggling a tree sublevel. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code leaf} property from the webcomponent + */ + protected boolean isLeafBoolean() { + return getElement().getProperty("leaf", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Hides the toggle icon and disables toggling a tree sublevel. + *

+ * + * @param leaf + * the boolean value to set + */ + protected void setLeaf(boolean leaf) { + getElement().setProperty("leaf", leaf); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Sublevel toggle state. + *

+ * This property is synchronized automatically from client side when a + * 'expanded-changed' event happens. + *

+ * + * @return the {@code expanded} property from the webcomponent + */ + @Synchronize(property = "expanded", value = "expanded-changed") + protected boolean isExpandedBoolean() { + return getElement().getProperty("expanded", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Sublevel toggle state. + *

+ * + * @param expanded + * the boolean value to set + */ + protected void setExpanded(boolean expanded) { + getElement().setProperty("expanded", expanded); + } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + + public static class ExpandedChangeEvent> + extends ComponentEvent { + private final boolean expanded; + + public ExpandedChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.expanded = source.isExpandedBoolean(); + } + + public boolean isExpanded() { + return expanded; + } + } + + /** + * Adds a listener for {@code expanded-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addExpandedChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("expanded", + event -> listener.onComponentEvent( + new ExpandedChangeEvent((R) this, + event.isUserOriginated()))); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GridTreeToggleVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GridTreeToggleVariant.java new file mode 100644 index 00000000000..c6053bab78e --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GridTreeToggleVariant.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-grid-tree-toggle} + * component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridTreeToggleElement#5.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum GridTreeToggleVariant { + LUMO_CONNECTORS("connectors"); + + private final String variant; + + GridTreeToggleVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GridVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GridVariant.java new file mode 100644 index 00000000000..3a99ba15f88 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/grid/GridVariant.java @@ -0,0 +1,48 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.grid; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-grid} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.GridElement#5.1.0-alpha3", "Flow#1.1-SNAPSHOT" }) +public enum GridVariant { + LUMO_NO_BORDER("no-border"), LUMO_NO_ROW_BORDERS( + "no-row-borders"), LUMO_COLUMN_BORDERS( + "column-borders"), LUMO_ROW_STRIPES( + "row-stripes"), LUMO_COMPACT( + "compact"), LUMO_WRAP_CELL_CONTENT( + "wrap-cell-content"), MATERIAL_COLUMN_DIVIDERS( + "column-dividers"); + + private final String variant; + + GridVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/listbox/GeneratedVaadinListBox.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/listbox/GeneratedVaadinListBox.java index 75dc4cc6359..e0b6bc49354 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/listbox/GeneratedVaadinListBox.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/listbox/GeneratedVaadinListBox.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -60,8 +60,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.ListBoxElement#1.0.2", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ListBoxElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-list-box") @HtmlImport("frontend://bower_components/vaadin-list-box/src/vaadin-list-box.html") public abstract class GeneratedVaadinListBox> @@ -70,4 +71,8 @@ public abstract class GeneratedVaadinListBox protected void focus() { getElement().callFunction("focus"); } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } } \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotification.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotification.java index db4ea4ece08..d0657cfb00b 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotification.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotification.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -41,8 +41,9 @@ } *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.NotificationElement#1.0.0", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.NotificationElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-notification") @HtmlImport("frontend://bower_components/vaadin-notification/src/vaadin-notification.html") public abstract class GeneratedVaadinNotification> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotificationCard.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotificationCard.java index 60a597f905d..c27a2ea0204 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotificationCard.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotificationCard.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -55,10 +55,14 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.NotificationCard#UNKNOWN", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.NotificationCard#UNKNOWN", "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-notification-card") @HtmlImport("frontend://bower_components/vaadin-notification/src/vaadin-notification.html") public abstract class GeneratedVaadinNotificationCard> extends Component implements HasStyle { + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } } \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotificationContainer.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotificationContainer.java index f6e7e48e44f..7b039b768f2 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotificationContainer.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/notification/GeneratedVaadinNotificationContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,9 +30,9 @@ * The container element for all notifications. *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", "WebComponent: Vaadin.NotificationContainer#UNKNOWN", - "Flow#1.0-SNAPSHOT" }) + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-notification-container") @HtmlImport("frontend://bower_components/vaadin-notification/src/vaadin-notification.html") public abstract class GeneratedVaadinNotificationContainer> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/GeneratedVaadinHorizontalLayout.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/GeneratedVaadinHorizontalLayout.java new file mode 100644 index 00000000000..67fcf45a49d --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/GeneratedVaadinHorizontalLayout.java @@ -0,0 +1,103 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.orderedlayout; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code } provides a simple way to horizontally + * align your HTML elements. + *

+ *

{@code + *

+ *
Item 1
+
Item 2
+}

Built-in Theme Variations

+ *

+ * {@code } supports the following theme variations: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Theme variationDescription
{@code theme="margin"}Applies the default amount of CSS margin for the host element (specified + * by the theme)
{@code theme="padding"}Applies the default amount of CSS padding for the host element (specified + * by the theme)
{@code theme="spacing"}Applies the default amount of CSS margin between items (specified by the + * theme)
+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.HorizontalLayoutElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-horizontal-layout") +@HtmlImport("frontend://bower_components/vaadin-ordered-layout/src/vaadin-horizontal-layout.html") +public abstract class GeneratedVaadinHorizontalLayout> + extends Component implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(HorizontalLayoutVariant... variants) { + getThemeNames().addAll( + Stream.of(variants).map(HorizontalLayoutVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(HorizontalLayoutVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(HorizontalLayoutVariant::getVariantName) + .collect(Collectors.toList())); + } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/GeneratedVaadinVerticalLayout.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/GeneratedVaadinVerticalLayout.java new file mode 100644 index 00000000000..5ca5c810292 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/GeneratedVaadinVerticalLayout.java @@ -0,0 +1,103 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.orderedlayout; + +import javax.annotation.Generated; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.HtmlImport; +import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; +import com.vaadin.flow.component.Component; + +/** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * {@code } provides a simple way to vertically align + * your HTML elements. + *

+ *

{@code + *

+ *
Item 1
+
Item 2
+
}

Built-in Theme Variations

+ *

+ * {@code } supports the following theme variations: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Theme variationDescription
{@code theme="margin"}Applies the default amount of CSS margin for the host element (specified + * by the theme)
{@code theme="padding"}Applies the default amount of CSS padding for the host element (specified + * by the theme)
{@code theme="spacing"}Applies the default amount of CSS margin between items (specified by the + * theme)
+ */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.VerticalLayoutElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +@Tag("vaadin-vertical-layout") +@HtmlImport("frontend://bower_components/vaadin-ordered-layout/src/vaadin-vertical-layout.html") +public abstract class GeneratedVaadinVerticalLayout> + extends Component implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(VerticalLayoutVariant... variants) { + getThemeNames().addAll( + Stream.of(variants).map(VerticalLayoutVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(VerticalLayoutVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(VerticalLayoutVariant::getVariantName) + .collect(Collectors.toList())); + } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/HorizontalLayoutVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/HorizontalLayoutVariant.java new file mode 100644 index 00000000000..a5b859ab936 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/HorizontalLayoutVariant.java @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.orderedlayout; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-horizontal-layout} + * component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.HorizontalLayoutElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum HorizontalLayoutVariant { + LUMO_SPACING_XS("spacing-xs"), LUMO_SPACING_S("spacing-s"), LUMO_SPACING( + "spacing"), LUMO_SPACING_L("spacing-l"), LUMO_SPACING_XL( + "spacing-xl"), MATERIAL_SPACING_XS( + "spacing-xs"), MATERIAL_SPACING_S( + "spacing-s"), MATERIAL_SPACING( + "spacing"), MATERIAL_SPACING_L( + "spacing-l"), MATERIAL_SPACING_XL( + "spacing-xl"); + + private final String variant; + + HorizontalLayoutVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/VerticalLayoutVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/VerticalLayoutVariant.java new file mode 100644 index 00000000000..2d3e63a3550 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/orderedlayout/VerticalLayoutVariant.java @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.orderedlayout; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-vertical-layout} + * component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.VerticalLayoutElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum VerticalLayoutVariant { + LUMO_SPACING_XS("spacing-xs"), LUMO_SPACING_S("spacing-s"), LUMO_SPACING( + "spacing"), LUMO_SPACING_L("spacing-l"), LUMO_SPACING_XL( + "spacing-xl"), MATERIAL_SPACING_XS( + "spacing-xs"), MATERIAL_SPACING_S( + "spacing-s"), MATERIAL_SPACING( + "spacing"), MATERIAL_SPACING_L( + "spacing-l"), MATERIAL_SPACING_XL( + "spacing-xl"); + + private final String variant; + + VerticalLayoutVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/progressbar/GeneratedVaadinProgressBar.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/progressbar/GeneratedVaadinProgressBar.java index d3c10d4443a..896c2798234 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/progressbar/GeneratedVaadinProgressBar.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/progressbar/GeneratedVaadinProgressBar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,9 @@ import com.vaadin.flow.component.Tag; import com.vaadin.flow.component.dependency.HtmlImport; import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; import com.vaadin.flow.component.Component; /** @@ -95,12 +98,37 @@ * * */ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.ProgressBarElement#1.0.0", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ProgressBarElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-progress-bar") @HtmlImport("frontend://bower_components/vaadin-progress-bar/src/vaadin-progress-bar.html") public abstract class GeneratedVaadinProgressBar> - extends Component implements HasStyle { + extends Component implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(ProgressBarVariant... variants) { + getThemeNames().addAll( + Stream.of(variants).map(ProgressBarVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(ProgressBarVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(ProgressBarVariant::getVariantName) + .collect(Collectors.toList())); + } /** *

@@ -231,4 +259,8 @@ protected boolean isIndeterminateBoolean() { protected void setIndeterminate(boolean indeterminate) { getElement().setProperty("indeterminate", indeterminate); } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } } \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/progressbar/ProgressBarVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/progressbar/ProgressBarVariant.java new file mode 100644 index 00000000000..d92286b9885 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/progressbar/ProgressBarVariant.java @@ -0,0 +1,43 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.progressbar; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-progress-bar} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.ProgressBarElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum ProgressBarVariant { + LUMO_CONTRAST("contrast"), LUMO_ERROR("error"), LUMO_SUCCESS("success"); + + private final String variant; + + ProgressBarVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/GeneratedVaadinRadioButton.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/GeneratedVaadinRadioButton.java index a30a53f021e..908457327e0 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/GeneratedVaadinRadioButton.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/GeneratedVaadinRadioButton.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -98,8 +98,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.RadioButtonElement#1.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.RadioButtonElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-radio-button") @HtmlImport("frontend://bower_components/vaadin-radio-button/src/vaadin-radio-button.html") public abstract class GeneratedVaadinRadioButton> @@ -252,6 +253,10 @@ protected void setValue(String value) { getElement().setProperty("value", value == null ? "" : value); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + public static class CheckedChangeEvent> extends ComponentEvent { private final boolean checked; diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/GeneratedVaadinRadioGroup.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/GeneratedVaadinRadioGroup.java index 5d391b76ba7..0aef655353b 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/GeneratedVaadinRadioGroup.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/GeneratedVaadinRadioGroup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,14 @@ import com.vaadin.flow.component.Tag; import com.vaadin.flow.component.dependency.HtmlImport; import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; +import com.vaadin.flow.component.Synchronize; +import com.vaadin.flow.component.NotSupported; +import com.vaadin.flow.component.ComponentEvent; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.shared.Registration; import com.vaadin.flow.function.SerializableFunction; import com.vaadin.flow.function.SerializableBiFunction; import com.vaadin.flow.component.AbstractSinglePropertyField; @@ -42,6 +50,26 @@ *

*

Styling

*

+ * The following shadow DOM parts are available for styling: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Part nameDescription
{@code label}The label element
{@code group-field}The element that wraps radio-buttons
+ *

* The following state attributes are available for styling: *

* @@ -57,6 +85,21 @@ * * * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * *
Set when the radio group and its children are disabled.:host
{@code readonly}Set to a readonly text field:host
{@code invalid}Set when the element is invalid:host
{@code has-label}Set when the element has a label:host
*

@@ -65,12 +108,38 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.RadioGroupElement#1.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.RadioGroupElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-radio-group") @HtmlImport("frontend://bower_components/vaadin-radio-button/src/vaadin-radio-group.html") public abstract class GeneratedVaadinRadioGroup, T> - extends AbstractSinglePropertyField implements HasStyle { + extends AbstractSinglePropertyField + implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(RadioGroupVariant... variants) { + getThemeNames().addAll( + Stream.of(variants).map(RadioGroupVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(RadioGroupVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(RadioGroupVariant::getVariantName) + .collect(Collectors.toList())); + } /** *

@@ -106,6 +175,239 @@ protected void setDisabled(boolean disabled) { getElement().setProperty("disabled", disabled); } + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * This attribute indicates that the user cannot modify the value of the + * control. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code readonly} property from the webcomponent + */ + protected boolean isReadonlyBoolean() { + return getElement().getProperty("readonly", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * This attribute indicates that the user cannot modify the value of the + * control. + *

+ * + * @param readonly + * the boolean value to set + */ + protected void setReadonly(boolean readonly) { + getElement().setProperty("readonly", readonly); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * This property is set to true when the value is invalid. + *

+ * This property is synchronized automatically from client side when a + * 'invalid-changed' event happens. + *

+ * + * @return the {@code invalid} property from the webcomponent + */ + @Synchronize(property = "invalid", value = "invalid-changed") + protected boolean isInvalidBoolean() { + return getElement().getProperty("invalid", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * This property is set to true when the value is invalid. + *

+ * + * @param invalid + * the boolean value to set + */ + protected void setInvalid(boolean invalid) { + getElement().setProperty("invalid", invalid); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Specifies that the user must fill in a value. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code required} property from the webcomponent + */ + protected boolean isRequiredBoolean() { + return getElement().getProperty("required", false); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Specifies that the user must fill in a value. + *

+ * + * @param required + * the boolean value to set + */ + protected void setRequired(boolean required) { + getElement().setProperty("required", required); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Error to show when the input value is invalid. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code errorMessage} property from the webcomponent + */ + protected String getErrorMessageString() { + return getElement().getProperty("errorMessage"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Error to show when the input value is invalid. + *

+ * + * @param errorMessage + * the String value to set + */ + protected void setErrorMessage(String errorMessage) { + getElement().setProperty("errorMessage", + errorMessage == null ? "" : errorMessage); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * String used for the label element. + *

+ * This property is not synchronized automatically from the client side, so + * the returned value may not be the same as in client side. + *

+ * + * @return the {@code label} property from the webcomponent + */ + protected String getLabelString() { + return getElement().getProperty("label"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * String used for the label element. + *

+ * + * @param label + * the String value to set + */ + protected void setLabel(String label) { + getElement().setProperty("label", label == null ? "" : label); + } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Returns true if {@code value} is valid. {@code } uses this to + * check the validity or all its elements. + *

+ *

+ * This function is not supported by Flow because it returns a + * boolean. Functions with return types different than void are + * not supported at this moment. + */ + @NotSupported + protected void validate() { + } + + /** + *

+ * Description copied from corresponding location in WebComponent: + *

+ *

+ * Returns true if the current input value satisfies all constraints (if + * any) + *

+ *

+ * This function is not supported by Flow because it returns a + * boolean. Functions with return types different than void are + * not supported at this moment. + */ + @NotSupported + protected void checkValidity() { + } + + public static class InvalidChangeEvent> + extends ComponentEvent { + private final boolean invalid; + + public InvalidChangeEvent(R source, boolean fromClient) { + super(source, fromClient); + this.invalid = source.isInvalidBoolean(); + } + + public boolean isInvalid() { + return invalid; + } + } + + /** + * Adds a listener for {@code invalid-changed} events fired by the + * webcomponent. + * + * @param listener + * the listener + * @return a {@link Registration} for removing the event listener + */ + protected Registration addInvalidChangeListener( + ComponentEventListener> listener) { + return getElement() + .addPropertyChangeListener("invalid", + event -> listener.onComponentEvent( + new InvalidChangeEvent((R) this, + event.isUserOriginated()))); + } + /** * Constructs a new GeneratedVaadinRadioGroup component with the given * arguments. diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/RadioGroupVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/RadioGroupVariant.java new file mode 100644 index 00000000000..814cbe75fe2 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/radiobutton/RadioGroupVariant.java @@ -0,0 +1,43 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.radiobutton; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-radio-group} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.RadioGroupElement#1.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum RadioGroupVariant { + LUMO_VERTICAL("vertical"), MATERIAL_VERTICAL("vertical"); + + private final String variant; + + RadioGroupVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/splitlayout/GeneratedVaadinSplitLayout.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/splitlayout/GeneratedVaadinSplitLayout.java index 265373a1283..46319598eeb 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/splitlayout/GeneratedVaadinSplitLayout.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/splitlayout/GeneratedVaadinSplitLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -20,6 +20,9 @@ import com.vaadin.flow.component.dependency.HtmlImport; import com.vaadin.flow.component.HasStyle; import com.vaadin.flow.component.ClickNotifier; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; import com.vaadin.flow.component.DomEvent; import com.vaadin.flow.component.ComponentEvent; import com.vaadin.flow.component.ComponentEventListener; @@ -184,12 +187,37 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.SplitLayoutElement#4.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.SplitLayoutElement#4.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-split-layout") @HtmlImport("frontend://bower_components/vaadin-split-layout/src/vaadin-split-layout.html") public abstract class GeneratedVaadinSplitLayout> - extends Component implements HasStyle, ClickNotifier { + extends Component implements HasStyle, ClickNotifier, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(SplitLayoutVariant... variants) { + getThemeNames().addAll( + Stream.of(variants).map(SplitLayoutVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(SplitLayoutVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(SplitLayoutVariant::getVariantName) + .collect(Collectors.toList())); + } /** *

@@ -226,6 +254,10 @@ protected void setOrientation(String orientation) { orientation == null ? "" : orientation); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + @DomEvent("iron-resize") public static class IronResizeEvent> extends ComponentEvent { diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/splitlayout/SplitLayoutVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/splitlayout/SplitLayoutVariant.java new file mode 100644 index 00000000000..b4f1f929391 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/splitlayout/SplitLayoutVariant.java @@ -0,0 +1,43 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.splitlayout; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-split-layout} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.SplitLayoutElement#4.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum SplitLayoutVariant { + LUMO_SMALL("small"), LUMO_MINIMAL("minimal"); + + private final String variant; + + SplitLayoutVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/GeneratedVaadinTab.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/GeneratedVaadinTab.java index 69719dd63bc..004b4de5ba7 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/GeneratedVaadinTab.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/GeneratedVaadinTab.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,9 @@ import com.vaadin.flow.component.Tag; import com.vaadin.flow.component.dependency.HtmlImport; import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; import com.vaadin.flow.component.Component; /** @@ -85,12 +88,34 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.TabElement#2.0.0", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.TabElement#2.1.0-alpha3", "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-tab") @HtmlImport("frontend://bower_components/vaadin-tabs/src/vaadin-tab.html") public abstract class GeneratedVaadinTab> - extends Component implements HasStyle { + extends Component implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(TabVariant... variants) { + getThemeNames().addAll(Stream.of(variants) + .map(TabVariant::getVariantName).collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(TabVariant... variants) { + getThemeNames().removeAll(Stream.of(variants) + .map(TabVariant::getVariantName).collect(Collectors.toList())); + } /** *

@@ -189,4 +214,8 @@ protected boolean isSelectedBoolean() { protected void setSelected(boolean selected) { getElement().setProperty("selected", selected); } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } } \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/GeneratedVaadinTabs.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/GeneratedVaadinTabs.java index e3b5eb90984..313d2a6fd4e 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/GeneratedVaadinTabs.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/GeneratedVaadinTabs.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,9 @@ import com.vaadin.flow.component.Tag; import com.vaadin.flow.component.dependency.HtmlImport; import com.vaadin.flow.component.HasStyle; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; import com.vaadin.flow.component.Component; /** @@ -93,14 +96,40 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.TabsElement#2.0.0", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.TabsElement#2.1.0-alpha3", "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-tabs") @HtmlImport("frontend://bower_components/vaadin-tabs/src/vaadin-tabs.html") public abstract class GeneratedVaadinTabs> - extends Component implements HasStyle { + extends Component implements HasStyle, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(TabsVariant... variants) { + getThemeNames().addAll(Stream.of(variants) + .map(TabsVariant::getVariantName).collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(TabsVariant... variants) { + getThemeNames().removeAll(Stream.of(variants) + .map(TabsVariant::getVariantName).collect(Collectors.toList())); + } protected void focus() { getElement().callFunction("focus"); } + + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } } \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/TabVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/TabVariant.java new file mode 100644 index 00000000000..328f02703cb --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/TabVariant.java @@ -0,0 +1,42 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.tabs; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-tab} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.TabElement#2.1.0-alpha3", "Flow#1.1-SNAPSHOT" }) +public enum TabVariant { + LUMO_ICON_ON_TOP("icon-on-top"); + + private final String variant; + + TabVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/TabsVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/TabsVariant.java new file mode 100644 index 00000000000..38ce79fb61a --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/tabs/TabsVariant.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.tabs; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-tabs} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.TabsElement#2.1.0-alpha3", "Flow#1.1-SNAPSHOT" }) +public enum TabsVariant { + LUMO_SMALL("small"), LUMO_MINIMAL("minimal"), LUMO_HIDE_SCROLL_BUTTONS( + "hide-scroll-buttons"), LUMO_EQUAL_WIDTH_TABS( + "equal-width-tabs"), MATERIAL_FIXED("fixed"); + + private final String variant; + + TabsVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinPasswordField.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinPasswordField.java index 11ddc314c0c..8e6c0ea847e 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinPasswordField.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinPasswordField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -81,9 +81,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.PasswordFieldElement#2.0.1", - "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.PasswordFieldElement#2.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-password-field") @HtmlImport("frontend://bower_components/vaadin-text-field/src/vaadin-password-field.html") public abstract class GeneratedVaadinPasswordField, T> diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinTextArea.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinTextArea.java index 5ffd76b910b..2e8fb196481 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinTextArea.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinTextArea.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -20,6 +20,9 @@ import com.vaadin.flow.component.dependency.HtmlImport; import com.vaadin.flow.component.HasStyle; import com.vaadin.flow.component.Focusable; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; import com.vaadin.flow.component.Synchronize; import com.vaadin.flow.component.NotSupported; import com.vaadin.flow.component.DomEvent; @@ -44,6 +47,18 @@ * <vaadin-text-area label="Add description"> * </vaadin-text-area> *

+ *

Prefixes and suffixes

+ *

+ * These are child elements of a {@code } that are displayed + * inline with the input, before or after. In order for an element to be + * considered as a prefix, it must have the slot attribute set to {@code prefix} + * (and similarly for {@code suffix}). + *

+ *

+ * <vaadin-text-area label="Add description"> <div + * slot="prefix">Details:</div> <div + * slot="suffix">The end!</div> </vaadin-text-area> + *

*

Styling

*

* The following shadow DOM parts are available for styling: @@ -127,13 +142,38 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.TextAreaElement#2.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.TextAreaElement#2.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-text-area") @HtmlImport("frontend://bower_components/vaadin-text-field/src/vaadin-text-area.html") public abstract class GeneratedVaadinTextArea, T> extends AbstractSinglePropertyField - implements HasStyle, Focusable { + implements HasStyle, Focusable, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(TextAreaVariant... variants) { + getThemeNames() + .addAll(Stream.of(variants).map(TextAreaVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(TextAreaVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(TextAreaVariant::getVariantName) + .collect(Collectors.toList())); + } /** *

@@ -683,6 +723,10 @@ protected void checkValidity() { protected void validate() { } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + @DomEvent("change") public static class ChangeEvent> extends ComponentEvent { diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinTextField.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinTextField.java index 1471e55d0d4..9bd65e5b2f5 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinTextField.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/GeneratedVaadinTextField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -20,6 +20,9 @@ import com.vaadin.flow.component.dependency.HtmlImport; import com.vaadin.flow.component.HasStyle; import com.vaadin.flow.component.Focusable; +import com.vaadin.flow.component.HasTheme; +import java.util.stream.Stream; +import java.util.stream.Collectors; import com.vaadin.flow.component.Synchronize; import com.vaadin.flow.component.NotSupported; import com.vaadin.flow.component.DomEvent; @@ -44,6 +47,18 @@ * <vaadin-text-field label="First Name"> * </vaadin-text-field> *

+ *

Prefixes and suffixes

+ *

+ * These are child elements of a {@code } that are displayed + * inline with the input, before or after. In order for an element to be + * considered as a prefix, it must have the slot attribute set to {@code prefix} + * (and similarly for {@code suffix}). + *

+ *

+ * <vaadin-text-field label="Email address"> <div + * slot="prefix">Sent to:</div> <div + * slot="suffix">@vaadin.com</div> </vaadin-text-area> + *

*

Styling

*

* The following custom properties are available for styling: @@ -145,13 +160,38 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.TextFieldElement#2.0.1", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.TextFieldElement#2.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-text-field") @HtmlImport("frontend://bower_components/vaadin-text-field/src/vaadin-text-field.html") public abstract class GeneratedVaadinTextField, T> extends AbstractSinglePropertyField - implements HasStyle, Focusable { + implements HasStyle, Focusable, HasTheme { + + /** + * Adds theme variants to the component. + * + * @param variants + * theme variants to add + */ + public void addThemeVariants(TextFieldVariant... variants) { + getThemeNames().addAll( + Stream.of(variants).map(TextFieldVariant::getVariantName) + .collect(Collectors.toList())); + } + + /** + * Removes theme variants from the component. + * + * @param variants + * theme variants to remove + */ + public void removeThemeVariants(TextFieldVariant... variants) { + getThemeNames().removeAll( + Stream.of(variants).map(TextFieldVariant::getVariantName) + .collect(Collectors.toList())); + } /** *

@@ -801,6 +841,10 @@ protected void checkValidity() { protected void validate() { } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + @DomEvent("change") public static class ChangeEvent> extends ComponentEvent { diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/TextAreaVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/TextAreaVariant.java new file mode 100644 index 00000000000..6a6efff8c22 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/TextAreaVariant.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.textfield; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-text-area} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.TextAreaElement#2.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum TextAreaVariant { + LUMO_SMALL("small"), LUMO_ALIGN_CENTER("align-center"), LUMO_ALIGN_RIGHT( + "align-right"), MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label"); + + private final String variant; + + TextAreaVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/TextFieldVariant.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/TextFieldVariant.java new file mode 100644 index 00000000000..1ba7b2693d9 --- /dev/null +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/textfield/TextFieldVariant.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.textfield; + +import javax.annotation.Generated; + +/** + * Set of theme variants applicable for {@code vaadin-text-field} component. + */ +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.TextFieldElement#2.1.0-alpha3", + "Flow#1.1-SNAPSHOT" }) +public enum TextFieldVariant { + LUMO_SMALL("small"), LUMO_ALIGN_CENTER("align-center"), LUMO_ALIGN_RIGHT( + "align-right"), MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label"); + + private final String variant; + + TextFieldVariant(String variant) { + this.variant = variant; + } + + /** + * Gets the variant name. + * + * @return variant name + */ + public String getVariantName() { + return variant; + } +} \ No newline at end of file diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/upload/GeneratedVaadinUpload.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/upload/GeneratedVaadinUpload.java index 83af55adbd7..124886f7dae 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/upload/GeneratedVaadinUpload.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/upload/GeneratedVaadinUpload.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -112,8 +112,9 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.UploadElement#4.0.0", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.UploadElement#4.2.0-alpha3", + "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-upload") @HtmlImport("frontend://bower_components/vaadin-upload/src/vaadin-upload.html") public abstract class GeneratedVaadinUpload> @@ -780,6 +781,10 @@ protected void setI18n(JsonObject i18n) { getElement().setPropertyJson("i18n", i18n); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + /** *

* Description copied from corresponding location in WebComponent: diff --git a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/upload/GeneratedVaadinUploadFile.java b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/upload/GeneratedVaadinUploadFile.java index c1b0bfda176..40ed9522750 100644 --- a/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/upload/GeneratedVaadinUploadFile.java +++ b/flow-components-parent/flow-generated-components/src/main/java/com/vaadin/flow/component/upload/GeneratedVaadinUploadFile.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -114,22 +114,22 @@ * * {@code error} * An error has happened during uploading - * {@code progress} + * {@code :host} * * * {@code indeterminate} * Uploading is in progress, but the progress value is unknown - * {@code progress} + * {@code :host} * * * {@code uploading} * Uploading is in progress - * {@code progress} + * {@code :host} * * * {@code complete} * Uploading has finished successfully - * {@code progress} + * {@code :host} * * * @@ -139,8 +139,8 @@ * how to apply styles for shadow parts *

*/ -@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT", - "WebComponent: Vaadin.UploadFileElement#UNKNOWN", "Flow#1.0-SNAPSHOT" }) +@Generated({ "Generator: com.vaadin.generator.ComponentGenerator#1.1-SNAPSHOT", + "WebComponent: Vaadin.UploadFileElement#UNKNOWN", "Flow#1.1-SNAPSHOT" }) @Tag("vaadin-upload-file") @HtmlImport("frontend://bower_components/vaadin-upload/src/vaadin-upload-file.html") public abstract class GeneratedVaadinUploadFile> @@ -164,6 +164,10 @@ protected void setFile(JsonObject file) { getElement().setPropertyJson("file", file); } + protected void updateStyles() { + getElement().callFunction("updateStyles"); + } + @DomEvent("file-abort") public static class FileAbortEvent> extends ComponentEvent { diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/bin/flow-webcomponent-api-analyzer.js b/flow-components-parent/flow-webcomponent-api-analyzer/bin/flow-webcomponent-api-analyzer.js index 6e3ecf16c07..ce0cdaa4206 100755 --- a/flow-components-parent/flow-webcomponent-api-analyzer/bin/flow-webcomponent-api-analyzer.js +++ b/flow-components-parent/flow-webcomponent-api-analyzer/bin/flow-webcomponent-api-analyzer.js @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/bower.json b/flow-components-parent/flow-webcomponent-api-analyzer/bower.json index de1e05c6e41..2c88ffb01cd 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/bower.json +++ b/flow-components-parent/flow-webcomponent-api-analyzer/bower.json @@ -25,19 +25,22 @@ "tests" ], "dependencies": { - "vaadin-button": "2.0.1", - "vaadin-checkbox": "2.1.1", - "vaadin-combo-box": "4.0.1", - "vaadin-date-picker": "3.0.1", - "vaadin-dialog": "2.0.2", - "vaadin-form-layout": "2.0.1", - "vaadin-list-box": "1.0.2", - "vaadin-notification": "1.0.0", - "vaadin-progress-bar": "1.0.0", - "vaadin-radio-button": "1.0.1", - "vaadin-split-layout": "4.0.1", - "vaadin-tabs": "2.0.0", - "vaadin-text-field": "2.0.1", - "vaadin-upload": "4.0.0" + "vaadin-button": "2.1.0-alpha3", + "vaadin-checkbox": "2.2.0-alpha3", + "vaadin-combo-box": "4.1.0-alpha3", + "vaadin-context-menu": "4.1.0-alpha4", + "vaadin-date-picker": "3.2.0-alpha4", + "vaadin-dialog": "2.1.0-alpha3", + "vaadin-form-layout": "2.1.0-alpha4", + "vaadin-grid": "5.1.0-alpha3", + "vaadin-list-box": "1.1.0-alpha3", + "vaadin-notification": "1.1.0-alpha3", + "vaadin-ordered-layout": "1.1.0-alpha3", + "vaadin-progress-bar": "1.1.0-alpha3", + "vaadin-radio-button": "1.1.0-alpha3", + "vaadin-split-layout": "4.1.0-alpha3", + "vaadin-tabs": "2.1.0-alpha3", + "vaadin-text-field": "2.1.0-alpha3", + "vaadin-upload": "4.2.0-alpha3" } } diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/gulpfile.js b/flow-components-parent/flow-webcomponent-api-analyzer/gulpfile.js index ae38fe825e2..8b44b2ecc17 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/gulpfile.js +++ b/flow-components-parent/flow-webcomponent-api-analyzer/gulpfile.js @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -23,9 +23,10 @@ const VersionReader = require('./lib/js/version-transform'); const MixinCollector = require('./lib/js/mixin-collector'); const AnalyzerTransform = require('./lib/js/analyzer-transform'); const ElementJsonTransform = require('./lib/js/element-json-transform'); +const VariantsTransform = require('./lib/js/variants-transform'); const gulpIgnore = require('gulp-ignore'); -gulp.task('generate', function() { +gulp.task('prepare', cb => { if (!fs.existsSync(globalVar.bowerSrcDir) || fs.readdirSync(globalVar.bowerSrcDir).length === 0) { console.error(`Source directory ${globalVar.bowerSrcDir} does not exists or empty`); process.exit(1) @@ -33,7 +34,16 @@ gulp.task('generate', function() { console.log(`Cleaning output directory ${globalVar.targetDir}`); fs.removeSync(globalVar.targetDir); + cb(); +}); + +const variantsData = {}; +gulp.task('gather-variants-data', ['prepare'], () => { + return gulp.src('/Users/someonetoignore/Work/components/*/theme/*/vaadin-*-styles.html') + .pipe(new VariantsTransform(variantsData)); +}); +gulp.task('generate', ['gather-variants-data'], () => { console.log(`Running generate task, for resources from: ${globalVar.bowerSrcDir}`); // the element filter reads the bower.json file and parses the dependencies const elementFilter = new ElementFilter(); @@ -53,14 +63,12 @@ gulp.task('generate', function() { "!" + globalVar.bowerSrcDir + "web-animations-js/*", // Not useful in gwt and also has spurious event names "!" + globalVar.bowerSrcDir + "iron-jsonp-library/*", - ]) + ]) .pipe(gulpIgnore.include(file => elementFilter.acceptFile(file))) // ignores files not directly mentioned in the dependencies .pipe(versionReader) // Reads the versions of the elements .pipe(new AnalyzerTransform(elementFilter, mixinCollector)) // transforms out PolymerElements - .pipe(new ElementJsonTransform(versionReader, mixinCollector)) // transforms out json files + .pipe(new ElementJsonTransform(versionReader, mixinCollector, variantsData)) // transforms out json files .pipe(gulp.dest('.')); }); -gulp.task('default', function() { - gulp.start('generate'); -}); +gulp.task('default', ['generate']); diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/analyzer-transform.js b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/analyzer-transform.js index 9cb37922242..5d0832dc6fe 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/analyzer-transform.js +++ b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/analyzer-transform.js @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/element-filter.js b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/element-filter.js index f24e9c713b0..466f341af7b 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/element-filter.js +++ b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/element-filter.js @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/element-json-transform.js b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/element-json-transform.js index 688836189a1..ed7e74284e0 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/element-json-transform.js +++ b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/element-json-transform.js @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -101,12 +101,13 @@ const isOptional = (type) => { }; module.exports = class ElementJsonTransform extends Transform { - constructor(versionReader, mixinCollector) { + constructor(versionReader, mixinCollector, variantsData) { const options = {}; options.objectMode = true; super(options); this.versionReader = versionReader; this.mixinCollector = mixinCollector; + this.variantsData = variantsData; this.elementClassToProcessedResult = new Map(); } @@ -121,7 +122,8 @@ module.exports = class ElementJsonTransform extends Transform { * "properties": [ ... ], * "functions": [ ... ], * "events" : [ ... ], - * "behaviors": ["focusable", "clickable", "resizable"] + * "behaviors": ["focusable", "clickable", "resizable"], + * "variants": { themeName : [ ... ], ... }, * "description": "This is my component", * } * @@ -152,6 +154,7 @@ module.exports = class ElementJsonTransform extends Transform { "slots": this.slotsToJsonArray(element.slots), "behaviors": this.mixinCollector.getFlattenedBehaviorHierarchy(resultingName), "mixins": this.mixinCollector.getFlattenedMixinHierarchy(resultingName), + "variants": this.variantsData[elementTagName] || {}, "description": element.jsdoc ? element.jsdoc.description : "Missing documentation!" }; diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/global-variables.js b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/global-variables.js index fcc87763b51..a9337b1221e 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/global-variables.js +++ b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/global-variables.js @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/mixin-collector.js b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/mixin-collector.js index f016f51eafa..35969999f44 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/mixin-collector.js +++ b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/mixin-collector.js @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/variants-transform.js b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/variants-transform.js new file mode 100644 index 00000000000..9883fa5ed09 --- /dev/null +++ b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/variants-transform.js @@ -0,0 +1,160 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +'use strict'; + +const {Transform} = require('readable-stream'); +const cheerio = require('cheerio'); + +function _extractVariants(text) { + const variantsRegex = /\[theme~=["|']([^'"]+)["|']/ig; + const variants = new Set(); + + let matches; + while ((matches = variantsRegex.exec(text))) { + const newVariant = matches[1]; + if (newVariant) { + variants.add(newVariant); + } + } + return variants; +} + +function _fillVariantsFromDependencies(variantsToFill, modules, dependencyIds) { + if (dependencyIds && dependencyIds.length) { + for (const dependencyId of dependencyIds) { + const dependencyData = modules[dependencyId]; + if (dependencyData) { + (dependencyData.variants || []).forEach(variant => variantsToFill.add(variant)); + _fillVariantsFromDependencies(variantsToFill, modules, dependencyData.dependencies); + } else { + // If we would like to have a complete dependency tree, lumo and material packages need to be analyzed also. + // Those packages do not contain theme declarations currently and addin them into the current project + // is really complicated, so simple logging is preferred currently. + console.debug(`Module data for module id '${dependencyId}' is missing. Ignoring its dependencies.`); + } + } + } +} + +const modulesData = {}; +const themeToTagToModuleId = {}; + +module.exports = class VariantsTransform extends Transform { + /** + * Fills `variantsData` object with variants from the files parsed. + * + * @param variantsData the object to fill with variants parsed + */ + constructor(variantsData) { + super({objectMode: true}); + if (!variantsData || typeof variantsData !== 'object') { + throw new Error(`Expected constructor parameter to be non-null object but got: '${variantsData}'`); + } + this.variantsData = variantsData; + } + + /** + * First step, where style file is processed. + * Style files are investigated for `dom-module` presence. + * Each of the `dom-module` tag contents is parsed and the data required is extracted: + * * `id` attribute value – module id + * * `theme-for` attribute value – tag name of the component the theme is applicable to + * * [theme~="small"] theme variants that are present in the theme + * * style tags with `include` attribute are retrieved. + * The value of the attribute is a whitespace-separated `dom-module` ids that are looked for variants + * (including their style tags with `include` attributes, recursively). + * + * After the module data is parsed: + * * each module data is saved in the map under its id (`modulesData`) + * * if present, relation between component tag and module id is saved for each theme name (`themeToTagToModuleId`) + * + * Whenever possible, `variantsData` is populated with the data. + */ + _transform(styleFile, enc, cb) { + const $ = cheerio.load(styleFile.contents.toString(enc)); + $('dom-module').each((_, domModuleElement) => { + const themeName = (styleFile.path.match(/theme\/([^\/]+)\//) || [])[1]; + if (!themeName) { + return cb(new Error(`Failed to find a theme for path '${styleFile.path}'`)); + } + + const themeModules = modulesData[themeName] || (modulesData[themeName] = {}); + const moduleId = domModuleElement.attribs['id']; + if (themeModules[moduleId]) { + throw new Error(`Have found multiple 'dom-module' element declarations with the same id: '${moduleId}'. File with the second declaration: '${styleFile.path}'`); + } + + const domModuleSelector = $(domModuleElement); + const variants = _extractVariants(domModuleSelector.text()); + const dependencies = domModuleSelector + .find('style[include]') + .map((i, styleElement) => { + const includeAttributeValue = styleElement.attribs['include']; + if (includeAttributeValue) { + return includeAttributeValue.split(' '); + } + }) + .get(); + const componentTag = domModuleElement.attribs['theme-for']; + if (componentTag) { + const tagToModuleId = themeToTagToModuleId[themeName] || (themeToTagToModuleId[themeName] = {}); + tagToModuleId[componentTag] = moduleId; + if (variants.size || dependencies.length) { + const componentThemes = (this.variantsData[componentTag] || (this.variantsData[componentTag] = {})); + const componentVariants = (componentThemes[themeName] || (componentThemes[themeName] = new Set())); + if (variants.size) { + variants.forEach(variant => componentVariants.add(variant)); + } + } + } + themeModules[moduleId] = {dependencies, variants, componentTag}; + }); + cb(); + } + + /** + * After all modules are parsed and the supplementary data is collected, + * `variantsData` is additionally filled with all dependencies' variants, recursively. + */ + _flush(cb) { + for (const componentTag in this.variantsData) { + if (!this.variantsData.hasOwnProperty(componentTag)) { + continue; + } + + const componentThemes = this.variantsData[componentTag]; + for (const themeName in componentThemes) { + if (!componentThemes.hasOwnProperty(themeName)) { + continue; + } + + const themeModules = modulesData[themeName]; + const moduleId = themeToTagToModuleId[themeName][componentTag]; + const variantsToFill = componentThemes[themeName]; + _fillVariantsFromDependencies(variantsToFill, themeModules, (themeModules[moduleId] || {}).dependencies); + if (!variantsToFill.size) { + delete componentThemes[themeName]; + } else { + componentThemes[themeName] = [...variantsToFill]; + } + } + if (!Object.keys(componentThemes).length) { + delete this.variantsData[componentTag]; + } + } + cb(); + } +}; diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/version-transform.js b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/version-transform.js index 373a3a96d8d..967ac009cb0 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/version-transform.js +++ b/flow-components-parent/flow-webcomponent-api-analyzer/lib/js/version-transform.js @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/package-lock.json b/flow-components-parent/flow-webcomponent-api-analyzer/package-lock.json index a52653ea379..ae4b30aa4a4 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/package-lock.json +++ b/flow-components-parent/flow-webcomponent-api-analyzer/package-lock.json @@ -5,16 +5,16 @@ "requires": true, "dependencies": { "@types/chai": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.0.1.tgz", - "integrity": "sha512-DWrdkraJO+KvBB7+Jc6AuDd2+fwV6Z9iK8cqEEoYpcurYrH7GiUZmwjFuQIIWj5HhFz6NsSxdN72YMIHT7Fy2Q==" + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.4.tgz", + "integrity": "sha512-h6+VEw2Vr3ORiFCyyJmcho2zALnUq9cvdB/IO8Xs9itrJVCenC7o26A6+m7D0ihTTr65eS259H5/Ghl/VjYs6g==" }, "@types/chai-subset": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.0.tgz", - "integrity": "sha1-dM7M7zsvwtpzkbcT3rcv6afl94I=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.1.tgz", + "integrity": "sha512-Aof+FLfWzBPzDgJ2uuBuPNOBHVx9Siyw4vmOcsMgsuxX1nfUWSlzpq4pdvQiaBgGjGS7vP/Oft5dpJbX4krT1A==", "requires": { - "@types/chai": "4.0.1" + "@types/chai": "*" } }, "@types/chalk": { @@ -48,29 +48,29 @@ "integrity": "sha1-qnr2mjqRkiFx7kEbPJ2Pa+tK8yE=" }, "@types/node": { - "version": "6.0.84", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.84.tgz", - "integrity": "sha512-1SvEazClhUBRNroJM3oB3xf3u2r6xGmHDGbdigqNPHvNKLl8/BtATgO9eC04ZLuovpSh0B20BF1QJxdi+qmTlg==" + "version": "6.0.114", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.114.tgz", + "integrity": "sha512-5ViC9dwf1VIAtrOFTvOuN04lJgw28eKjuy0Vg2Bd/fSlxKP2feCSkIw04ZgOENL2ywdWrtbkthp1XVLEjJmouw==" }, "@types/parse5": { "version": "2.2.34", "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-2.2.34.tgz", "integrity": "sha1-44cKEOgnNacg9i1x3NGDunjvOp0=", "requires": { - "@types/node": "6.0.84" + "@types/node": "*" } }, "acorn": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.1.tgz", - "integrity": "sha512-vOk6uEMctu0vQrvuSqFdJyqj1Q0S5VTDL79qtjo+DhRr+1mmaD+tluFSCZqhvi/JUhXSzoZN2BhtstaPEeE8cw==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" }, "acorn-jsx": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "requires": { - "acorn": "3.3.0" + "acorn": "^3.0.4" }, "dependencies": { "acorn": { @@ -80,12 +80,6 @@ } } }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "optional": true - }, "ansi-cyan": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", @@ -94,6 +88,14 @@ "ansi-wrap": "0.1.0" } }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-red": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", @@ -123,12 +125,9 @@ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" }, "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "1.1.0" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, "arr-flatten": { "version": "1.1.0", @@ -136,9 +135,9 @@ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" }, "arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, "array-differ": { "version": "1.0.0", @@ -151,16 +150,16 @@ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" }, "array-slice": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", - "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -169,47 +168,145 @@ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" }, "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "atob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "beeper": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=" }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, "bower": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/bower/-/bower-1.8.2.tgz", - "integrity": "sha1-rfU1KcjUrwLvJPuNU0HBQZ0z4vc=" + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/bower/-/bower-1.8.4.tgz", + "integrity": "sha1-54dqB23rgTf30GUl3F6MZtuC8oo=" }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "chalk": { @@ -217,17 +314,61 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "requires": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } } }, "clone": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" }, "clone-stats": { "version": "0.0.1", @@ -239,28 +380,81 @@ "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", "requires": { - "q": "1.5.0" + "q": "^1.1.2" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" + }, "cssbeautify": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cssbeautify/-/cssbeautify-0.3.1.tgz", "integrity": "sha1-Et0fc0A1wub6ymfcvc73TkKBE5c=" }, "dateformat": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", - "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, "deep-is": { "version": "0.1.3", @@ -272,7 +466,44 @@ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "requires": { - "clone": "1.0.2" + "clone": "^1.0.2" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } } }, "deprecated": { @@ -281,26 +512,31 @@ "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=" }, "detect-file": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", - "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "requires": { - "fs-exists-sync": "0.1.0" + "esutils": "^2.0.2" } }, - "doctrine": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", - "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" }, "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" } } }, @@ -309,11 +545,11 @@ "resolved": "https://registry.npmjs.org/dom5/-/dom5-2.3.0.tgz", "integrity": "sha1-+CBJdb0NrLvltYqKk//B/tD/zSo=", "requires": { - "@types/clone": "0.1.30", - "@types/node": "6.0.84", - "@types/parse5": "2.2.34", - "clone": "2.1.1", - "parse5": "2.2.3" + "@types/clone": "^0.1.29", + "@types/node": "^6.0.0", + "@types/parse5": "^2.2.32", + "clone": "^2.1.0", + "parse5": "^2.2.2" }, "dependencies": { "clone": { @@ -323,12 +559,57 @@ } } }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, "duplexer2": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", "requires": { - "readable-stream": "1.1.14" + "readable-stream": "~1.1.9" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } } }, "end-of-stream": { @@ -336,46 +617,52 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", "requires": { - "once": "1.3.3" + "once": "~1.3.0" } }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "requires": { - "esprima": "2.7.3", - "estraverse": "1.9.3", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.2.0" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", + "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" }, "dependencies": { - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true } } }, "espree": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.4.3.tgz", - "integrity": "sha1-KRC1zNSc6JPC//+qtP2LOjG4I3Q=", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "requires": { - "acorn": "5.1.1", - "acorn-jsx": "3.0.1" + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" } }, "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" }, "estraverse": { "version": "4.2.0", @@ -388,27 +675,43 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "requires": { - "fill-range": "2.2.3" + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "expand-tilde": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", - "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", "requires": { - "os-homedir": "1.0.2" + "homedir-polyfill": "^1.0.1" } }, "extend": { @@ -417,35 +720,91 @@ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, "extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "kind-of": "1.1.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { - "kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=" + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } } } }, "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "1.0.0" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } } }, "fancy-log": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", - "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", "requires": { - "chalk": "1.1.3", - "time-stamp": "1.1.0" + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "time-stamp": "^1.0.0" } }, "fast-levenshtein": { @@ -453,21 +812,25 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" - }, "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "find-index": { @@ -476,14 +839,14 @@ "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=" }, "findup-sync": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", - "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", "requires": { - "detect-file": "0.1.0", - "is-glob": "2.0.1", - "micromatch": "2.3.11", - "resolve-dir": "0.1.1" + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" } }, "fined": { @@ -491,21 +854,11 @@ "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", "requires": { - "expand-tilde": "2.0.2", - "is-plain-object": "2.0.4", - "object.defaults": "1.1.0", - "object.pick": "1.2.0", - "parse-filepath": "1.0.1" - }, - "dependencies": { - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "requires": { - "homedir-polyfill": "1.0.1" - } - } + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" } }, "first-chunk-stream": { @@ -514,9 +867,9 @@ "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=" }, "flagged-respawn": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", - "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.0.tgz", + "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=" }, "for-in": { "version": "1.0.2", @@ -524,26 +877,29 @@ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" }, "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, - "fs-exists-sync": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", - "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=" + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "^0.2.2" + } }, "fs-extra": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "gaze": { @@ -551,35 +907,23 @@ "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", "requires": { - "globule": "0.1.0" + "globule": "~0.1.0" } }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, "glob": { "version": "4.5.3", "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "2.0.10", - "once": "1.3.3" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "requires": { - "is-glob": "2.0.1" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" } }, "glob-stream": { @@ -587,32 +931,42 @@ "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", "requires": { - "glob": "4.5.3", - "glob2base": "0.0.12", - "minimatch": "2.0.10", - "ordered-read-streams": "0.1.0", - "through2": "0.6.5", - "unique-stream": "1.0.0" + "glob": "^4.3.1", + "glob2base": "^0.0.12", + "minimatch": "^2.0.1", + "ordered-read-streams": "^0.1.0", + "through2": "^0.6.1", + "unique-stream": "^1.0.0" }, "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "through2": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "requires": { - "readable-stream": "1.0.34", - "xtend": "4.0.1" + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" } } } @@ -622,7 +976,7 @@ "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", "requires": { - "gaze": "0.5.2" + "gaze": "^0.5.1" } }, "glob2base": { @@ -630,27 +984,29 @@ "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", "requires": { - "find-index": "0.1.1" + "find-index": "^0.1.1" } }, "global-modules": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", - "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "requires": { - "global-prefix": "0.1.5", - "is-windows": "0.2.0" + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" } }, "global-prefix": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", - "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", "requires": { - "homedir-polyfill": "1.0.1", - "ini": "1.3.4", - "is-windows": "0.2.0", - "which": "1.2.14" + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" } }, "globule": { @@ -658,9 +1014,9 @@ "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", "requires": { - "glob": "3.1.21", - "lodash": "1.0.2", - "minimatch": "0.2.14" + "glob": "~3.1.21", + "lodash": "~1.0.1", + "minimatch": "~0.2.11" }, "dependencies": { "glob": { @@ -668,9 +1024,9 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", "requires": { - "graceful-fs": "1.2.3", - "inherits": "1.0.2", - "minimatch": "0.2.14" + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" } }, "graceful-fs": { @@ -683,28 +1039,23 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=" }, - "lodash": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", - "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=" - }, "minimatch": { "version": "0.2.14", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", "requires": { - "lru-cache": "2.7.3", - "sigmund": "1.0.1" + "lru-cache": "2", + "sigmund": "~1.0.0" } } } }, "glogg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", - "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", "requires": { - "sparkles": "1.0.0" + "sparkles": "^1.0.0" } }, "graceful-fs": { @@ -717,19 +1068,19 @@ "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", "requires": { - "archy": "1.0.0", - "chalk": "1.1.3", - "deprecated": "0.0.1", - "gulp-util": "3.0.8", - "interpret": "1.0.3", - "liftoff": "2.3.0", - "minimist": "1.1.3", - "orchestrator": "0.3.8", - "pretty-hrtime": "1.0.3", - "semver": "4.3.6", - "tildify": "1.2.0", - "v8flags": "2.1.1", - "vinyl-fs": "0.3.14" + "archy": "^1.0.0", + "chalk": "^1.0.0", + "deprecated": "^0.0.1", + "gulp-util": "^3.0.0", + "interpret": "^1.0.0", + "liftoff": "^2.1.0", + "minimist": "^1.1.0", + "orchestrator": "^0.3.0", + "pretty-hrtime": "^1.0.0", + "semver": "^4.1.0", + "tildify": "^1.0.0", + "v8flags": "^2.0.2", + "vinyl-fs": "^0.3.0" } }, "gulp-filter": { @@ -737,9 +1088,9 @@ "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.1.0.tgz", "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", "requires": { - "multimatch": "2.1.0", - "plugin-error": "0.1.2", - "streamfilter": "1.0.5" + "multimatch": "^2.0.0", + "plugin-error": "^0.1.2", + "streamfilter": "^1.0.5" } }, "gulp-ignore": { @@ -747,8 +1098,8 @@ "resolved": "https://registry.npmjs.org/gulp-ignore/-/gulp-ignore-2.0.2.tgz", "integrity": "sha1-XC6ioKRALgq0orzRLv2SlTRNePI=", "requires": { - "gulp-match": "1.0.3", - "through2": "2.0.3" + "gulp-match": "^1.0.3", + "through2": "^2.0.1" } }, "gulp-match": { @@ -756,7 +1107,7 @@ "resolved": "https://registry.npmjs.org/gulp-match/-/gulp-match-1.0.3.tgz", "integrity": "sha1-kcfA1/Kb7NZgbVfYCn+Hdqh6uo4=", "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.3" }, "dependencies": { "minimatch": { @@ -764,7 +1115,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } } } @@ -774,24 +1125,24 @@ "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", "requires": { - "array-differ": "1.0.0", - "array-uniq": "1.0.3", - "beeper": "1.1.1", - "chalk": "1.1.3", - "dateformat": "2.0.0", - "fancy-log": "1.3.0", - "gulplog": "1.0.0", - "has-gulplog": "0.1.0", - "lodash._reescape": "3.0.0", - "lodash._reevaluate": "3.0.0", - "lodash._reinterpolate": "3.0.0", - "lodash.template": "3.6.2", - "minimist": "1.1.3", - "multipipe": "0.1.2", - "object-assign": "3.0.0", + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^2.0.0", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", "replace-ext": "0.0.1", - "through2": "2.0.3", - "vinyl": "0.5.3" + "through2": "^2.0.0", + "vinyl": "^0.5.0" }, "dependencies": { "vinyl": { @@ -799,8 +1150,8 @@ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", "requires": { - "clone": "1.0.2", - "clone-stats": "0.0.1", + "clone": "^1.0.0", + "clone-stats": "^0.0.1", "replace-ext": "0.0.1" } } @@ -811,7 +1162,7 @@ "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", "requires": { - "glogg": "1.0.0" + "glogg": "^1.0.0" } }, "has-ansi": { @@ -819,7 +1170,7 @@ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-gulplog": { @@ -827,7 +1178,36 @@ "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", "requires": { - "sparkles": "1.0.0" + "sparkles": "^1.0.0" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "homedir-polyfill": { @@ -835,7 +1215,20 @@ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", "requires": { - "parse-passwd": "1.0.0" + "parse-passwd": "^1.0.0" + } + }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "requires": { + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" } }, "inflight": { @@ -843,8 +1236,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "1.3.3", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -853,66 +1246,116 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "interpret": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", - "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" }, "is-absolute": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", - "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "requires": { - "is-relative": "0.2.1", - "is-windows": "0.2.0" + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" } }, - "is-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", - "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "is-primitive": "2.0.0" + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, - "is-extendable": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^2.1.0" } }, "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-plain-object": { @@ -920,40 +1363,23 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } + "isobject": "^3.0.1" } }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" - }, "is-relative": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", - "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "requires": { - "is-unc-path": "0.1.2" + "is-unc-path": "^1.0.0" } }, "is-unc-path": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", - "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "requires": { - "unc-path-regex": "0.1.2" + "unc-path-regex": "^0.1.2" } }, "is-utf8": { @@ -962,14 +1388,14 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, "is-windows": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", - "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", @@ -977,66 +1403,57 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - } - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsonschema": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz", - "integrity": "sha1-PO3o4+QR03eHLu+8n98mODy8Ptk=" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.4.tgz", + "integrity": "sha512-lz1nOH69GbsVHeVgEdvyavc/33oymY1AZwtePMiMj4HZPMbP5OIKK3zT9INMWjwua/V4Z4yq7wSlBbSG+g4AEw==" }, "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.5" - } + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "liftoff": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", - "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", "requires": { - "extend": "3.0.1", - "findup-sync": "0.4.3", - "fined": "1.1.0", - "flagged-respawn": "0.3.2", - "lodash.isplainobject": "4.0.6", - "lodash.isstring": "4.0.1", - "lodash.mapvalues": "4.6.0", - "rechoir": "0.6.2", - "resolve": "1.3.3" + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" } }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=" + }, "lodash._basecopy": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", @@ -1082,14 +1499,44 @@ "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" }, + "lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, "lodash.escape": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", "requires": { - "lodash._root": "3.0.1" + "lodash._root": "^3.0.0" } }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, "lodash.isarguments": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", @@ -1100,50 +1547,65 @@ "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, "lodash.keys": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", "requires": { - "lodash._getnative": "3.9.1", - "lodash.isarguments": "3.1.0", - "lodash.isarray": "3.0.4" + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" } }, - "lodash.mapvalues": { + "lodash.map": { "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", - "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=" + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "lodash.merge": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", + "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" }, "lodash.restparam": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, "lodash.template": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", "requires": { - "lodash._basecopy": "3.0.1", - "lodash._basetostring": "3.0.1", - "lodash._basevalues": "3.0.0", - "lodash._isiterateecall": "3.0.9", - "lodash._reinterpolate": "3.0.0", - "lodash.escape": "3.2.0", - "lodash.keys": "3.1.2", - "lodash.restparam": "3.6.1", - "lodash.templatesettings": "3.1.1" + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" } }, "lodash.templatesettings": { @@ -1151,8 +1613,8 @@ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.escape": "3.2.0" + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" } }, "lru-cache": { @@ -1160,29 +1622,45 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.3" + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } }, "minimatch": { @@ -1190,7 +1668,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.0.0" } }, "minimist": { @@ -1198,6 +1676,25 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", "integrity": "sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag=" }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -1213,15 +1710,20 @@ } } }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, "multimatch": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" }, "dependencies": { "minimatch": { @@ -1229,7 +1731,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } } } @@ -1242,17 +1744,35 @@ "duplexer2": "0.0.2" } }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, "natives": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", - "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.4.tgz", + "integrity": "sha512-Q29yeg9aFKwhLVdkTAejM/HvYG0Y1Am1+HUkFQGn5k2j8GS+v60TVmZh6nujpEAj/qql+wGUrlryO8bF+b1jEg==" }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", "requires": { - "remove-trailing-separator": "1.0.2" + "boolbase": "~1.0.0" } }, "object-assign": { @@ -1260,47 +1780,68 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "array-each": "1.0.1", - "array-slice": "1.0.0", - "for-own": "1.0.0", - "isobject": "3.0.1" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "for-in": "1.0.2" + "is-descriptor": "^0.1.0" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } } } }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" } }, "object.pick": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.2.0.tgz", - "integrity": "sha1-tTkr7peC2m2ft9avr1OXefEjTCs=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "2.1.0" + "isobject": "^3.0.1" } }, "once": { @@ -1308,7 +1849,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optionator": { @@ -1316,12 +1857,12 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" } }, "orchestrator": { @@ -1329,9 +1870,9 @@ "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", "requires": { - "end-of-stream": "0.1.5", - "sequencify": "0.0.7", - "stream-consume": "0.1.0" + "end-of-stream": "~0.1.5", + "sequencify": "~0.0.7", + "stream-consume": "~0.1.0" } }, "ordered-read-streams": { @@ -1345,24 +1886,13 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "parse-filepath": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", - "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", - "requires": { - "is-absolute": "0.2.6", - "map-cache": "0.2.2", - "path-root": "0.1.1" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" } }, "parse-passwd": { @@ -1375,6 +1905,11 @@ "resolved": "https://registry.npmjs.org/parse5/-/parse5-2.2.3.tgz", "integrity": "sha1-DE/EHBAAxea5PUiwP4CDg3g06fY=" }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", @@ -1385,7 +1920,7 @@ "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", "requires": { - "path-root-regex": "0.1.2" + "path-root-regex": "^0.1.0" } }, "path-root-regex": { @@ -1398,11 +1933,11 @@ "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", "requires": { - "ansi-cyan": "0.1.1", - "ansi-red": "0.1.1", - "arr-diff": "1.1.0", - "arr-union": "2.1.0", - "extend-shallow": "1.1.4" + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" }, "dependencies": { "arr-diff": { @@ -1410,14 +1945,32 @@ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", "requires": { - "arr-flatten": "1.1.0", - "array-slice": "0.2.3" + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" } }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=" + }, "array-slice": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=" + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=" } } }, @@ -1426,27 +1979,27 @@ "resolved": "https://registry.npmjs.org/polymer-analyzer/-/polymer-analyzer-2.2.2.tgz", "integrity": "sha512-8kwxAAx95AMJbDQ1x6vKyCkTDnowG5q1nn8gPf91PP+GNgQhgVRPBeLZQzpPyHY7dplvOyEoBhtjZvaQDg5teA==", "requires": { - "@types/chai-subset": "1.3.0", - "@types/chalk": "0.4.31", - "@types/clone": "0.1.30", - "@types/cssbeautify": "0.3.1", - "@types/doctrine": "0.0.1", - "@types/escodegen": "0.0.2", - "@types/estree": "0.0.34", - "@types/node": "6.0.84", - "@types/parse5": "2.2.34", - "chalk": "1.1.3", - "clone": "2.1.1", - "cssbeautify": "0.3.1", - "doctrine": "2.0.0", - "dom5": "2.3.0", - "escodegen": "1.8.1", - "espree": "3.4.3", - "estraverse": "4.2.0", - "jsonschema": "1.1.1", - "parse5": "2.2.3", + "@types/chai-subset": "^1.3.0", + "@types/chalk": "^0.4.30", + "@types/clone": "^0.1.30", + "@types/cssbeautify": "^0.3.1", + "@types/doctrine": "^0.0.1", + "@types/escodegen": "^0.0.2", + "@types/estree": "^0.0.34", + "@types/node": "^6.0.0", + "@types/parse5": "^2.2.34", + "chalk": "^1.1.3", + "clone": "^2.0.0", + "cssbeautify": "^0.3.1", + "doctrine": "^2.0.0", + "dom5": "^2.1.0", + "escodegen": "^1.7.0", + "espree": "^3.1.7", + "estraverse": "^4.2.0", + "jsonschema": "^1.1.0", + "parse5": "^2.2.1", "shady-css-parser": "0.0.8", - "strip-indent": "2.0.0" + "strip-indent": "^2.0.0" }, "dependencies": { "clone": { @@ -1456,77 +2009,43 @@ } } }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" - }, "pretty-hrtime": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "q": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=" - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "1.1.5" - } - } - } + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rechoir": { @@ -1534,23 +2053,18 @@ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "requires": { - "resolve": "1.3.3" + "resolve": "^1.1.6" } }, - "regex-cache": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", - "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "is-equal-shallow": "0.1.3", - "is-primitive": "2.0.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, - "remove-trailing-separator": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", - "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=" - }, "repeat-element": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", @@ -1567,26 +2081,44 @@ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" }, "resolve": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", - "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "resolve-dir": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", - "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", "requires": { - "expand-tilde": "1.2.2", - "global-modules": "0.2.3" + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" } }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } }, "semver": { "version": "4.3.6", @@ -1598,6 +2130,27 @@ "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=" }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "shady-css-parser": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/shady-css-parser/-/shady-css-parser-0.0.8.tgz", @@ -1608,73 +2161,184 @@ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "optional": true, - "requires": { - "amdefine": "1.0.1" + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "sparkles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", - "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=" - }, - "stream-consume": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", - "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=" - }, - "streamfilter": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.5.tgz", - "integrity": "sha1-h1BxEb644phFFxe1Ec/tjwAqv1M=", + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "readable-stream": "2.3.3" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { - "isarray": { + "define-property": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "kind-of": "^6.0.0" } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "safe-buffer": "5.1.1" + "is-buffer": "^1.1.5" } } } }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==" + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-consume": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==" + }, + "streamfilter": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.7.tgz", + "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", + "requires": { + "readable-stream": "^2.0.2" + } + }, "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -1682,8 +2346,8 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", "requires": { - "first-chunk-stream": "1.0.0", - "is-utf8": "0.2.1" + "first-chunk-stream": "^1.0.0", + "is-utf8": "^0.2.0" } }, "strip-indent": { @@ -1701,37 +2365,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - } + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, "tildify": { @@ -1739,7 +2374,7 @@ "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", "requires": { - "os-homedir": "1.0.2" + "os-homedir": "^1.0.0" } }, "time-stamp": { @@ -1747,12 +2382,50 @@ "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "unc-path-regex": { @@ -1760,15 +2433,93 @@ "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, "unique-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=" }, "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "urix": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.0.tgz", - "integrity": "sha1-nrHEZR3rzGcMyU8adXYjMruWd3g=" + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "user-home": { "version": "1.1.1", @@ -1785,7 +2536,7 @@ "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", "requires": { - "user-home": "1.1.1" + "user-home": "^1.1.1" } }, "vinyl": { @@ -1793,8 +2544,8 @@ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.1.1.tgz", "integrity": "sha1-eUCIfu8JOB6zYmrEwPmrU9S35FA=", "requires": { - "clone": "1.0.2", - "clone-stats": "0.0.1", + "clone": "^1.0.0", + "clone-stats": "^0.0.1", "replace-ext": "0.0.1" } }, @@ -1803,14 +2554,14 @@ "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", "requires": { - "defaults": "1.0.3", - "glob-stream": "3.1.18", - "glob-watcher": "0.0.6", - "graceful-fs": "3.0.11", - "mkdirp": "0.5.1", - "strip-bom": "1.0.0", - "through2": "0.6.5", - "vinyl": "0.4.6" + "defaults": "^1.0.0", + "glob-stream": "^3.1.5", + "glob-watcher": "^0.0.6", + "graceful-fs": "^3.0.0", + "mkdirp": "^0.5.0", + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" }, "dependencies": { "clone": { @@ -1823,27 +2574,37 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", "requires": { - "natives": "1.1.0" + "natives": "^1.1.0" } }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "through2": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "requires": { - "readable-stream": "1.0.34", - "xtend": "4.0.1" + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" } }, "vinyl": { @@ -1851,18 +2612,18 @@ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", "requires": { - "clone": "0.2.0", - "clone-stats": "0.0.1" + "clone": "^0.2.0", + "clone-stats": "^0.0.1" } } } }, "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "wordwrap": { diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/package.json b/flow-components-parent/flow-webcomponent-api-analyzer/package.json index d89799cee6d..babb68edf89 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/package.json +++ b/flow-components-parent/flow-webcomponent-api-analyzer/package.json @@ -6,6 +6,7 @@ "license": "Apache License 2.0", "dependencies": { "bower": "^1.8.2", + "cheerio": "^0.22.0", "coa": "~1.0.1", "fs-extra": "latest", "gulp": "latest", diff --git a/flow-components-parent/flow-webcomponent-api-analyzer/pom.xml b/flow-components-parent/flow-webcomponent-api-analyzer/pom.xml index 75531e0d978..3cefe4858b1 100644 --- a/flow-components-parent/flow-webcomponent-api-analyzer/pom.xml +++ b/flow-components-parent/flow-webcomponent-api-analyzer/pom.xml @@ -6,7 +6,7 @@ com.vaadin flow-components-parent - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-webcomponent-api-analyzer Flow WebComponent API Analyzer diff --git a/flow-components-parent/pom.xml b/flow-components-parent/pom.xml index 751173377ed..08e2b310b38 100644 --- a/flow-components-parent/pom.xml +++ b/flow-components-parent/pom.xml @@ -5,7 +5,7 @@ com.vaadin flow-project - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-components-parent Flow components parent project diff --git a/flow-data/bnd.bnd b/flow-data/bnd.bnd new file mode 100644 index 00000000000..7279f64b38b --- /dev/null +++ b/flow-data/bnd.bnd @@ -0,0 +1,9 @@ +Bundle-SymbolicName: ${project.groupId}.flow.data +Bundle-Name: Vaadin Flow Data +Bundle-Version: ${osgi.bundle.version} +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0 +Import-Package: javax.validation*;resolution:=optional;version='${javax.validation.version}',\ + com.vaadin.flow*;version='[${osgi.bundle.version},${osgi.bundle.version}]',\ + * +Export-Package: com.vaadin.flow.component.html*;-noimport:=true diff --git a/flow-data/pom.xml b/flow-data/pom.xml index 04629a17076..27518a707f5 100644 --- a/flow-data/pom.xml +++ b/flow-data/pom.xml @@ -1,17 +1,19 @@ - 4.0.0 com.vaadin flow-project - 1.0-SNAPSHOT + 1.1-SNAPSHOT flow-data Flow Data jar + 2.0.0.Final @@ -23,7 +25,7 @@ javax.validation validation-api - 2.0.0.Final + ${javax.validation.version} com.vaadin @@ -40,8 +42,7 @@ org.apache.commons commons-lang3 test - - + org.hibernate.validator hibernate-validator @@ -54,6 +55,30 @@ ${project.version} test + + javax.xml.bind + jaxb-api + 2.2.11 + test + + + com.sun.xml.bind + jaxb-core + 2.2.11 + test + + + com.sun.xml.bind + jaxb-impl + 2.2.11 + test + + + com.sun.activation + javax.activation + 1.2.0 + test + @@ -61,6 +86,15 @@ org.apache.maven.plugins maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + false + + true + + + diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/AbstractBeanPropertyDefinition.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/AbstractBeanPropertyDefinition.java index b75ebbda9d7..ea313a4f9f0 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/AbstractBeanPropertyDefinition.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/AbstractBeanPropertyDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,6 +24,7 @@ * Abstract base class for PropertyDefinition implementations for beans. * * @author Vaadin Ltd + * @since 1.0 * * @param * the type of the property set diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/BeanPropertySet.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/BeanPropertySet.java index bbe4b525f8e..66df443c850 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/BeanPropertySet.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/BeanPropertySet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -39,6 +39,7 @@ * A {@link PropertySet} that uses reflection to find bean properties. * * @author Vaadin Ltd + * @since 1.0 * * * @param diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/BeanValidationBinder.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/BeanValidationBinder.java index 64780e2d626..1a4bff7bb37 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/BeanValidationBinder.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/BeanValidationBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,6 +31,7 @@ * implementation is present on the classpath. * * @author Vaadin Ltd + * @since 1.0 * @see Binder * @see BeanValidator * @see HasValue diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java index 864ab414813..630e3d64b84 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -38,6 +38,7 @@ import java.util.stream.Stream; import com.googlecode.gentyref.GenericTypeReflector; + import com.vaadin.external.org.slf4j.Logger; import com.vaadin.external.org.slf4j.LoggerFactory; import com.vaadin.flow.component.Component; @@ -85,7 +86,8 @@ *

* Unless otherwise specified, {@code Binder} method arguments cannot be null. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the bean type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/BinderValidationStatus.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/BinderValidationStatus.java index 1059c228d19..3e095c975a5 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/BinderValidationStatus.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/BinderValidationStatus.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -38,6 +38,7 @@ * form level validation status changes. * * @author Vaadin Ltd + * @since 1.0 * * @param * the bean type of the binder @@ -47,7 +48,6 @@ * @see Binder#validate() * @see BindingValidationStatus * - * @since 8.0 */ public class BinderValidationStatus implements Serializable { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/BinderValidationStatusHandler.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/BinderValidationStatusHandler.java index 3a3b1c65dcb..52900ef7f9e 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/BinderValidationStatusHandler.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/BinderValidationStatusHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,6 +31,7 @@ * been set. * * @author Vaadin Ltd + * @since 1.0 * * @see BinderValidationStatus * @see Binder#validate() @@ -39,7 +40,6 @@ * @param * the bean type of binder * - * @since 8.0 */ @FunctionalInterface public interface BinderValidationStatusHandler diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/BindingValidationStatus.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/BindingValidationStatus.java index 60b14876a67..1801925b5c4 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/BindingValidationStatus.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/BindingValidationStatus.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,6 +35,7 @@ * to register a handler for field level validation status changes. * * @author Vaadin Ltd + * @since 1.0 * * @param * the target data type of the binding for which the validation @@ -46,7 +47,6 @@ * @see BindingValidationStatusHandler * @see BinderValidationStatus * - * @since 8.0 */ public class BindingValidationStatus implements Serializable { @@ -88,7 +88,6 @@ public enum Status { * @param source * field whose status has changed, not {@code null} * - * @since 8.2 */ public BindingValidationStatus(Result result, Binding source) { @@ -180,7 +179,6 @@ public Optional getResult() { * * @return list of validation results * - * @since 8.2 */ public List getValidationResults() { return Collections.unmodifiableList(results); diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/BindingValidationStatusHandler.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/BindingValidationStatusHandler.java index 8d5c9a513c2..4af783e5920 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/BindingValidationStatusHandler.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/BindingValidationStatusHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,11 +26,11 @@ * handling. * * @author Vaadin Ltd + * @since 1.0 * * @see BindingBuilder#withValidationStatusHandler(BindingValidationStatusHandler) * @see BindingValidationStatus * - * @since 8.0 * */ @FunctionalInterface diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/ErrorLevel.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/ErrorLevel.java index 87b4ec9c3d0..700feda9e01 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/ErrorLevel.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/ErrorLevel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Represents the error levels displayed on components. * * @author Vaadin Ltd + * @since 1.0 */ public enum ErrorLevel { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/ErrorMessageProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/ErrorMessageProvider.java index 1d68ccd7ae8..1080358adcd 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/ErrorMessageProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/ErrorMessageProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,8 +21,8 @@ * Provider interface for generating localizable error messages using * {@link ValueContext}. * - * @since 8.0 - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. */ @FunctionalInterface public interface ErrorMessageProvider diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasDataProvider.java index 02e83cef487..a3ac8e090f2 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,7 +26,8 @@ * A listing component should implement either this interface or * {@link HasFilterableDataProvider}, but not both. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the item data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasFilterableDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasFilterableDataProvider.java index be26e70756b..e4db5523548 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasFilterableDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasFilterableDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -25,7 +25,8 @@ * A listing component should implement either this interface or * {@link HasDataProvider}, but not both. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the item data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasItems.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasItems.java index 89262c25843..deccc0bf438 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasItems.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasItems.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasItemsAndComponents.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasItemsAndComponents.java index 5adf4bec264..3f3b20db3da 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasItemsAndComponents.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasItemsAndComponents.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,7 +31,8 @@ * any position with {@link #addComponents(Object, Component...)} or * {@link #prependComponents(Object, Component...)}. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the type of the displayed items @@ -42,7 +43,8 @@ public interface HasItemsAndComponents extends HasComponents, HasItems { * Interface for components that are used inside an * {@link HasItemsAndComponents} for representing a single item. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the type of the displayed item diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasValidator.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasValidator.java index 0931edf46ed..916a81dd53e 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/HasValidator.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/HasValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,7 +21,8 @@ * A generic interface for field components and other user interface objects * that have a user-editable value that should be validated. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the value type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyDefinition.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyDefinition.java index 5ef3ae3ec06..3473f4028c8 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyDefinition.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,7 +24,7 @@ * A property from a {@link PropertySet}. * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 * * @param * the type of the property set diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyFilterDefinition.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyFilterDefinition.java index 513e918ad0f..c787ef24a73 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyFilterDefinition.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyFilterDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -23,6 +23,7 @@ * Class containing the constraints for filtering nested properties. * * @author Vaadin Ltd + * @since 1.0 */ public class PropertyFilterDefinition implements Serializable { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyId.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyId.java index fb5a5097684..e76d98b2895 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyId.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertyId.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -52,8 +52,8 @@ * } * * - * @since 8.0 * @author Vaadin Ltd + * @since 1.0 */ @Target({ ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertySet.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertySet.java index 35f4dedcf8b..573b7517924 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertySet.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/PropertySet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,8 +24,8 @@ * property names instead of setter and getter callbacks. * * @author Vaadin Ltd + * @since 1.0 * - * @since 8.0 * * @param * the type for which the properties are defined diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/ReadOnlyHasValue.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/ReadOnlyHasValue.java index 02ec884dd67..8a59ad7a44e 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/ReadOnlyHasValue.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/ReadOnlyHasValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/RequiredFieldConfigurator.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/RequiredFieldConfigurator.java index 427cb395985..e4607c32f99 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/RequiredFieldConfigurator.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/RequiredFieldConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,7 +35,7 @@ * @see BeanValidationBinder#setRequiredConfigurator(RequiredFieldConfigurator) * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 * */ public interface RequiredFieldConfigurator diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/RequiredFieldConfiguratorUtil.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/RequiredFieldConfiguratorUtil.java index 4b3d079c171..719d2f64141 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/RequiredFieldConfiguratorUtil.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/RequiredFieldConfiguratorUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -34,6 +34,7 @@ * {@link RequiredFieldConfigurator} interface. * * @author Vaadin Ltd + * @since 1.0 */ public class RequiredFieldConfiguratorUtil { private RequiredFieldConfiguratorUtil() { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/Result.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/Result.java index 0784d07c5cd..738c35ded3b 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/Result.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/Result.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -37,7 +37,6 @@ * @param * the result value type * - * @since 8.0 */ public interface Result extends Serializable { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/Setter.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/Setter.java index 7cb63a4d223..689bc85452f 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/Setter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/Setter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,8 +30,8 @@ * @param * the field value type to be written to the bean * - * @since 8.0 * @author Vaadin Ltd + * @since 1.0 * */ @FunctionalInterface diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/SimpleResult.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/SimpleResult.java index 136910fe71c..0d6a660ad40 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/SimpleResult.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/SimpleResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,7 +27,6 @@ * @param * the result value type * - * @since 8.0 */ class SimpleResult implements Result { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/StatusChangeEvent.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/StatusChangeEvent.java index 2447ea1291d..73ab0523f89 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/StatusChangeEvent.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/StatusChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -40,8 +40,8 @@ * @see Binder#addStatusChangeListener(StatusChangeListener) * * @author Vaadin Ltd + * @since 1.0 * - * @since 8.0 */ public class StatusChangeEvent extends EventObject { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/StatusChangeListener.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/StatusChangeListener.java index e0dd8ea88aa..d8cc04187cf 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/StatusChangeListener.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/StatusChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,8 +21,8 @@ * Listener interface for status change events from binder. * * @author Vaadin Ltd + * @since 1.0 * - * @since 8.0 * * @see StatusChangeEvent * @see Binder#addStatusChangeListener(StatusChangeListener) diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationException.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationException.java index 3aba52788e7..08f4234db5f 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationException.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,7 +28,7 @@ * @see Binder#writeBeanIfValid(Object) * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 * */ public class ValidationException extends Exception { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationResult.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationResult.java index b3183bbb07f..1b921ab13fd 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationResult.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,7 +28,7 @@ * respectively. * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 * */ public interface ValidationResult extends Serializable { @@ -37,6 +37,7 @@ public interface ValidationResult extends Serializable { * Simple validation result implementation. * * @author Vaadin Ltd + * @since 1.0 * */ class SimpleValidationResult implements ValidationResult { @@ -92,7 +93,6 @@ public Optional getErrorLevel() { * @return optional error level; error level is present for validation * results that have not passed validation * - * @since 8.2 */ Optional getErrorLevel(); diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationResultWrap.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationResultWrap.java index bfc62927f1b..120a4506d20 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationResultWrap.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/ValidationResultWrap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/Validator.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/Validator.java index 5552d72de38..4c6a815c5ad 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/Validator.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/Validator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -41,9 +41,9 @@ * }; * * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * - * @since 8.0 * * @param * the type of the value to validate diff --git a/flow-data/src/main/java/com/vaadin/flow/data/binder/ValueContext.java b/flow-data/src/main/java/com/vaadin/flow/data/binder/ValueContext.java index 724eb86e356..750197ee4f3 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/binder/ValueContext.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/binder/ValueContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,8 +28,8 @@ * Value context for {@code Converter}s. Contains relevant information for * converting values. * - * @author Vaadin Ltd. - * @since 8.0 + * @author Vaadin Ltd + * @since 1.0. */ public class ValueContext implements Serializable { @@ -85,7 +85,6 @@ public ValueContext(Component component) { * The component related to current value. Can be null. * @param hasValue * The value source related to current value. Can be null. - * @since 8.1 */ public ValueContext(Component component, HasValue hasValue) { Objects.requireNonNull(component, @@ -105,7 +104,6 @@ public ValueContext(Component component, HasValue hasValue) { * @param hasValue * The value source related to current value. Can be * {@code null}. - * @since 8.1 */ public ValueContext(Component component, HasValue hasValue, Locale locale) { @@ -151,7 +149,6 @@ public Optional getLocale() { * HasValue might be not available. * * @return the optional of {@code HasValue} - * @since 8.1 */ @SuppressWarnings("unused") public Optional> getHasValue() { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/AbstractStringToNumberConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/AbstractStringToNumberConverter.java index 46ac9c4fac9..39ef2e587ec 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/AbstractStringToNumberConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/AbstractStringToNumberConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -37,7 +37,7 @@ * the converter number type * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public abstract class AbstractStringToNumberConverter implements Converter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/Converter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/Converter.java index 3a178772110..db5f4c4abf8 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/Converter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/Converter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -34,8 +34,8 @@ * The presentation type. * @param * The model type. - * @author Vaadin Ltd. - * @since 8.0 + * @author Vaadin Ltd + * @since 1.0. */ public interface Converter extends Serializable { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/DateToLongConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/DateToLongConverter.java index 811567f6e3c..a2ca0d65c7d 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/DateToLongConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/DateToLongConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -25,7 +25,7 @@ * A converter that converts from {@link Long} to {@link Date} and back. * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class DateToLongConverter implements Converter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/DateToSqlDateConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/DateToSqlDateConverter.java index 212d1569852..018c277756d 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/DateToSqlDateConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/DateToSqlDateConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -27,8 +27,8 @@ * information) is lost when converting from {@link java.util.Date} to * {@link java.sql.Date}. * - * @since 8.0 * @author Vaadin Ltd + * @since 1.0 */ public class DateToSqlDateConverter implements Converter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/LocalDateTimeToDateConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/LocalDateTimeToDateConverter.java index 027ecd22a51..8315c14dbc3 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/LocalDateTimeToDateConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/LocalDateTimeToDateConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,7 +29,7 @@ * Date. * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class LocalDateTimeToDateConverter implements Converter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/LocalDateToDateConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/LocalDateToDateConverter.java index 80979f3f256..781789ab240 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/LocalDateToDateConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/LocalDateToDateConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,7 +29,7 @@ * Date. * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class LocalDateToDateConverter implements Converter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBigDecimalConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBigDecimalConverter.java index e7c96c81a1a..f1b3a058341 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBigDecimalConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBigDecimalConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -36,7 +36,7 @@ *

* * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class StringToBigDecimalConverter extends AbstractStringToNumberConverter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBigIntegerConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBigIntegerConverter.java index 83eb7a83c2b..c92738fb53f 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBigIntegerConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBigIntegerConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -37,7 +37,7 @@ *

* * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class StringToBigIntegerConverter extends AbstractStringToNumberConverter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBooleanConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBooleanConverter.java index b0847b5ac8e..e8f61e6d06a 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBooleanConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToBooleanConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -36,7 +36,7 @@ *

* * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class StringToBooleanConverter implements Converter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToDateConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToDateConverter.java index e2207186a82..8cf0569fb89 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToDateConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToDateConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,7 +35,7 @@ *

* * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class StringToDateConverter implements Converter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToDoubleConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToDoubleConverter.java index 0190def6600..ad0770062b2 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToDoubleConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToDoubleConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,7 +35,7 @@ *

* * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class StringToDoubleConverter extends AbstractStringToNumberConverter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToFloatConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToFloatConverter.java index 189c29170c8..17754300907 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToFloatConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToFloatConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,7 +33,7 @@ * Override and overwrite {@link #getFormat(Locale)} to use a different format. * * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class StringToFloatConverter extends AbstractStringToNumberConverter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToIntegerConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToIntegerConverter.java index 9634a0949d0..a1c81c7d9df 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToIntegerConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToIntegerConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -32,7 +32,7 @@ *

* * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class StringToIntegerConverter extends AbstractStringToNumberConverter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToLongConverter.java b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToLongConverter.java index ede2f0edb91..75556a131e9 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToLongConverter.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/converter/StringToLongConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -32,7 +32,7 @@ *

* * @author Vaadin Ltd - * @since 8.0 + * @since 1.0 */ public class StringToLongConverter extends AbstractStringToNumberConverter { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/event/SortEvent.java b/flow-data/src/main/java/com/vaadin/flow/data/event/SortEvent.java index edffceba6bb..325446f5fde 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/event/SortEvent.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/event/SortEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -36,6 +36,7 @@ * the type of the sorting information * * @author Vaadin Ltd + * @since 1.0 */ public class SortEvent> extends ComponentEvent { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractBackEndDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractBackEndDataProvider.java index 8d726b545c1..b4deec0dcb1 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractBackEndDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractBackEndDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractComponentDataGenerator.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractComponentDataGenerator.java index 8178d025354..20c067024b0 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractComponentDataGenerator.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractComponentDataGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,7 +26,8 @@ * lifecycle of components, according to what items are requested or destroyed. * * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractDataProvider.java index 40ea04480b6..92e2f62d3ba 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,6 +35,7 @@ * filter type * * @author Vaadin Ltd + * @since 1.0 * */ public abstract class AbstractDataProvider implements DataProvider { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/ArrayUpdater.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/ArrayUpdater.java index f732fb0bebd..59399266a1c 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/ArrayUpdater.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/ArrayUpdater.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,6 +24,7 @@ * Array update strategy aware class. * * @author Vaadin Ltd + * @since 1.0 * */ public interface ArrayUpdater extends Serializable { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/BackEndDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/BackEndDataProvider.java index d0bd2c67e01..d3b1295549e 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/BackEndDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/BackEndDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/BeanDataGenerator.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/BeanDataGenerator.java new file mode 100644 index 00000000000..9b9d98079b9 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/BeanDataGenerator.java @@ -0,0 +1,58 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider; + +import com.vaadin.flow.internal.JsonSerializer; + +import elemental.json.JsonObject; +import elemental.json.JsonValue; + +/** + * A {@link DataGenerator} that sends all the fields of the objects in the model + * to the client, using the field names as property names. + *

+ * This class is useful for the cases when the properties in the template of the + * columns have the same name as the fields of the model object in the server + * side. + *

+ * Note: this generator sends the entire bean to the client, even if the + * template in the client doesn't use all the properties. + *

+ * For objects without inner properties, like Strings, a property called + * {@code value} is created in the model, so it can be accessed via + * {@code [[item.value]]} in the template. + * + * @author Vaadin Ltd. + * + * @param + * the type of the bean to be serialized to the client + */ +public class BeanDataGenerator implements DataGenerator { + + @Override + public void generateData(T item, JsonObject data) { + JsonValue value = JsonSerializer.toJson(item); + if (value instanceof JsonObject) { + JsonObject object = (JsonObject) value; + for (String key : object.keys()) { + data.put(key, (JsonValue) object.get(key)); + } + } else { + data.put("value", value); + } + } + +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/CallbackDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/CallbackDataProvider.java index 6ec490c063b..3c5d464e4ea 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/CallbackDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/CallbackDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -26,6 +26,7 @@ * another callback for counting the number of available items. * * @author Vaadin Ltd + * @since 1.0 * * @param * data provider data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/ComponentDataGenerator.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/ComponentDataGenerator.java index a046a9faec7..31529d6fd49 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/ComponentDataGenerator.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/ComponentDataGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,7 +31,8 @@ * This class is used internally by listing components that support * ComponentRenderers. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the date type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/CompositeDataGenerator.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/CompositeDataGenerator.java index 03cb4a51d66..386e1ca6cd4 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/CompositeDataGenerator.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/CompositeDataGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,7 +30,8 @@ * It is used by components that need to add and remove DataGenerators * dynamically, or that support multiple layers of data generation. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the data type of the underlying DataGenerators diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/ConfigurableFilterDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/ConfigurableFilterDataProvider.java index 16bfee7a52b..dd86a2bb895 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/ConfigurableFilterDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/ConfigurableFilterDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -20,6 +20,7 @@ * applied to all queries. * * @author Vaadin Ltd + * @since 1.0 * * @param * the data provider item type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/ConfigurableFilterDataProviderWrapper.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/ConfigurableFilterDataProviderWrapper.java index 027382c7e24..34f8e9ac4b3 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/ConfigurableFilterDataProviderWrapper.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/ConfigurableFilterDataProviderWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,6 +21,7 @@ * the wrapped provider through the query. * * @author Vaadin Ltd + * @since 1.0 * * @param * the data provider item type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataChangeEvent.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataChangeEvent.java index b898deb36fc..c8efdad3b89 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataChangeEvent.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -24,6 +24,7 @@ * @see DataProviderListener * * @author Vaadin Ltd + * @since 1.0 * * @param * the data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataCommunicator.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataCommunicator.java index 5edadac895a..9bce4779a3d 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataCommunicator.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataCommunicator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -62,7 +62,7 @@ public class DataCommunicator implements Serializable { private final SerializableConsumer dataUpdater; private final StateNode stateNode; - private final KeyMapper keyMapper = new KeyMapper<>(); + private DataKeyMapper keyMapper = new KeyMapper<>(); // The range of items that the client wants to have private Range requestedRange = Range.between(0, 0); @@ -272,6 +272,18 @@ public DataKeyMapper getKeyMapper() { return keyMapper; } + /** + * Sets the {@link DataKeyMapper} used in this {@link DataCommunicator}. Key + * mapper can be used to map keys sent to the client-side back to their + * respective data objects. + * + * @param keyMapper + * the keyMapper + */ + protected void setKeyMapper(DataKeyMapper keyMapper) { + this.keyMapper = keyMapper; + } + /** * Sets the {@link Comparator} to use with in-memory sorting. * diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataGenerator.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataGenerator.java index 332d10361dd..adbbb57e9a1 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataGenerator.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -23,7 +23,8 @@ * A data generator for {@link DataCommunicator}. Used to inject custom data to * data items sent to the client for extension purposes. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataKeyMapper.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataKeyMapper.java index b77d59b6de0..bd28710a682 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataKeyMapper.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataKeyMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProvider.java index 848c5d1d25a..d240a6232a8 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -42,7 +42,8 @@ * methods in this interface. For custom backends such as SQL, EntityManager, * REST APIs or SpringData, use a {@link BackEndDataProvider} or its subclass. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProviderListener.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProviderListener.java index c130582c660..ffa7459dc19 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProviderListener.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProviderListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ * {@link DataProvider}. * * @author Vaadin Ltd + * @since 1.0 * * @param * the data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProviderWrapper.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProviderWrapper.java index c38dbb888fb..0f991d466da 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProviderWrapper.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/DataProviderWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -25,7 +25,8 @@ * query. Used to create a suitable {@link Query} for the underlying data * provider with correct filters and sorting. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * data provider data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/HasDataGenerators.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/HasDataGenerators.java index d224d4c77c5..5df5b1e524f 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/HasDataGenerators.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/HasDataGenerators.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -23,7 +23,8 @@ * Interface that defines the contract of adding and removing multiple * {@link DataGenerator}s to a given object. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the data type of the {@link DataGenerator}s. diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/InMemoryDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/InMemoryDataProvider.java index 2596fbd1492..e41c31d0aff 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/InMemoryDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/InMemoryDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,6 +29,7 @@ * configuring sorting and filtering. * * @author Vaadin Ltd + * @since 1.0 * * @param * data type diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/InMemoryDataProviderHelpers.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/InMemoryDataProviderHelpers.java index 71d75e3e90d..72369a6755f 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/InMemoryDataProviderHelpers.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/InMemoryDataProviderHelpers.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -33,6 +33,7 @@ * This class is intended primarily for internal use. * * @author Vaadin Ltd + * @since 1.0 */ public class InMemoryDataProviderHelpers { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/KeyMapper.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/KeyMapper.java index 841515967d3..7ae3bb7dc96 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/KeyMapper.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/KeyMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,7 +28,8 @@ * @param * the type of mapped objects * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. */ public class KeyMapper implements DataKeyMapper { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/ListDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/ListDataProvider.java index 2a7de522c93..0a0f7faf57b 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/ListDataProvider.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/ListDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/Query.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/Query.java index 911310eaf5f..2e96777cfff 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/Query.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/Query.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/QuerySortOrder.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/QuerySortOrder.java index d351a2b76a9..f9ad5d43c3f 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/QuerySortOrder.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/QuerySortOrder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/QuerySortOrderBuilder.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/QuerySortOrderBuilder.java index eb43234873e..5dc8240d973 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/QuerySortOrderBuilder.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/QuerySortOrderBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/QueryTrace.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/QueryTrace.java index a5c7ba2c6ee..9c587dfb458 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/QueryTrace.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/QueryTrace.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -23,6 +23,7 @@ * calls. * * @author Vaadin Ltd + * @since 1.0 * */ class QueryTrace extends Query { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/SortDirection.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/SortDirection.java index c2b9f9634f7..244c58aee74 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/SortDirection.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/SortDirection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -19,6 +19,7 @@ * Describes sorting direction. * * @author Vaadin Ltd + * @since 1.0 */ public enum SortDirection { diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/SortOrder.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/SortOrder.java index b9a1b5cd062..f3e18e424c9 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/SortOrder.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/SortOrder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/SortOrderBuilder.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/SortOrderBuilder.java index 4d4fb3562f1..1a097c85197 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/provider/SortOrderBuilder.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/SortOrderBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/AbstractBackEndHierarchicalDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/AbstractBackEndHierarchicalDataProvider.java new file mode 100644 index 00000000000..e2771624ee8 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/AbstractBackEndHierarchicalDataProvider.java @@ -0,0 +1,95 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import com.vaadin.flow.data.provider.QuerySortOrder; +import com.vaadin.flow.data.provider.SortOrder; + +/** + * Abstract base class for implementing + * {@link BackEndHierarchicalDataProvider}s. + * + * @author Vaadin Ltd + * + * @param + * data type + * @param + * filter type + */ +public abstract class AbstractBackEndHierarchicalDataProvider + extends AbstractHierarchicalDataProvider + implements BackEndHierarchicalDataProvider { + + private List sortOrders = new ArrayList<>(); + + private HierarchicalQuery mixInSortOrders( + HierarchicalQuery query) { + if (sortOrders.isEmpty()) { + return query; + } + + Set sortedPropertyNames = query.getSortOrders().stream() + .map(SortOrder::getSorted).collect(Collectors.toSet()); + + List combinedSortOrders = Stream + .concat(query.getSortOrders().stream(), + sortOrders.stream() + .filter(order -> !sortedPropertyNames + .contains(order.getSorted()))) + .collect(Collectors.toList()); + + return new HierarchicalQuery<>(query.getOffset(), query.getLimit(), + combinedSortOrders, query.getInMemorySorting(), + query.getFilter().orElse(null), query.getParent()); + } + + @Override + public Stream fetchChildren(HierarchicalQuery query) { + return fetchChildrenFromBackEnd(mixInSortOrders(query)); + } + + @Override + public boolean isInMemory() { + return false; + } + + @Override + public void setSortOrders(List sortOrders) { + this.sortOrders = Objects.requireNonNull(sortOrders, + "Sort orders cannot be null"); + refreshAll(); + } + + /** + * Fetches data from the back end using the given query. + * + * @see HierarchicalQuery + * + * @param query + * the query that defines sorting, filtering, paging and the + * parent item to fetch children from + * @return a stream of items matching the query + */ + protected abstract Stream fetchChildrenFromBackEnd( + HierarchicalQuery query); +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/AbstractHierarchicalDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/AbstractHierarchicalDataProvider.java new file mode 100644 index 00000000000..1e70faf2c13 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/AbstractHierarchicalDataProvider.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import com.vaadin.flow.data.provider.AbstractDataProvider; + +/** + * Abstract hierarchical data provider implementation which takes care of item + * refreshes and associated events. + * + * @author Vaadin Ltd + * + * @param + * data type + * @param + * filter type + */ +public abstract class AbstractHierarchicalDataProvider extends + AbstractDataProvider implements HierarchicalDataProvider { + +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/BackEndHierarchicalDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/BackEndHierarchicalDataProvider.java new file mode 100644 index 00000000000..14e9410edc6 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/BackEndHierarchicalDataProvider.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import com.vaadin.flow.data.provider.BackEndDataProvider; + +/** + * A data provider that lazy loads items from a back end containing hierarchical + * data. + * + * @author Vaadin Ltd + * + * @param + * data provider data type + * @param + * data provider filter type + */ +public interface BackEndHierarchicalDataProvider + extends HierarchicalDataProvider, BackEndDataProvider { + +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HasHierarchicalDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HasHierarchicalDataProvider.java new file mode 100644 index 00000000000..1340225e68d --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HasHierarchicalDataProvider.java @@ -0,0 +1,263 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import com.vaadin.flow.data.binder.HasDataProvider; +import com.vaadin.flow.data.provider.DataProvider; +import com.vaadin.flow.function.SerializablePredicate; +import com.vaadin.flow.function.ValueProvider; + +/** + * A generic interface for hierarchical listing components that use a data + * provider for showing data. + * + * @author Vaadin Ltd + * + * @param + * the item data type + */ +public interface HasHierarchicalDataProvider extends HasDataProvider { + + public HierarchicalDataProvider> getDataProvider(); + + /** + * Sets a new {@link TreeDataProvider} wrapping the given {@link TreeData}. + * + * @param treeData + * the tree data to set + */ + public default void setTreeData(TreeData treeData) { + setDataProvider(new TreeDataProvider<>(treeData)); + } + + /** + * Gets the backing {@link TreeData} instance of the data provider, if the + * data provider is a {@link TreeDataProvider}. + * + * @return the TreeData instance used by the data provider + * @throws IllegalStateException + * if the type of the data provider is not + * {@link TreeDataProvider} + */ + public default TreeData getTreeData() { + if (getDataProvider() instanceof TreeDataProvider) { + return ((TreeDataProvider) getDataProvider()).getTreeData(); + } else { + throw new IllegalStateException( + "Data provider is not an instance of TreeDataProvider"); + } + } + + /** + * Sets the root data items of this component provided as a collection and + * recursively populates them with child items with the given value + * provider. + *

+ * The provided items are wrapped into a {@link TreeDataProvider} backed by + * a flat {@link TreeData} structure. The data provider instance is used as + * a parameter for the {@link #setDataProvider(DataProvider)} method. It + * means that the items collection can be accessed later on via + * {@link #getTreeData()}: + * + *

+     * 
+     * Collection<Person> grandParents = getGrandParents();
+     * HasHierarchicalDataProvider<Person> treeGrid = new TreeGrid<>();
+     * treeGrid.setItems(grandParents, Person::getChildren);
+     * ...
+     *
+     * TreeData<Person> data = treeGrid.getTreeData();
+     * 
+     * 
+ *

+ * The returned {@link TreeData} instance may be used as-is to add, remove + * or modify items in the hierarchy. These modifications to the object are + * not automatically reflected back to the TreeGrid. Items modified should + * be refreshed with {@link HierarchicalDataProvider#refreshItem(Object)} + * and when adding or removing items + * {@link HierarchicalDataProvider#refreshAll()} should be called. + * + * @param rootItems + * the root items to display, not {@code null} + * @param childItemProvider + * the value provider used to recursively populate the given root + * items with child items, not {@code null} + */ + public default void setItems(Collection rootItems, + ValueProvider> childItemProvider) { + Objects.requireNonNull(rootItems, "Given root items may not be null"); + Objects.requireNonNull(childItemProvider, + "Given child item provider may not be null"); + setDataProvider(new TreeDataProvider<>( + new TreeData().addItems(rootItems, childItemProvider))); + } + + /** + * Sets the root data items of this component provided as a stream and + * recursively populates them with child items with the given value + * provider. + *

+ * The provided items are wrapped into a {@link TreeDataProvider} backed by + * a flat {@link TreeData} structure. The data provider instance is used as + * a parameter for the {@link #setDataProvider(DataProvider)} method. It + * means that the items collection can be accessed later on via + * {@link #getTreeData()}: + * + *

+     * 
+     * Stream<Person> grandParents = getGrandParents();
+     * HasHierarchicalDataProvider<Person> treeGrid = new TreeGrid<>();
+     * treeGrid.setItems(grandParents, Person::getChildren);
+     * ...
+     *
+     * TreeData<Person> data = treeGrid.getTreeData();
+     * 
+     * 
+ *

+ * The returned {@link TreeData} instance may be used as-is to add, remove + * or modify items in the hierarchy. These modifications to the object are + * not automatically reflected back to the TreeGrid. Items modified should + * be refreshed with {@link HierarchicalDataProvider#refreshItem(Object)} + * and when adding or removing items + * {@link HierarchicalDataProvider#refreshAll()} should be called. + * + * @param rootItems + * the root items to display, not {@code null} + * @param childItemProvider + * the value provider used to recursively populate the given root + * items with child items, not {@code null} + */ + public default void setItems(Stream rootItems, + ValueProvider> childItemProvider) { + Objects.requireNonNull(rootItems, "Given root items may not be null"); + Objects.requireNonNull(childItemProvider, + "Given child item provider may not be null"); + setDataProvider(new TreeDataProvider<>( + new TreeData().addItems(rootItems, childItemProvider))); + } + + /** + * Sets the data items of this component provided as a collection. + *

+ * The provided items are wrapped into a {@link TreeDataProvider} backed by + * a flat {@link TreeData} structure. The data provider instance is used as + * a parameter for the {@link #setDataProvider(DataProvider)} method. It + * means that the items collection can be accessed later on via + * {@link #getTreeData()}: + * + *

+     * 
+     * HasHierarchicalDataProvider<String> treeGrid = new TreeGrid<>();
+     * treeGrid.setItems(Arrays.asList("a","b"));
+     * ...
+     *
+     * TreeData<String> data = treeGrid.getTreeData();
+     * 
+     * 
+ *

+ * The returned {@link TreeData} instance may be used as-is to add, remove + * or modify items in the hierarchy. These modifications to the object are + * not automatically reflected back to the TreeGrid. Items modified should + * be refreshed with {@link HierarchicalDataProvider#refreshItem(Object)} + * and when adding or removing items + * {@link HierarchicalDataProvider#refreshAll()} should be called. + * + * @param items + * the data items to display, not {@code null} + */ + @Override + public default void setItems(Collection items) { + Objects.requireNonNull(items, "Given collection may not be null"); + setDataProvider(new TreeDataProvider<>( + new TreeData().addItems(null, items))); + } + + /** + * Sets the data items of this component provided as a stream. + *

+ * The provided items are wrapped into a {@link TreeDataProvider} backed by + * a flat {@link TreeData} structure. The data provider instance is used as + * a parameter for the {@link #setDataProvider(DataProvider)} method. It + * means that the items collection can be accessed later on via + * {@link #getTreeData()}: + * + *

+     * 
+     * HasHierarchicalDataProvider<String> treeGrid = new TreeGrid<>();
+     * treeGrid.setItems(Stream.of("a","b"));
+     * ...
+     *
+     * TreeData<String> data = treeGrid.getTreeData();
+     * 
+     * 
+ *

+ * The returned {@link TreeData} instance may be used as-is to add, remove + * or modify items in the hierarchy. These modifications to the object are + * not automatically reflected back to the TreeGrid. Items modified should + * be refreshed with {@link HierarchicalDataProvider#refreshItem(Object)} + * and when adding or removing items + * {@link HierarchicalDataProvider#refreshAll()} should be called. + * + * @param items + * the data items to display, not {@code null} + */ + @Override + public default void setItems(Stream items) { + Objects.requireNonNull(items, "Given stream may not be null"); + setItems(items.collect(Collectors.toList())); + } + + /** + * Sets the data items of this listing. + *

+ * The provided items are wrapped into a {@link TreeDataProvider} backed by + * a flat {@link TreeData} structure. The data provider instance is used as + * a parameter for the {@link #setDataProvider(DataProvider)} method. It + * means that the items collection can be accessed later on via + * {@link #getTreeData()}: + * + *

+     * 
+     * TreeGrid<String> treeGrid = new TreeGrid<>();
+     * treeGrid.setItems("a","b");
+     * ...
+     *
+     * TreeData<String> data = treeGrid.getTreeData();
+     * 
+     * 
+ *

+ * The returned {@link TreeData} instance may be used as-is to add, remove + * or modify items in the hierarchy. These modifications to the object are + * not automatically reflected back to the TreeGrid. Items modified should + * be refreshed with {@link HierarchicalDataProvider#refreshItem(Object)} + * and when adding or removing items + * {@link HierarchicalDataProvider#refreshAll()} should be called. + * + * @param items + * the data items to display, not {@code null} + */ + @Override + public default void setItems(@SuppressWarnings("unchecked") T... items) { + Objects.requireNonNull(items, "Given items may not be null"); + setItems(Arrays.asList(items)); + } +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalArrayUpdater.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalArrayUpdater.java new file mode 100644 index 00000000000..06db11722d7 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalArrayUpdater.java @@ -0,0 +1,105 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.vaadin.flow.data.provider.hierarchy; + +import java.io.Serializable; +import java.util.List; + +import com.vaadin.flow.data.provider.ArrayUpdater; +import com.vaadin.flow.internal.JsonCodec; + +import elemental.json.JsonValue; + +/** + * Hierarchical array update strategy aware class. + * + * @author Vaadin Ltd + * @since 1.1 + * + */ +public interface HierarchicalArrayUpdater extends ArrayUpdater { + + /** + * Array updater strategy that is aware of hierarchical changes. + */ + public interface HierarchicalUpdate extends Update { + + /** + * Clears {@code length} elements in array from the {@code start} + * position. + * + * @param start + * the start index + * @param length + * the number of elements to clear + * @param parentKey + * Parent item key that cleared range affects + */ + void clear(int start, int length, String parentKey); + + /** + * Sets the {@code items} at the {@code start} position. + * + * @param start + * the start index + * @param items + * the items to set + * @param parentKey + * Parent item key where given items belongs to + */ + void set(int start, List items, String parentKey); + + /** + * Commits enqueued function calls added via + * {@link #enqueue(String, Serializable...)}. + */ + void commit(); + + /** + * Enqueue function call with the given arguments. + * + * @see JsonCodec JsonCodec for supported argument types + * @param name + * the name of the function to call, may contain dots to + * indicate a function on a property. + * @param arguments + * the arguments to pass to the function. Must be of a type + * supported by the communication mechanism, as defined by + * {@link JsonCodec} + */ + void enqueue(String name, Serializable... arguments); + + /** + * Commits changes for the given {@code updateId} and parent key. + * + * @param updateId + * the update identifier of the commit for the target + * parentKey + * @param parentKey + * target parent key + * @param levelSize + * Total number of direct child items for the given parent + * key + */ + void commit(int updateId, String parentKey, int levelSize); + + } + + @Override + HierarchicalUpdate startUpdate(int sizeChange); + +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalCommunicationController.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalCommunicationController.java new file mode 100644 index 00000000000..6856e2e4832 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalCommunicationController.java @@ -0,0 +1,348 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import com.vaadin.flow.data.provider.ArrayUpdater.Update; +import com.vaadin.flow.data.provider.DataGenerator; +import com.vaadin.flow.data.provider.DataKeyMapper; +import com.vaadin.flow.data.provider.hierarchy.HierarchicalArrayUpdater.HierarchicalUpdate; +import com.vaadin.flow.function.SerializableBiFunction; +import com.vaadin.flow.function.SerializableFunction; +import com.vaadin.flow.internal.Range; + +import elemental.json.Json; +import elemental.json.JsonObject; +import elemental.json.JsonValue; + +/** + * HierarchicalCommunicationController controls all the communication to client. + * + * @param + * the target bean type + */ +public class HierarchicalCommunicationController implements Serializable { + + private final DataKeyMapper keyMapper; + private final DataGenerator dataGenerator; + private final SerializableFunction startUpdate; + private final HierarchyMapper mapper; + private final SerializableBiFunction> fetchItems; + + // position in tree this object controls child items for. null means root. + private final String parentKey; + + // Last total size value sent to the client + private int assumedSize; + + // The range of items that the client wants to have + private Range requestedRange = Range.between(0, 0); + + // Items that have been synced to the client and not yet passivated + private int activeStart = 0; + + // ArrayList or emptyList(), both are serializable + private List activeKeyOrder = Collections.emptyList(); + + private boolean resendEntireRange = true; + private boolean assumeEmptyClient = true; + + private int nextUpdateId = 0; + + // Keys that can be discarded once some specific update id gets confirmed + private final HashMap> passivatedByUpdate = new HashMap<>(); + + // Update ids that have been confirmed since the last flush + private final HashSet confirmedUpdates = new HashSet<>(); + + /** + * Constructs communication controller with support for hierarchical data + * structure. + * + * @param parentKey + * parent key or null if root + * @param keyMapper + * Object to String key mapper + * @param mapper + * Mapper for hierarchical data + * @param dataGenerator + * A data generator for items + * @param startUpdate + * Function for creating a new {@link Update} for client + * @param fetchItems + * Function for fetching items for target parent and specified + * range + */ + public HierarchicalCommunicationController(String parentKey, + DataKeyMapper keyMapper, HierarchyMapper mapper, + DataGenerator dataGenerator, + SerializableFunction startUpdate, + SerializableBiFunction> fetchItems) { + this.parentKey = parentKey; + this.keyMapper = keyMapper; + this.mapper = mapper; + this.dataGenerator = dataGenerator; + this.startUpdate = startUpdate; + this.fetchItems = fetchItems; + } + + public void flush() { + Set oldActive = new HashSet<>(activeKeyOrder); + + assumedSize = mapper.countChildItems(keyMapper.get(parentKey)); + + final Range previousActive = Range.withLength(activeStart, + activeKeyOrder.size()); + final Range effectiveRequested = requestedRange + .restrictTo(Range.withLength(0, assumedSize)); + + resendEntireRange |= !(previousActive.intersects(effectiveRequested) + || (previousActive.isEmpty() && effectiveRequested.isEmpty())); + + // Phase 1: Find all items that the client should have + List newActiveKeyOrder = collectKeysToFlush(previousActive, + effectiveRequested); + + activeKeyOrder = newActiveKeyOrder; + activeStart = effectiveRequested.getStart(); + + // Phase 2: Collect changes to send + HierarchicalUpdate update = startUpdate.apply(assumedSize); + boolean updated = collectChangesToSend(previousActive, + effectiveRequested, update); + + resendEntireRange = false; + assumeEmptyClient = false; + + // Phase 3: passivate anything that isn't longer active + passivateInactiveKeys(oldActive, newActiveKeyOrder, update, updated); + + // Phase 4: unregister passivated and updated items + unregisterPassivatedKeys(); + } + + public void confirmUpdate(int updateId) { + confirmedUpdates.add(Integer.valueOf(updateId)); + } + + public void setRequestRange(int start, int length) { + requestedRange = Range.withLength(start, length); + } + + public void setResendEntireRange(boolean resend) { + resendEntireRange = resend; + } + + private boolean collectChangesToSend(final Range previousActive, + final Range effectiveRequested, HierarchicalUpdate update) { + boolean updated = false; + if (assumeEmptyClient || resendEntireRange) { + if (!assumeEmptyClient) { + /* + * TODO: Not necessary to clear something that would be set back + * a few lines later in the code. + * + * It's not that straightforward because one has to care about + * indexes aligned with pageSize (because of the code on the + * client side). + */ + clear(previousActive.getStart(), previousActive.length(), + update); + } + + set(effectiveRequested, update); + updated = true; + } else if (!previousActive.equals(effectiveRequested)) { + /* + * There are some parts common between what we have and what we + * should have, but the beginning and/or the end has too many or too + * few items. + */ + + // Clear previously active items missing from requested + withMissing(previousActive, effectiveRequested, + range -> clear(range.getStart(), range.length(), update)); + + // Set requested items missing from previously active + withMissing(effectiveRequested, previousActive, + range -> set(range, update)); + updated = true; + } + return updated; + } + + private void set(Range effectiveRequested, HierarchicalUpdate update) { + if (effectiveRequested.isEmpty() || activeKeyOrder.isEmpty() + || effectiveRequested.getStart() >= assumedSize) { + return; + } + if (parentKey == null) { + update.set(effectiveRequested.getStart(), + getJsonItems(effectiveRequested)); + } else { + update.set(effectiveRequested.getStart(), + getJsonItems(effectiveRequested), parentKey); + } + } + + private void clear(int start, int length, HierarchicalUpdate update) { + if (length == 0 || start >= assumedSize) { + return; + } + if (parentKey == null) { + update.clear(start, length); + } else { + update.clear(start, length, parentKey); + } + } + + private List collectKeysToFlush(final Range previousActive, + final Range effectiveRequested) { + List newActiveKeyOrder; + /* + * Collecting all items even though only some small sub range would + * actually be useful can be optimized away once we have some actual + * test coverage for the logic here. + */ + if (resendEntireRange) { + newActiveKeyOrder = activate(effectiveRequested); + } else { + Range[] partitionWith = effectiveRequested + .partitionWith(previousActive); + + newActiveKeyOrder = new ArrayList<>(); + newActiveKeyOrder.addAll(activate(partitionWith[0])); + + // Pick existing items from the current list + Range overlap = partitionWith[1].offsetBy(-activeStart); + newActiveKeyOrder.addAll(activeKeyOrder.subList(overlap.getStart(), + overlap.getEnd())); + + newActiveKeyOrder.addAll(activate(partitionWith[2])); + } + return newActiveKeyOrder; + } + + private List activate(Range range) { + if (range.isEmpty()) { + return Collections.emptyList(); + } + + // XXX Explicitly refresh anything that is updated + List activeKeys = new ArrayList<>(range.length()); + + fetchItems.apply(parentKey, range).forEach(bean -> { + boolean mapperHasKey = keyMapper.has(bean); + String key = keyMapper.key(bean); + if (mapperHasKey) { + passivatedByUpdate.values().stream() + .forEach(set -> set.remove(key)); + } + activeKeys.add(key); + }); + return activeKeys; + } + + private void passivateInactiveKeys(Set oldActive, + List newActiveKeyOrder, HierarchicalUpdate update, + boolean updated) { + /* + * We cannot immediately unregister keys that we have asked the client + * to remove, since the client might send a message using that key + * before our message about removal arrives at the client and is + * applied. + */ + if (updated) { + int updateId = nextUpdateId++; + + if (parentKey == null) { + update.commit(updateId); + } else { + update.commit(updateId, parentKey, assumedSize); + } + + // Finally clear any passivated items that have now been confirmed + oldActive.removeAll(newActiveKeyOrder); + if (!oldActive.isEmpty()) { + passivatedByUpdate.put(Integer.valueOf(updateId), oldActive); + } + } + } + + public void unregisterPassivatedKeys() { + /* + * Actually unregister anything that was removed in an update that the + * client has confirmed that it has applied. + */ + if (!confirmedUpdates.isEmpty()) { + confirmedUpdates.forEach(this::doUnregister); + confirmedUpdates.clear(); + } + } + + private void doUnregister(Integer updateId) { + Set passivated = passivatedByUpdate.remove(updateId); + if (passivated != null) { + passivated.forEach(key -> { + T item = keyMapper.get(key); + if (item != null) { + dataGenerator.destroyData(item); + keyMapper.remove(item); + } + }); + } + } + + private List getJsonItems(Range range) { + return range.stream() + .mapToObj(index -> activeKeyOrder.get(index - activeStart)) + .map(keyMapper::get).map(this::generateJson) + .collect(Collectors.toList()); + } + + public JsonValue generateJson(T item) { + JsonObject json = Json.createObject(); + json.put("key", keyMapper.key(item)); + dataGenerator.generateData(item, json); + return json; + } + + private static final void withMissing(Range expected, Range actual, + Consumer action) { + Range[] partition = expected.partitionWith(actual); + + applyIfNotEmpty(partition[0], action); + applyIfNotEmpty(partition[2], action); + } + + private static final void applyIfNotEmpty(Range range, + Consumer action) { + if (!range.isEmpty()) { + action.accept(range); + } + } + +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalDataCommunicator.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalDataCommunicator.java new file mode 100644 index 00000000000..6853c1dddb0 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalDataCommunicator.java @@ -0,0 +1,522 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Stream; + +import com.vaadin.flow.data.provider.CompositeDataGenerator; +import com.vaadin.flow.data.provider.DataCommunicator; +import com.vaadin.flow.data.provider.DataGenerator; +import com.vaadin.flow.data.provider.DataProvider; +import com.vaadin.flow.data.provider.KeyMapper; +import com.vaadin.flow.data.provider.QuerySortOrder; +import com.vaadin.flow.data.provider.hierarchy.HierarchicalArrayUpdater.HierarchicalUpdate; +import com.vaadin.flow.function.SerializableComparator; +import com.vaadin.flow.function.SerializableConsumer; +import com.vaadin.flow.function.SerializableSupplier; +import com.vaadin.flow.function.ValueProvider; +import com.vaadin.flow.internal.ExecutionContext; +import com.vaadin.flow.internal.JsonUtils; +import com.vaadin.flow.internal.Range; +import com.vaadin.flow.internal.StateNode; + +import elemental.json.Json; +import elemental.json.JsonArray; +import elemental.json.JsonObject; +import elemental.json.JsonValue; + +/** + * Data communicator that handles requesting hierarchical data from + * {@link HierarchicalDataProvider} and sending it to client side. + * + * @param + * the bean type + * @author Vaadin Ltd + */ +public class HierarchicalDataCommunicator extends DataCommunicator { + + private final HierarchicalArrayUpdater arrayUpdater; + private final StateNode stateNode; + private HierarchyMapper mapper; + private DataGenerator dataGenerator; + private final SerializableSupplier> uniqueKeyProviderSupplier; + + private final Map> dataControllers = new HashMap<>(); + + private KeyMapper uniqueKeyMapper = new KeyMapper() { + + private T object; + + @Override + public String key(T o) { + this.object = o; + try { + return super.key(o); + } finally { + this.object = null; + } + } + + @Override + protected String createKey() { + return Optional.ofNullable(uniqueKeyProviderSupplier.get()) + .map(provider -> provider.apply(object)) + .orElse(super.createKey()); + } + }; + + /** + * Construct a new hierarchical data communicator backed by a + * {@link TreeDataProvider}. + * + * @param dataGenerator + * the data generator function + * @param arrayUpdater + * array updater strategy + * @param dataUpdater + * data updater strategy + * @param stateNode + * the state node used to communicate for + * @param uniqueKeyProviderSupplier + * Unique key provider for a row. If null, then using Grid's + * default key generator. + */ + public HierarchicalDataCommunicator(CompositeDataGenerator dataGenerator, + HierarchicalArrayUpdater arrayUpdater, + SerializableConsumer dataUpdater, StateNode stateNode, + SerializableSupplier> uniqueKeyProviderSupplier) { + super(dataGenerator, arrayUpdater, dataUpdater, stateNode); + this.dataGenerator = dataGenerator; + this.arrayUpdater = arrayUpdater; + this.stateNode = stateNode; + this.uniqueKeyProviderSupplier = uniqueKeyProviderSupplier; + + setKeyMapper(uniqueKeyMapper); + + dataGenerator.addDataGenerator(this::generateTreeData); + setDataProvider(new TreeDataProvider<>(new TreeData<>()), null); + } + + private void generateTreeData(T item, JsonObject jsonObject) { + Optional.ofNullable(getParentItem(item)) + .ifPresent(parent -> jsonObject.put("parentUniqueKey", + uniqueKeyProviderSupplier.get().apply(parent))); + } + + private void requestFlush(HierarchicalUpdate update) { + SerializableConsumer flushRequest = context -> update + .commit(); + stateNode.runWhenAttached(ui -> ui.getInternals().getStateTree() + .beforeClientResponse(stateNode, flushRequest)); + } + + private void requestFlush(HierarchicalCommunicationController update) { + SerializableConsumer flushRequest = context -> update + .flush(); + stateNode.runWhenAttached(ui -> ui.getInternals().getStateTree() + .beforeClientResponse(stateNode, flushRequest)); + } + + /** + * Resets all the data. + *

+ * It effectively resends all available data. + */ + @Override + public void reset() { + super.reset(); + + if (!dataControllers.isEmpty()) { + dataControllers.values() + .forEach(HierarchicalCommunicationController::unregisterPassivatedKeys); + dataControllers.clear(); + + HierarchicalUpdate update = arrayUpdater + .startUpdate(getHierarchyMapper().getRootSize()); + update.enqueue("$connector.ensureHierarchy"); + requestFlush(update); + } + } + + @Override + public Stream fetchFromProvider(int offset, int limit) { + // Instead of adding logic to this class, delegate request to the + // separate object handling hierarchies. + return mapper.fetchRootItems(Range.withLength(offset, limit)); + } + + public void setParentRequestedRange(int start, int length, T parentItem) { + String parentKey = uniqueKeyProviderSupplier.get().apply(parentItem); + + HierarchicalCommunicationController controller = dataControllers.computeIfAbsent( + parentKey, + key -> new HierarchicalCommunicationController<>(parentKey, getKeyMapper(), + mapper, dataGenerator, + size -> arrayUpdater.startUpdate(getDataProviderSize()), + (pkey, range) -> mapper.fetchChildItems( + getKeyMapper().get(pkey), range))); + + controller.setRequestRange(start, length); + requestFlush(controller); + } + + @Override + public HierarchicalDataProvider getDataProvider() { + return (HierarchicalDataProvider) super.getDataProvider(); + } + + /** + * Set the current hierarchical data provider for this communicator. + * + * @param dataProvider + * the data provider to set, not null + * @param initialFilter + * the initial filter value to use, or null to not + * use any initial filter value + * + * @param + * the filter type + * + * @return a consumer that accepts a new filter value to use + */ + public SerializableConsumer setDataProvider( + HierarchicalDataProvider dataProvider, F initialFilter) { + SerializableConsumer consumer = super.setDataProvider(dataProvider, + initialFilter); + + // Remove old mapper + if (mapper != null) { + mapper.destroyAllData(); + } + mapper = createHierarchyMapper(dataProvider); + + // Set up mapper for requests + mapper.setBackEndSorting(getBackEndSorting()); + mapper.setInMemorySorting(getInMemorySorting()); + mapper.setFilter(getFilter()); + + return consumer; + } + + /** + * Create new {@code HierarchyMapper} for the given data provider. May be + * overridden in subclasses. + * + * @param dataProvider + * the data provider + * @param + * Query type + * @return new {@link HierarchyMapper} + */ + protected HierarchyMapper createHierarchyMapper( + HierarchicalDataProvider dataProvider) { + return new HierarchyMapper<>(dataProvider); + } + + /** + * Set the current hierarchical data provider for this communicator. + * + * @param dataProvider + * the data provider to set, must extend + * {@link HierarchicalDataProvider}, not null + * @param initialFilter + * the initial filter value to use, or null to not + * use any initial filter value + * + * @param + * the filter type + * + * @return a consumer that accepts a new filter value to use + */ + @Override + public SerializableConsumer setDataProvider( + DataProvider dataProvider, F initialFilter) { + if (dataProvider instanceof HierarchicalDataProvider) { + return setDataProvider( + (HierarchicalDataProvider) dataProvider, + initialFilter); + } + throw new IllegalArgumentException( + "Only " + HierarchicalDataProvider.class.getName() + + " and subtypes supported."); + } + + public void confirmUpdate(int id, String parentKey) { + Optional.ofNullable(dataControllers.get(parentKey)) + .ifPresent(controller -> { + controller.confirmUpdate(id); + + // Not absolutely necessary, but doing it right away to + // release + // memory earlier + requestFlush(controller); + }); + } + + /** + * Collapses the given item and removes its sub-hierarchy. Calling this + * method will have no effect if the row is already collapsed. + *

+ * Changes are synchronized to the client. + * + * @param item + * the item to collapse + */ + public void collapse(T item) { + collapse(item, true); + } + + /** + * Collapses the given item and removes its sub-hierarchy. Calling this + * method will have no effect if the row is already collapsed. + * {@code syncClient} indicates whether the changes should be synchronized + * to the client. + * + * @param item + * the item to collapse + * @param syncClient + * {@code true} if the changes should be synchronized to the + * client, {@code false} otherwise. + */ + protected void collapse(T item, boolean syncClient) { + doCollapse(Arrays.asList(item), syncClient); + } + + /** + * Collapses the given items and removes its sub-hierarchy. Calling this + * method will have no effect if the row is already collapsed. + *

+ * Changes are synchronized to the client. + * + * @param items + * the items to collapse + * @return the collapsed items + */ + public Collection collapse(Collection items) { + return doCollapse(items, true); + } + + private Collection doCollapse(Collection items, boolean syncClient) { + List collapsedItems = new ArrayList<>(); + items.forEach(item -> { + if (mapper.collapse(item)) { + collapsedItems.add(item); + HierarchicalCommunicationController controller = dataControllers + .remove(getKeyMapper().key(item)); + if (controller != null) { + controller.unregisterPassivatedKeys(); + } + } + }); + if (syncClient && !collapsedItems.isEmpty()) { + HierarchicalUpdate update = arrayUpdater + .startUpdate(getHierarchyMapper().getRootSize()); + update.enqueue("$connector.collapseItems", + collapsedItems.stream() + .map(this::generateJsonForExpandedOrCollapsedItem) + .collect(JsonUtils.asArray())); + requestFlush(update); + } + return collapsedItems; + } + + /** + * Expands the given item. Calling this method will have no effect if the + * item is already expanded or if it has no children. + *

+ * Changes are synchronized to the client. + * + * @param item + * the item to expand + */ + public void expand(T item) { + expand(item, true); + } + + /** + * Expands the given items. Calling this method will have no effect if the + * item is already expanded or if it has no children. + *

+ * Changes are synchronized to the client. + * + * @param items + * the items to expand + * @return the expanded items + */ + public Collection expand(Collection items) { + return doExpand(items, true); + } + + /** + * Expands the given item. Calling this method will have no effect if the + * item is already expanded or if it has no children. {@code syncClient} + * indicates whether the changes should be synchronized to the client. + * + * @param item + * the item to expand + * @param syncClient + * {@code true} if the changes should be synchronized to the + * client, {@code false} otherwise. + */ + protected void expand(T item, boolean syncClient) { + doExpand(Arrays.asList(item), syncClient); + } + + private Collection doExpand(Collection items, boolean syncClient) { + List expandedItems = new ArrayList<>(); + items.forEach(item -> { + if (mapper.expand(item)) { + expandedItems.add(item); + } + }); + if (syncClient && !expandedItems.isEmpty()) { + HierarchicalUpdate update = arrayUpdater + .startUpdate(getHierarchyMapper().getRootSize()); + update.enqueue("$connector.expandItems", + expandedItems.stream() + .map(this::generateJsonForExpandedOrCollapsedItem) + .collect(JsonUtils.asArray())); + requestFlush(update); + } + return expandedItems; + } + + /** + * Returns whether given item has children. + * + * @param item + * the item to test + * @return {@code true} if item has children; {@code false} if not + */ + public boolean hasChildren(T item) { + return mapper.hasChildren(item); + } + + /** + * Returns whether given item is expanded. + * + * @param item + * the item to test + * @return {@code true} if item is expanded; {@code false} if not + */ + public boolean isExpanded(T item) { + return mapper.isExpanded(item); + } + + /** + * Returns parent index for the row or {@code null}. + * + * @param item + * the item to find the parent of + * @return the parent index or {@code null} for top-level items + */ + public Integer getParentIndex(T item) { + return mapper.getParentIndex(item); + } + + /** + * Returns index for the row or {@code null}. + * + * @param item + * the target item + * @return the index or {@code null} for top-level and non-existing items + */ + public Integer getIndex(T item) { + return Optional.ofNullable(mapper.getIndex(item)) + .filter(index -> index >= 0).orElse(null); + } + + /** + * Returns parent item for the row or {@code null}. + * + * @param item + * the item to find the parent of + * @return the parent item or {@code null} for top-level items + */ + public T getParentItem(T item) { + return mapper.getParentOfItem(item); + } + + /** + * Returns depth of item in the tree starting from zero representing a root. + * + * @param item + * Target item + * @return depth of item in the tree or -1 if item is null + */ + public int getDepth(T item) { + return mapper.getDepth(item); + } + + @Override + public int getDataProviderSize() { + return mapper.getRootSize(); + } + + @Override + public void setBackEndSorting(List sortOrder) { + if (mapper != null) { + mapper.setBackEndSorting(sortOrder); + } + super.setBackEndSorting(sortOrder); + } + + @Override + public void setInMemorySorting(SerializableComparator comparator) { + if (mapper != null) { + mapper.setInMemorySorting(comparator); + } + super.setInMemorySorting(comparator); + } + + protected void setFilter(F filter) { + if (mapper != null) { + mapper.setFilter(filter); + } + } + + /** + * Returns true if there is any expanded items. + * + * @return {@code true} if there is any expanded items. + */ + public boolean hasExpandedItems() { + return mapper.hasExpandedItems(); + } + + /** + * Returns the {@code HierarchyMapper} used by this data communicator. + * + * @return the hierarchy mapper used by this data communicator + */ + protected HierarchyMapper getHierarchyMapper() { + return mapper; + } + + private JsonValue generateJsonForExpandedOrCollapsedItem(T item) { + JsonObject json = Json.createObject(); + json.put("key", getKeyMapper().key(item)); + return json; + } + +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalDataProvider.java new file mode 100644 index 00000000000..a704e93bbef --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalDataProvider.java @@ -0,0 +1,109 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.util.stream.Stream; + +import com.vaadin.flow.data.provider.DataProvider; +import com.vaadin.flow.data.provider.Query; + +/** + * A common interface for fetching hierarchical data from a data source, such as + * an in-memory collection or a backend database. + * + * @author Vaadin Ltd + * + * @param + * data type + * @param + * filter type + */ +public interface HierarchicalDataProvider extends DataProvider { + + /** + * Get the number of immediate child data items for the parent item returned + * by a given query. + * + * @param query + * given query to request the count for + * @return the count of child data items for the data item + * {@link HierarchicalQuery#getParent()} + * + * @throws IllegalArgumentException + * if the query is not of type HierarchicalQuery + */ + @Override + public default int size(Query query) { + if (query instanceof HierarchicalQuery) { + return getChildCount((HierarchicalQuery) query); + } + throw new IllegalArgumentException( + "Hierarchical data provider doesn't support non-hierarchical queries"); + } + + /** + * Fetches data from this HierarchicalDataProvider using given + * {@code query}. Only the immediate children of + * {@link HierarchicalQuery#getParent()} will be returned. + * + * @param query + * given query to request data with + * @return a stream of data objects resulting from the query + * + * @throws IllegalArgumentException + * if the query is not of type HierarchicalQuery + */ + @Override + public default Stream fetch(Query query) { + if (query instanceof HierarchicalQuery) { + return fetchChildren((HierarchicalQuery) query); + } + throw new IllegalArgumentException( + "Hierarchical data provider doesn't support non-hierarchical queries"); + } + + /** + * Get the number of immediate child data items for the parent item returned + * by a given query. + * + * @param query + * given query to request the count for + * @return the count of child data items for the data item + * {@link HierarchicalQuery#getParent()} + */ + public int getChildCount(HierarchicalQuery query); + + /** + * Fetches data from this HierarchicalDataProvider using given + * {@code query}. Only the immediate children of + * {@link HierarchicalQuery#getParent()} will be returned. + * + * @param query + * given query to request data with + * @return a stream of data objects resulting from the query + */ + public Stream fetchChildren(HierarchicalQuery query); + + /** + * Check whether a given item has any children associated with it. + * + * @param item + * the item to check for children + * @return whether the given item has children + */ + public boolean hasChildren(T item); + +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalQuery.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalQuery.java new file mode 100644 index 00000000000..963f49c2603 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchicalQuery.java @@ -0,0 +1,98 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.util.Comparator; +import java.util.List; +import java.util.Optional; + +import com.vaadin.flow.data.provider.Query; +import com.vaadin.flow.data.provider.QuerySortOrder; + +/** + * Immutable hierarchical query object used to request data from a backend. + * Contains the parent node, index limits, sorting and filtering information. + * + * @param + * bean type + * @param + * filter type + * + */ +public class HierarchicalQuery extends Query { + + private final T parent; + + /** + * Constructs a new hierarchical query object with given filter and parent + * node. + * + * @param filter + * filtering for fetching; can be null + * @param parent + * the hierarchical parent object, null + * corresponding to the root node + */ + public HierarchicalQuery(F filter, T parent) { + super(filter); + this.parent = parent; + } + + /** + * Constructs a new hierarchical query object with given offset, limit, + * sorting and filtering. + * + * @param offset + * first index to fetch + * @param limit + * fetched item count + * @param sortOrders + * sorting order for fetching; used for sorting backends + * @param inMemorySorting + * comparator for sorting in-memory data + * @param filter + * filtering for fetching; can be null + * @param parent + * the hierarchical parent object, null + * corresponding to the root node + */ + public HierarchicalQuery(int offset, int limit, + List sortOrders, Comparator inMemorySorting, + F filter, T parent) { + super(offset, limit, sortOrders, inMemorySorting, filter); + this.parent = parent; + } + + /** + * Get the hierarchical parent object, where null corresponds + * to the root node. + * + * @return the hierarchical parent object + */ + public T getParent() { + return parent; + } + + /** + * Get an Optional of the hierarchical parent object. + * + * @see #getParent() + * @return the result of {@link #getParent()} wrapped by an Optional + */ + public Optional getParentOptional() { + return Optional.ofNullable(parent); + } +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchyMapper.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchyMapper.java new file mode 100644 index 00000000000..42edf7de8b3 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/HierarchyMapper.java @@ -0,0 +1,629 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.io.Serializable; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import com.vaadin.flow.data.provider.QuerySortOrder; +import com.vaadin.flow.internal.Range; + +/** + * Mapper for hierarchical data. + *

+ * Keeps track of the expanded nodes, and size of of the subtrees for each + * expanded node. + *

+ * This class is framework internal implementation details, and can be changed / + * moved at any point. This means that you should not directly use this for + * anything. + * + * @author Vaadin Ltd + * + * @param + * the data type + * @param + * the filter type + */ +public class HierarchyMapper implements Serializable { + + // childMap is only used for finding parents of items and clean up on + // removing children of expanded nodes. + private Map> childMap = new HashMap<>(); + private Map parentIdMap = new HashMap<>(); + + private final HierarchicalDataProvider provider; + private F filter; + private List backEndSorting; + private Comparator inMemorySorting; + + private Set expandedItemIds = new HashSet<>(); + + /** + * Constructs a new HierarchyMapper. + * + * @param provider + * the hierarchical data provider for this mapper + */ + public HierarchyMapper(HierarchicalDataProvider provider) { + this.provider = provider; + } + + /** + * Returns the size of the currently expanded hierarchy. + * + * @return the amount of available data + */ + public int getTreeSize() { + return (int) getHierarchy(null).count(); + } + + /** + * Returns the size of root level. + * + * @return the amount of available root data + */ + public int getRootSize() { + return getDataProvider() + .getChildCount(new HierarchicalQuery<>(filter, null)); + } + + /** + * Finds the index of the parent of the item in given target index. + * + * @param item + * the item to get the parent of + * @return the parent index or a negative value if the parent is not found + * + */ + public Integer getParentIndex(T item) { + List flatHierarchy = getHierarchy(null).collect(Collectors.toList()); + return flatHierarchy.indexOf(getParentOfItem(item)); + } + + /** + * Finds the index of the item in active tree. + * + * @param item + * the target item + * @return the index or a negative value if item is not found + * + */ + public Integer getIndex(T item) { + List flatHierarchy = getHierarchy(null).collect(Collectors.toList()); + return flatHierarchy.indexOf(item); + } + + /** + * Returns whether the given item is expanded. + * + * @param item + * the item to test + * @return {@code true} if item is expanded; {@code false} if not + */ + public boolean isExpanded(T item) { + if (item == null) { + // Root nodes are always visible. + return true; + } + return expandedItemIds.contains(getDataProvider().getId(item)); + } + + /** + * Expands the given item. + * + * @param item + * the item to expand + * @return {@code true} if this method expanded the item, {@code false} + * otherwise + */ + public boolean expand(T item) { + return doExpand(item); + } + + /** + * Expands the given item. + * + * @param item + * the item to expand + * @param position + * the index of the item + * @return range of rows added by expanding the item + */ + public Range expand(T item, Integer position) { + if (doExpand(item) && position != null) { + return Range.withLength(position + 1, + (int) getHierarchy(item, false).count()); + } + + return Range.withLength(0, 0); + } + + /** + * Expands the given item if it is collapsed and has children, and returns + * whether this method expanded the item. + * + * @param item + * the item to expand + * @return {@code true} if this method expanded the item, {@code false} + * otherwise + */ + private boolean doExpand(T item) { + boolean expanded = false; + if (!isExpanded(item) && hasChildren(item)) { + expandedItemIds.add(getDataProvider().getId(item)); + expanded = true; + } + return expanded; + } + + /** + * Collapses the given item. + * + * @param item + * the item to collapse + */ + public boolean collapse(T item) { + if (item == null) { + return false; + } + if (isExpanded(item)) { + expandedItemIds.remove(getDataProvider().getId(item)); + return true; + } + return false; + } + + /** + * Collapses the given item. + * + * @param item + * the item to collapse + * @param position + * the index of the item + * + * @return range of rows removed by collapsing the item + */ + public Range collapse(T item, Integer position) { + Range removedRows = Range.withLength(0, 0); + if (isExpanded(item)) { + if (position != null) { + removedRows = Range.withLength(position + 1, + (int) getHierarchy(item, false).count()); + } + expandedItemIds.remove(getDataProvider().getId(item)); + } + return removedRows; + } + + + /** + * Gets the current in-memory sorting. + * + * @return the in-memory sorting + */ + public Comparator getInMemorySorting() { + return inMemorySorting; + } + + /** + * Sets the current in-memory sorting. This will cause the hierarchy to be + * constructed again. + * + * @param inMemorySorting + * the in-memory sorting + */ + public void setInMemorySorting(Comparator inMemorySorting) { + this.inMemorySorting = inMemorySorting; + } + + /** + * Gets the current back-end sorting. + * + * @return the back-end sorting + */ + public List getBackEndSorting() { + return backEndSorting; + } + + /** + * Sets the current back-end sorting. This will cause the hierarchy to be + * constructed again. + * + * @param backEndSorting + * the back-end sorting + */ + public void setBackEndSorting(List backEndSorting) { + this.backEndSorting = backEndSorting; + } + + /** + * Gets the current filter. + * + * @return the filter + */ + public F getFilter() { + return filter; + } + + /** + * Sets the current filter. This will cause the hierarchy to be constructed + * again. + * + * @param filter + * the filter + */ + public void setFilter(Object filter) { + this.filter = (F) filter; + } + + /** + * Gets the {@code HierarchicalDataProvider} for this + * {@code HierarchyMapper}. + * + * @return the hierarchical data provider + */ + public HierarchicalDataProvider getDataProvider() { + return provider; + } + + /** + * Returns whether given item has children. + * + * @param item + * the node to test + * @return {@code true} if node has children; {@code false} if not + */ + public boolean hasChildren(T item) { + return getDataProvider().hasChildren(item); + } + + /* Fetch methods. These are used to calculate what to request. */ + + /** + * Gets a stream of items in the form of a flattened hierarchy from the + * back-end and filter the wanted results from the list. + * + * @param range + * the requested item range + * @return the stream of items + */ + public Stream fetchHierarchyItems(Range range) { + return getHierarchy(null).skip(range.getStart()).limit(range.length()); + } + + /** + * Gets a stream of children for the given item in the form of a flattened + * hierarchy from the back-end and filter the wanted results from the list. + * + * @param parent + * the parent item for the fetch + * @param range + * the requested item range + * @return the stream of items + */ + public Stream fetchHierarchyItems(T parent, Range range) { + return getHierarchy(parent, false).skip(range.getStart()) + .limit(range.length()); + } + + /** + * Gets a stream of root items from the back-end and filter the wanted + * results from the list. + * + * @param range + * the requested item range + * @return the stream of items + */ + public Stream fetchRootItems(Range range) { + return getDirectChildren(null, range); + } + + public Stream fetchChildItems(T parent, Range range) { + return getChildrenStream(parent, range, false); + } + + public int countChildItems(T parent) { + return getDataProvider() + .getChildCount(new HierarchicalQuery<>(filter, parent)); + } + + /* Methods for providing information on the hierarchy. */ + + /** + * Generic method for finding direct children of a given parent, limited by + * given range. + * + * @param parent + * the parent + * @param range + * the range of direct children to return. null means full range. + * @return the requested children of the given parent + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + private Stream doFetchDirectChildren(T parent, Range range) { + Range actualRange = (range == null) + ? Range.withLength(0, Integer.MAX_VALUE) + : range; + return getDataProvider().fetchChildren(new HierarchicalQuery( + actualRange.getStart(), actualRange.length(), + getBackEndSorting(), + getInMemorySorting(), getFilter(), parent)); + } + + /** + * Generic method for finding full range of direct children of a given + * parent. + * + * @param parent + * the parent + * @return the all children of the given parent + */ + private Stream doFetchDirectChildren(T parent) { + return doFetchDirectChildren(parent, null); + } + + /** + * Returns depth of item in the tree starting from zero representing a root. + * + * @param item + * Target item + * @return depth of item in the tree or -1 if item is null + */ + public int getDepth(T item) { + int depth = -1; + while (item != null) { + item = getParentOfItem(item); + ++depth; + } + return depth; + } + + /** + * Find parent for the given item among open folders. + * + * @param item + * the item + * @return parent item or {@code null} for root items or if the parent is + * closed + */ + protected T getParentOfItem(T item) { + Objects.requireNonNull(item, "Can not find the parent of null"); + return parentIdMap.get(getDataProvider().getId(item)); + } + + /** + * Removes all children of an item identified by a given id. Items removed + * by this method as well as the original item are all marked to be + * collapsed. May be overridden in subclasses for removing obsolete data to + * avoid memory leaks. + * + * @param id + * the item id + */ + protected void removeChildren(Object id) { + // Clean up removed nodes from child map + Iterator>> iterator = childMap.entrySet().iterator(); + Set invalidatedChildren = new HashSet<>(); + while (iterator.hasNext()) { + Entry> entry = iterator.next(); + T key = entry.getKey(); + if (key != null && getDataProvider().getId(key).equals(id)) { + invalidatedChildren.addAll(entry.getValue()); + iterator.remove(); + } + } + expandedItemIds.remove(id); + invalidatedChildren.stream().map(getDataProvider()::getId) + .forEach(x -> { + removeChildren(x); + parentIdMap.remove(x); + }); + } + + /** + * Finds the current index of given object. This is based on a search in + * flattened version of the hierarchy. + * + * @param target + * the target object to find + * @return optional index of given object + */ + public Optional getIndexOf(T target) { + if (target == null) { + return Optional.empty(); + } + + final List collect = getHierarchy(null).map(provider::getId) + .collect(Collectors.toList()); + int index = collect.indexOf(getDataProvider().getId(target)); + return Optional.ofNullable(index < 0 ? null : index); + } + + /** + * Gets the full hierarchy tree starting from given node. + * + * @param parent + * the parent node to start from + * @return the flattened hierarchy as a stream + */ + private Stream getHierarchy(T parent) { + return getHierarchy(parent, true); + } + + /** + * Gets the full hierarchy tree starting from given node. The starting node + * can be omitted. + * + * @param parent + * the parent node to start from + * @param includeParent + * {@code true} to include the parent; {@code false} if not + * @return the flattened hierarchy as a stream + */ + private Stream getHierarchy(T parent, boolean includeParent) { + return Stream.of(parent) + .flatMap(node -> getFlatChildrenStream(node, includeParent)); + } + + /** + * Gets the stream of direct children for given node. + * + * @param parent + * the parent node + * @param range + * @return the stream of direct children + */ + private Stream getDirectChildren(T parent, Range range) { + return getChildrenStream(parent, range, false); + } + + /** + * The method to recursively fetch the children of given parent. Used with + * {@link Stream#flatMap} to expand a stream of parent nodes into a + * flattened hierarchy. + * + * @param parent + * the parent node + * @return the stream of all children under the parent, includes the parent + */ + private Stream getFlatChildrenStream(T parent) { + return getFlatChildrenStream(parent, true); + } + + /** + * The method to recursively fetch the children of given parent. Used with + * {@link Stream#flatMap} to expand a stream of parent nodes into a + * flattened hierarchy. + * + * @param parent + * the parent node + * @param includeParent + * {@code true} to include the parent in the stream; + * {@code false} if not + * @return the stream of all children under the parent + */ + private Stream getFlatChildrenStream(T parent, boolean includeParent) { + List childList = Collections.emptyList(); + if (isExpanded(parent)) { + childList = doFetchDirectChildren(parent) + .collect(Collectors.toList()); + if (childList.isEmpty()) { + removeChildren(parent == null ? null + : getDataProvider().getId(parent)); + } else { + registerChildren(parent, childList); + } + } + return combineParentAndChildStreams(parent, + childList.stream().flatMap(this::getFlatChildrenStream), + includeParent); + } + + /** + * The method fetch the children of given parent. + * + * @param parent + * the parent node + * @param range + * @param includeParent + * {@code true} to include the parent in the stream; + * {@code false} if not + * @return the stream of all direct children under the parent + */ + private Stream getChildrenStream(T parent, Range range, + boolean includeParent) { + List childList = Collections.emptyList(); + if (isExpanded(parent)) { + childList = doFetchDirectChildren(parent, range) + .collect(Collectors.toList()); + if (childList.isEmpty()) { + removeChildren(parent == null ? null + : getDataProvider().getId(parent)); + } else { + registerChildren(parent, childList); + } + } + return combineParentAndChildStreams(parent, + childList.stream(), + includeParent); + } + + + /** + * Register parent and children items into inner structures. May be + * overridden in subclasses. + * + * @param parent + * the parent item + * @param childList + * list of parents children to be registered. + */ + protected void registerChildren(T parent, List childList) { + childMap.put(parent, new HashSet<>(childList)); + childList.forEach( + x -> parentIdMap.put(getDataProvider().getId(x), parent)); + } + + /** + * Helper method for combining parent and a stream of children into one + * stream. {@code null} item is never included, and parent can be skipped by + * providing the correct value for {@code includeParent}. + * + * @param parent + * the parent node + * @param children + * the stream of children + * @param includeParent + * {@code true} to include the parent in the stream; + * {@code false} if not + * @return the combined stream of parent and its children + */ + private Stream combineParentAndChildStreams(T parent, Stream children, + boolean includeParent) { + boolean parentIncluded = includeParent && parent != null; + Stream parentStream = parentIncluded ? Stream.of(parent) + : Stream.empty(); + return Stream.concat(parentStream, children); + } + + public void destroyAllData() { + childMap.clear(); + parentIdMap.clear(); + expandedItemIds.clear(); + } + + /** + * Returns true if there is any expanded items. + * + * @return {@code true} if there is any expanded items. + */ + public boolean hasExpandedItems() { + return !expandedItemIds.isEmpty(); + } +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/TreeData.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/TreeData.java new file mode 100644 index 00000000000..f70eafe3cc1 --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/TreeData.java @@ -0,0 +1,490 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import com.vaadin.flow.function.ValueProvider; + +/** + * Class for representing hierarchical data. + *

+ * Typically used as a backing data source for {@link TreeDataProvider}. + * + * @author Vaadin Ltd + * + * @param + * data type + */ +public class TreeData implements Serializable { + + private static class HierarchyWrapper implements Serializable { + private T parent; + private List children; + + public HierarchyWrapper(T parent) { + this.parent = parent; + children = new ArrayList<>(); + } + + public T getParent() { + return parent; + } + + public void setParent(T parent) { + this.parent = parent; + } + + public List getChildren() { + return children; + } + + public void addChild(T child) { + children.add(child); + } + + public void removeChild(T child) { + children.remove(child); + } + } + + private final Map> itemToWrapperMap; + + /** + * Creates an initially empty hierarchical data representation to which + * items can be added or removed. + */ + public TreeData() { + itemToWrapperMap = new LinkedHashMap<>(); + itemToWrapperMap.put(null, new HierarchyWrapper<>(null)); + } + + /** + * Adds the items as root items to this structure. + * + * @param items + * the items to add + * @return this + * + * @throws IllegalArgumentException + * if any of the given items have already been added to this + * structure + * @throws NullPointerException + * if any of the items are {code null} + */ + public TreeData addRootItems(T... items) { + addItems(null, items); + return this; + } + + /** + * Adds the items of the given collection as root items to this structure. + * + * @param items + * the collection of items to add + * @return this + * + * @throws IllegalArgumentException + * if any of the given items have already been added to this + * structure + * @throws NullPointerException + * if any of the items are {code null} + */ + public TreeData addRootItems(Collection items) { + addItems(null, items); + return this; + } + + /** + * Adds the items of the given stream as root items to this structure. + * + * @param items + * the stream of root items to add + * @return this + * + * @throws IllegalArgumentException + * if any of the given items have already been added to this + * structure + * @throws NullPointerException + * if any of the items are {code null} + */ + public TreeData addRootItems(Stream items) { + addItems(null, items); + return this; + } + + /** + * Adds a data item as a child of {@code parent}. Call with {@code null} as + * parent to add a root level item. The given parent item must already exist + * in this structure, and an item can only be added to this structure once. + * + * @param parent + * the parent item for which the items are added as children + * @param item + * the item to add + * @return this + * + * @throws IllegalArgumentException + * if parent is not null and not already added to this structure + * @throws IllegalArgumentException + * if the item has already been added to this structure + * @throws NullPointerException + * if item is null + */ + public TreeData addItem(T parent, T item) { + Objects.requireNonNull(item, "Item cannot be null"); + if (parent != null && !contains(parent)) { + throw new IllegalArgumentException( + "Parent needs to be added before children. " + + "To add root items, call with parent as null"); + } + if (contains(item)) { + throw new IllegalArgumentException( + "Cannot add the same item multiple times: " + item); + } + putItem(item, parent); + return this; + } + + /** + * Adds a list of data items as children of {@code parent}. Call with + * {@code null} as parent to add root level items. The given parent item + * must already exist in this structure, and an item can only be added to + * this structure once. + * + * @param parent + * the parent item for which the items are added as children + * @param items + * the list of items to add + * @return this + * + * @throws IllegalArgumentException + * if parent is not null and not already added to this structure + * @throws IllegalArgumentException + * if any of the given items have already been added to this + * structure + * @throws NullPointerException + * if any of the items are null + */ + public TreeData addItems(T parent, + @SuppressWarnings("unchecked") T... items) { + Arrays.asList(items).stream().forEach(item -> addItem(parent, item)); + return this; + } + + /** + * Adds a list of data items as children of {@code parent}. Call with + * {@code null} as parent to add root level items. The given parent item + * must already exist in this structure, and an item can only be added to + * this structure once. + * + * @param parent + * the parent item for which the items are added as children + * @param items + * the collection of items to add + * @return this + * + * @throws IllegalArgumentException + * if parent is not null and not already added to this structure + * @throws IllegalArgumentException + * if any of the given items have already been added to this + * structure + * @throws NullPointerException + * if any of the items are null + */ + public TreeData addItems(T parent, Collection items) { + items.stream().forEach(item -> addItem(parent, item)); + return this; + } + + /** + * Adds data items contained in a stream as children of {@code parent}. Call + * with {@code null} as parent to add root level items. The given parent + * item must already exist in this structure, and an item can only be added + * to this structure once. + * + * @param parent + * the parent item for which the items are added as children + * @param items + * stream of items to add + * @return this + * + * @throws IllegalArgumentException + * if parent is not null and not already added to this structure + * @throws IllegalArgumentException + * if any of the given items have already been added to this + * structure + * @throws NullPointerException + * if any of the items are null + */ + public TreeData addItems(T parent, Stream items) { + items.forEach(item -> addItem(parent, item)); + return this; + } + + /** + * Adds the given items as root items and uses the given value provider to + * recursively populate children of the root items. + * + * @param rootItems + * the root items to add + * @param childItemProvider + * the value provider used to recursively populate this TreeData + * from the given root items + * @return this + */ + public TreeData addItems(Collection rootItems, + ValueProvider> childItemProvider) { + rootItems.forEach(item -> { + addItem(null, item); + Collection childItems = childItemProvider.apply(item); + addItems(item, childItems); + addItemsRecursively(childItems, childItemProvider); + }); + return this; + } + + /** + * Adds the given items as root items and uses the given value provider to + * recursively populate children of the root items. + * + * @param rootItems + * the root items to add + * @param childItemProvider + * the value provider used to recursively populate this TreeData + * from the given root items + * @return this + */ + public TreeData addItems(Stream rootItems, + ValueProvider> childItemProvider) { + // Must collect to lists since the algorithm iterates multiple times + return addItems(rootItems.collect(Collectors.toList()), + item -> childItemProvider.apply(item) + .collect(Collectors.toList())); + } + + /** + * Remove a given item from this structure. Additionally, this will + * recursively remove any descendants of the item. + * + * @param item + * the item to remove, or null to clear all data + * @return this + * + * @throws IllegalArgumentException + * if the item does not exist in this structure + */ + public TreeData removeItem(T item) { + if (!contains(item)) { + throw new IllegalArgumentException( + "Item '" + item + "' not in the hierarchy"); + } + new ArrayList<>(getChildren(item)).forEach(child -> removeItem(child)); + itemToWrapperMap.get(itemToWrapperMap.get(item).getParent()) + .removeChild(item); + if (item != null) { + // remove non root item from backing map + itemToWrapperMap.remove(item); + } + return this; + } + + /** + * Clear all items from this structure. Shorthand for calling + * {@link #removeItem(Object)} with null. + * + * @return this + */ + public TreeData clear() { + removeItem(null); + return this; + } + + /** + * Gets the root items of this structure. + * + * @return an unmodifiable list of root items of this structure + */ + public List getRootItems() { + return getChildren(null); + } + + /** + * Get the immediate child items for the given item. + * + * @param item + * the item for which to retrieve child items for, null to + * retrieve all root items + * @return an unmodifiable list of child items for the given item + * + * @throws IllegalArgumentException + * if the item does not exist in this structure + */ + public List getChildren(T item) { + if (!contains(item)) { + throw new IllegalArgumentException( + "Item '" + item + "' not in the hierarchy"); + } + return Collections + .unmodifiableList(itemToWrapperMap.get(item).getChildren()); + } + + /** + * Get the parent item for the given item. + * + * @param item + * the item for which to retrieve the parent item for + * @return parent item for the given item or {@code null} if the item is a + * root item. + * @throws IllegalArgumentException + * if the item does not exist in this structure + */ + public T getParent(T item) { + if (!contains(item)) { + throw new IllegalArgumentException( + "Item '" + item + "' not in hierarchy"); + } + return itemToWrapperMap.get(item).getParent(); + } + + /** + * Moves an item to become a child of the given parent item. The new parent + * item must exist in the hierarchy. Setting the parent to {@code null} + * makes the item a root item. After making changes to the tree data, + * {@link TreeDataProvider#refreshAll()} should be called. + * + * @param item + * the item to be set as the child of {@code parent} + * @param parent + * the item to be set as parent or {@code null} to set the item + * as root + */ + public void setParent(T item, T parent) { + if (!contains(item)) { + throw new IllegalArgumentException( + "Item '" + item + "' not in the hierarchy"); + } + + if (parent != null && !contains(parent)) { + throw new IllegalArgumentException( + "Parent needs to be added before children. " + + "To set as root item, call with parent as null"); + } + + if (item.equals(parent)) { + throw new IllegalArgumentException( + "Item cannot be the parent of itself"); + } + + T oldParent = itemToWrapperMap.get(item).getParent(); + + if (!Objects.equals(oldParent, parent)) { + // Remove item from old parent's children + itemToWrapperMap.get(oldParent).removeChild(item); + + // Add item to parent's children + itemToWrapperMap.get(parent).addChild(item); + + // Set item's new parent + itemToWrapperMap.get(item).setParent(parent); + } + } + + /** + * Moves an item to the position immediately after a sibling item. The two + * items must have the same parent. After making changes to the tree data, + * {@link TreeDataProvider#refreshAll()} should be called. + * + * @param item + * the item to be moved + * @param sibling + * the item after which the moved item will be located, or {@code + * null} to move item to first position + */ + public void moveAfterSibling(T item, T sibling) { + if (!contains(item)) { + throw new IllegalArgumentException( + "Item '" + item + "' not in the hierarchy"); + } + + if (sibling == null) { + List children = itemToWrapperMap.get(getParent(item)) + .getChildren(); + + // Move item to first position + children.remove(item); + children.add(0, item); + } else { + if (!contains(sibling)) { + throw new IllegalArgumentException( + "Item '" + sibling + "' not in the hierarchy"); + } + + T parent = itemToWrapperMap.get(item).getParent(); + + if (!Objects.equals(parent, + itemToWrapperMap.get(sibling).getParent())) { + throw new IllegalArgumentException("Items '" + item + "' and '" + + sibling + "' don't have the same parent"); + } + + List children = itemToWrapperMap.get(parent).getChildren(); + + // Move item to the position after the sibling + children.remove(item); + children.add(children.indexOf(sibling) + 1, item); + } + } + + /** + * Check whether the given item is in this hierarchy. + * + * @param item + * the item to check + * @return {@code true} if the item is in this hierarchy, {@code false} if + * not + */ + public boolean contains(T item) { + return itemToWrapperMap.containsKey(item); + } + + private void putItem(T item, T parent) { + HierarchyWrapper wrappedItem = new HierarchyWrapper<>(parent); + if (itemToWrapperMap.containsKey(parent)) { + itemToWrapperMap.get(parent).addChild(item); + } + itemToWrapperMap.put(item, wrappedItem); + } + + private void addItemsRecursively(Collection items, + ValueProvider> childItemProvider) { + items.forEach(item -> { + Collection childItems = childItemProvider.apply(item); + addItems(item, childItems); + addItemsRecursively(childItems, childItemProvider); + }); + } +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/TreeDataProvider.java b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/TreeDataProvider.java new file mode 100644 index 00000000000..e67f394398c --- /dev/null +++ b/flow-data/src/main/java/com/vaadin/flow/data/provider/hierarchy/TreeDataProvider.java @@ -0,0 +1,193 @@ +/* + * Copyright 2000-2018 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.data.provider.hierarchy; + +import java.util.Comparator; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Stream; + +import com.vaadin.flow.data.provider.DataProvider; +import com.vaadin.flow.data.provider.DataProviderWrapper; +import com.vaadin.flow.data.provider.InMemoryDataProvider; +import com.vaadin.flow.data.provider.Query; +import com.vaadin.flow.function.SerializableComparator; +import com.vaadin.flow.function.SerializableFunction; +import com.vaadin.flow.function.SerializablePredicate; + +/** + * An in-memory data provider for listing components that display hierarchical + * data. Uses an instance of {@link TreeData} as its source of data. + * + * @author Vaadin Ltd + * + * @param + * data type + */ +public class TreeDataProvider + extends AbstractHierarchicalDataProvider> + implements InMemoryDataProvider { + + private final TreeData treeData; + + private SerializablePredicate filter = null; + + private SerializableComparator sortOrder = null; + + /** + * Constructs a new TreeDataProvider. + *

+ * This data provider should be refreshed after making changes to the + * underlying {@link TreeData} instance. + * + * @param treeData + * the backing {@link TreeData} for this provider, not + * {@code null} + */ + public TreeDataProvider(TreeData treeData) { + Objects.requireNonNull(treeData, "treeData cannot be null"); + this.treeData = treeData; + } + + /** + * Return the underlying hierarchical data of this provider. + * + * @return the underlying data of this provider + */ + public TreeData getTreeData() { + return treeData; + } + + @Override + public boolean hasChildren(T item) { + if (!treeData.contains(item)) { + // The item might be dropped from the tree already + return false; + } + return !treeData.getChildren(item).isEmpty(); + } + + @Override + public int getChildCount( + HierarchicalQuery> query) { + if (query.getFilter().isPresent()) { + Stream childStream = getFilteredStream( + treeData.getChildren(query.getParent()).stream(), + query.getFilter()); + return (int) childStream.skip(query.getOffset()) + .limit(query.getLimit()).count(); + } + if (query.getParent() != null) { + return treeData.getChildren(query.getParent()).size(); + } else { + return treeData.getRootItems().size(); + } + } + + @Override + public Stream fetchChildren( + HierarchicalQuery> query) { + if (!treeData.contains(query.getParent())) { + throw new IllegalArgumentException("The queried item " + + query.getParent() + + " could not be found in the backing TreeData. " + + "Did you forget to refresh this data provider after item removal?"); + } + + Stream childStream = getFilteredStream( + treeData.getChildren(query.getParent()).stream(), + query.getFilter()); + + Optional> comparing = Stream + .of(query.getInMemorySorting(), sortOrder) + .filter(Objects::nonNull) + .reduce((c1, c2) -> c1.thenComparing(c2)); + + if (comparing.isPresent()) { + childStream = childStream.sorted(comparing.get()); + } + + return childStream.skip(query.getOffset()).limit(query.getLimit()); + } + + @Override + public SerializablePredicate getFilter() { + return filter; + } + + @Override + public void setFilter(SerializablePredicate filter) { + this.filter = filter; + refreshAll(); + } + + @Override + public SerializableComparator getSortComparator() { + return sortOrder; + } + + @Override + public void setSortComparator(SerializableComparator comparator) { + sortOrder = comparator; + refreshAll(); + } + + @Override + public DataProvider withConvertedFilter( + SerializableFunction> filterConverter) { + Objects.requireNonNull(filterConverter, + "Filter converter can't be null"); + return new DataProviderWrapper>(this) { + + @Override + protected SerializablePredicate getFilter(Query query) { + return query.getFilter().map(filterConverter).orElse(null); + } + + @Override + public int size(Query t) { + if (t instanceof HierarchicalQuery) { + return dataProvider.size(new HierarchicalQuery<>( + t.getOffset(), t.getLimit(), t.getSortOrders(), + t.getInMemorySorting(), getFilter(t), + ((HierarchicalQuery) t).getParent())); + } + throw new IllegalArgumentException( + "Hierarchical data provider doesn't support non-hierarchical queries"); + } + + @Override + public Stream fetch(Query t) { + if (t instanceof HierarchicalQuery) { + return dataProvider.fetch(new HierarchicalQuery<>( + t.getOffset(), t.getLimit(), t.getSortOrders(), + t.getInMemorySorting(), getFilter(t), + ((HierarchicalQuery) t).getParent())); + } + throw new IllegalArgumentException( + "Hierarchical data provider doesn't support non-hierarchical queries"); + } + }; + } + + private Stream getFilteredStream(Stream stream, + Optional> queryFilter) { + if (filter != null) { + stream = stream.filter(filter); + } + return queryFilter.map(stream::filter).orElse(stream); + } +} diff --git a/flow-data/src/main/java/com/vaadin/flow/data/renderer/BasicRenderer.java b/flow-data/src/main/java/com/vaadin/flow/data/renderer/BasicRenderer.java index e14f51fc05a..882d8a5c060 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/renderer/BasicRenderer.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/renderer/BasicRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -34,7 +34,8 @@ * a simple value in the UI, such as {@link NumberRenderer} and * {@link LocalDateRenderer}. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the type of the item used inside the renderer diff --git a/flow-data/src/main/java/com/vaadin/flow/data/renderer/ClickableRenderer.java b/flow-data/src/main/java/com/vaadin/flow/data/renderer/ClickableRenderer.java index 7790ac9e482..7745a5e4d96 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/renderer/ClickableRenderer.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/renderer/ClickableRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -23,7 +23,8 @@ /** * Interface for clickable renderers. * - * @author Vaadin Ltd. + * @author Vaadin Ltd + * @since 1.0. * * @param * the type of the item received in the click listeners diff --git a/flow-data/src/main/java/com/vaadin/flow/data/renderer/ComponentRenderer.java b/flow-data/src/main/java/com/vaadin/flow/data/renderer/ComponentRenderer.java index 8292b955b80..3f1e67f3d97 100644 --- a/flow-data/src/main/java/com/vaadin/flow/data/renderer/ComponentRenderer.java +++ b/flow-data/src/main/java/com/vaadin/flow/data/renderer/ComponentRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 Vaadin Ltd. + * Copyright 2000-2018 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -37,7 +37,8 @@ * for components that uses {@code