├── .github ├── dependabot.yml └── workflows │ ├── deploy-classifiers.yml │ ├── release.yaml │ ├── validation-latest-versions.yml │ ├── validation-nightly.yml │ └── validation.yml ├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── LICENSE ├── README.md ├── checkstyle ├── checkstyle.xml ├── license.txt └── suppressions.xml ├── license ├── MIT.txt └── java-license-header ├── mvnw ├── mvnw.cmd ├── pom.xml ├── tools ├── build_flow_widgetsets.sh └── release_flow.sh ├── vaadin-flow-sockjs ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── mcollovati │ │ └── vertx │ │ └── vaadin │ │ └── sockjs │ │ ├── client │ │ └── SockJSPushConnection.java │ │ └── communication │ │ ├── PushException.java │ │ ├── PushSocket.java │ │ ├── SockJSPushConnection.java │ │ └── SockJSPushConnectionFactory.java │ └── resources │ ├── META-INF │ ├── resources │ │ └── VAADIN │ │ │ └── static │ │ │ └── push │ │ │ └── vaadinPushSockJS.js │ └── services │ │ └── com.vaadin.flow.server.communication.PushConnectionFactory │ └── com │ └── github │ └── mcollovati │ └── vertx │ └── vaadin │ └── sockjs │ ├── SockjsClientEngine.gwt.xml │ └── SockjsClientEngineXSI.gwt.xml ├── vertx-vaadin-flow-jandex └── pom.xml ├── vertx-vaadin-flow ├── README.md ├── frontend │ ├── generated │ │ ├── index.ts │ │ ├── vaadin-featureflags.ts │ │ └── vite-devmode.ts │ └── index.html ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── github │ │ │ └── mcollovati │ │ │ └── vertx │ │ │ ├── Sync.java │ │ │ ├── http │ │ │ ├── HttpReverseProxy.java │ │ │ └── HttpServerResponseWrapper.java │ │ │ ├── support │ │ │ ├── BufferInputStreamAdapter.java │ │ │ ├── HillaWorkAround.java │ │ │ ├── StartupContext.java │ │ │ └── VaadinPatches.java │ │ │ ├── vaadin │ │ │ ├── CookieUtils.java │ │ │ ├── HttpUtils.java │ │ │ ├── UIProxy.java │ │ │ ├── VaadinOptions.java │ │ │ ├── VaadinVerticle.java │ │ │ ├── VaadinVerticleConfiguration.java │ │ │ ├── VertxBootstrapHandler.java │ │ │ ├── VertxLookupInitializer.java │ │ │ ├── VertxStaticFileServer.java │ │ │ ├── VertxUI.java │ │ │ ├── VertxVaadin.java │ │ │ ├── VertxVaadinBrowserLiveReload.java │ │ │ ├── VertxVaadinConfig.java │ │ │ ├── VertxVaadinContext.java │ │ │ ├── VertxVaadinInstantiator.java │ │ │ ├── VertxVaadinRequest.java │ │ │ ├── VertxVaadinResponse.java │ │ │ ├── VertxVaadinService.java │ │ │ ├── VertxVaadinSession.java │ │ │ ├── VertxWrappedSession.java │ │ │ ├── communication │ │ │ │ ├── RequestHandlerReplacements.java │ │ │ │ ├── StreamReceiverHandler.java │ │ │ │ ├── StreamResourceHandler.java │ │ │ │ ├── VertxDebugWindowConnection.java │ │ │ │ ├── VertxIndexHtmlRequestHandler.java │ │ │ │ ├── VertxJavaScriptBootstrapHandler.java │ │ │ │ ├── VertxStreamRequestHandler.java │ │ │ │ ├── VertxUidlRequestHandler.java │ │ │ │ └── VertxWebComponentBootstrapHandler.java │ │ │ ├── connect │ │ │ │ ├── BaseVaadinConnectEndpointService.java │ │ │ │ ├── DefaultVaadinConnectResponse.java │ │ │ │ ├── EndpointServiceContext.java │ │ │ │ ├── EndpointServiceContextSupport.java │ │ │ │ ├── VaadinConnectEndpointService.java │ │ │ │ ├── VaadinConnectHandler.java │ │ │ │ ├── VaadinConnectResponse.java │ │ │ │ ├── VaadinEndpointRegistry.java │ │ │ │ ├── VertxConnectRequestContext.java │ │ │ │ ├── VertxEndpointRegistry.java │ │ │ │ ├── VertxEndpointRegistryInitializer.java │ │ │ │ ├── VertxVaadinConnectEndpointService.java │ │ │ │ └── auth │ │ │ │ │ ├── AccessAnnotationChecker.java │ │ │ │ │ ├── CsrfChecker.java │ │ │ │ │ ├── UserAwareRequest.java │ │ │ │ │ ├── VaadinConnectAccessChecker.java │ │ │ │ │ ├── VaadinConnectAccessCheckerSupport.java │ │ │ │ │ ├── VertxAccessAnnotationChecker.java │ │ │ │ │ ├── VertxCsrfChecker.java │ │ │ │ │ └── VertxVaadinConnectAccessChecker.java │ │ │ ├── devserver │ │ │ │ ├── DevServerWebSocketProxy.java │ │ │ │ └── VertxDevModeHandlerManager.java │ │ │ └── sockjs │ │ │ │ └── communication │ │ │ │ ├── ShareableSockJsSocket.java │ │ │ │ ├── SockJSPushHandler.java │ │ │ │ └── VertxVaadinLiveReload.java │ │ │ └── web │ │ │ ├── ExtendedSession.java │ │ │ ├── ExtendedSessionImpl.java │ │ │ ├── serialization │ │ │ ├── SerializableHolder.java │ │ │ └── SerializationSupport.java │ │ │ └── sstore │ │ │ ├── ExtendedLocalSessionStore.java │ │ │ ├── ExtendedLocalSessionStoreImpl.java │ │ │ ├── ExtendedSessionStore.java │ │ │ ├── NearCacheSessionStore.java │ │ │ └── NearCacheSessionStoreImpl.java │ └── resources │ │ └── com │ │ └── github │ │ └── mcollovati │ │ └── vertx │ │ └── vaadin │ │ └── version.properties │ └── test │ ├── java │ └── com │ │ └── github │ │ └── mcollovati │ │ ├── failures │ │ └── lookup │ │ │ ├── FakeLookupInitializer.java │ │ │ └── FakeLookupInitializer2.java │ │ └── vertx │ │ ├── support │ │ ├── HillaWorkAroundUT.java │ │ └── VaadinPatchesTest.java │ │ ├── utils │ │ ├── ClassGraphTest.java │ │ ├── MockDeploymentConfiguration.java │ │ ├── MockServiceSessionSetup.java │ │ ├── MockVaadinContext.java │ │ └── RandomStringGenerator.java │ │ ├── vaadin │ │ ├── SessionStoreAdapterIT.java │ │ ├── StartupContextTest.java │ │ ├── TestUtil.java │ │ ├── VaadinVerticleUT.java │ │ ├── VertxStaticFileServerTest.java │ │ ├── VertxVaadinContextTest.java │ │ ├── VertxVaadinRequestUT.java │ │ ├── VertxVaadinResponseUT.java │ │ ├── VertxVaadinServiceUT.java │ │ ├── VertxWrappedSessionUT.java │ │ ├── VertxWrappedSessionWithClusteredSessionStoreUT.java │ │ ├── VertxWrappedSessionWithLocalSessionStoreUT.java │ │ ├── connect │ │ │ ├── VertxVaadinConnectEndpointServiceTest.java │ │ │ ├── auth │ │ │ │ ├── VertxAccessAnnotationCheckerTest.java │ │ │ │ └── VertxConnectAccessCheckerTest.java │ │ │ ├── generator │ │ │ │ └── endpoints │ │ │ │ │ └── superclassmethods │ │ │ │ │ ├── CrudEndpoint.java │ │ │ │ │ ├── NonEndpoint.java │ │ │ │ │ ├── NonEndpointImpl.java │ │ │ │ │ ├── PagedData.java │ │ │ │ │ ├── PersonEndpoint.java │ │ │ │ │ └── ReadOnlyEndpoint.java │ │ │ ├── rest │ │ │ │ ├── BeanWithJacksonAnnotation.java │ │ │ │ ├── BeanWithPrivateFields.java │ │ │ │ ├── EndpointWithVertxHandlerTest.java │ │ │ │ └── VaadinConnectEndpoints.java │ │ │ └── testendpoint │ │ │ │ └── BridgeMethodTestEndpoint.java │ │ └── startup │ │ │ └── testdata │ │ │ ├── AnotherTestInstantiatorFactory.java │ │ │ ├── OneMoreTestInstantiatorFactory.java │ │ │ ├── TestInstantiatorFactory.java │ │ │ └── TestResourceProvider.java │ │ └── web │ │ └── sstore │ │ ├── ExtendedSessionUT.java │ │ └── NearCacheSessionStoreIT.java │ └── resources │ ├── META-INF │ ├── VAADIN │ │ ├── config │ │ │ ├── flow-build-info.json │ │ │ ├── stats.json │ │ │ └── stats_no_export.json │ │ └── webapp │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ └── sw.js │ ├── resources │ │ ├── VAADIN │ │ │ └── static │ │ │ │ └── client │ │ │ │ └── compile.properties │ │ └── icons │ │ │ └── icon.png │ └── services │ │ └── com.vaadin.flow.di.InstantiatorFactory │ ├── frontend │ ├── index.html │ ├── my-lit-element-view.js │ └── web-component.html │ └── logback-test.xml ├── vertx-vaadin-quarkus-extension ├── deployment │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── github │ │ └── mcollovati │ │ └── vertx │ │ └── vaadin │ │ └── extension │ │ └── deployment │ │ └── VertxVaadinExtensionProcessor.java ├── integration-tests │ ├── common-test-code │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── github │ │ │ │ │ └── mcollovati │ │ │ │ │ └── vertx │ │ │ │ │ └── vaadin │ │ │ │ │ └── quarkus │ │ │ │ │ └── it │ │ │ │ │ ├── AppShellConfig.java │ │ │ │ │ ├── Counter.java │ │ │ │ │ ├── HelloProvider.java │ │ │ │ │ ├── SmokeTestView.java │ │ │ │ │ ├── TestVerticle.java │ │ │ │ │ ├── TestVerticleDeployer.java │ │ │ │ │ ├── addons │ │ │ │ │ └── AddonsView.java │ │ │ │ │ ├── push │ │ │ │ │ └── PushUpdateDivView.java │ │ │ │ │ ├── regression │ │ │ │ │ └── RemoveOldContentView.java │ │ │ │ │ ├── routecontext │ │ │ │ │ ├── AbstractCountedBean.java │ │ │ │ │ ├── AbstractCountedView.java │ │ │ │ │ ├── ApartBean.java │ │ │ │ │ ├── AssignedBean.java │ │ │ │ │ ├── BeanNoOwner.java │ │ │ │ │ ├── ChildNoOwnerView.java │ │ │ │ │ ├── CountedPerUI.java │ │ │ │ │ ├── CustomException.java │ │ │ │ │ ├── DetailApartView.java │ │ │ │ │ ├── DetailAssignedView.java │ │ │ │ │ ├── ErrorHandlerView.java │ │ │ │ │ ├── ErrorParentView.java │ │ │ │ │ ├── ErrorView.java │ │ │ │ │ ├── EventView.java │ │ │ │ │ ├── InvalidView.java │ │ │ │ │ ├── MainLayout.java │ │ │ │ │ ├── MasterView.java │ │ │ │ │ ├── ParentNoOwnerView.java │ │ │ │ │ ├── PostponeView.java │ │ │ │ │ ├── PreserveOnRefreshBean.java │ │ │ │ │ ├── PreserveOnRefreshView.java │ │ │ │ │ ├── RerouteView.java │ │ │ │ │ └── RootView.java │ │ │ │ │ ├── service │ │ │ │ │ ├── BootstrapCustomizeView.java │ │ │ │ │ ├── BootstrapCustomizer.java │ │ │ │ │ ├── EventObserver.java │ │ │ │ │ ├── ServiceBean.java │ │ │ │ │ ├── ServiceView.java │ │ │ │ │ ├── TestErrorHandler.java │ │ │ │ │ └── TestSystemMessagesProvider.java │ │ │ │ │ ├── sessioncontext │ │ │ │ │ └── SessionContextView.java │ │ │ │ │ ├── uicontext │ │ │ │ │ ├── UIContextRootView.java │ │ │ │ │ ├── UINormalScopedBeanView.java │ │ │ │ │ ├── UIScopeInjecterView.java │ │ │ │ │ ├── UIScopedBean.java │ │ │ │ │ ├── UIScopedLabel.java │ │ │ │ │ └── UIScopedView.java │ │ │ │ │ └── uievents │ │ │ │ │ ├── NavigationObserver.java │ │ │ │ │ └── UIEventsView.java │ │ │ └── resources │ │ │ │ └── application.properties │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── github │ │ │ └── mcollovati │ │ │ └── vertx │ │ │ └── vaadin │ │ │ └── quarkus │ │ │ └── it │ │ │ ├── AbstractCdiIT.java │ │ │ ├── AbstractChromeIT.java │ │ │ ├── AddonsIT.java │ │ │ ├── PushSmokeIT.java │ │ │ ├── RemoveOldContentIT.java │ │ │ ├── RouteContextIT.java │ │ │ ├── ScreenshotsOnFailureExtension.java │ │ │ ├── ServiceIT.java │ │ │ ├── SessionContextCloseIT.java │ │ │ ├── SessionContextIT.java │ │ │ ├── SmokeTestIT.java │ │ │ ├── UIContextIT.java │ │ │ └── UIEventsIT.java │ ├── development │ │ ├── frontend │ │ │ └── index.html │ │ └── pom.xml │ ├── pom.xml │ ├── production │ │ ├── frontend │ │ │ ├── index.html │ │ │ └── my.css │ │ └── pom.xml │ ├── reusable-theme │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── resources │ │ │ └── themes │ │ │ └── reusable-theme │ │ │ └── styles.css │ └── test-addons │ │ ├── addon-with-jandex │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── org │ │ │ │ └── vaadin │ │ │ │ └── jandex │ │ │ │ └── HelloWorldJandex.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── frontend │ │ │ └── src │ │ │ └── hello-world-jandex.ts │ │ └── addon-without-jandex │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── vaadin │ │ │ └── nojandex │ │ │ └── HelloWorld.java │ │ └── resources │ │ └── META-INF │ │ └── frontend │ │ └── src │ │ └── hello-world.ts ├── pom.xml └── runtime │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── github │ │ │ └── mcollovati │ │ │ └── vertx │ │ │ └── quarkus │ │ │ ├── AnyLiteral.java │ │ │ ├── BeanLookup.java │ │ │ ├── QuarkusInstantiator.java │ │ │ ├── QuarkusInstantiatorFactory.java │ │ │ ├── QuarkusResourceProvider.java │ │ │ ├── QuarkusVaadinVerticle.java │ │ │ ├── QuarkusVertxVaadin.java │ │ │ ├── QuarkusVertxVaadinService.java │ │ │ ├── VaadinVerticleConfigurer.java │ │ │ ├── VaadinVerticleDeployer.java │ │ │ ├── annotation │ │ │ ├── NormalRouteScoped.java │ │ │ ├── NormalUIScoped.java │ │ │ ├── RouteScopeOwner.java │ │ │ ├── RouteScoped.java │ │ │ ├── UIScoped.java │ │ │ ├── VaadinServiceEnabled.java │ │ │ ├── VaadinServiceScoped.java │ │ │ └── VaadinSessionScoped.java │ │ │ └── context │ │ │ ├── AbstractContext.java │ │ │ ├── AbstractContextualStorageManager.java │ │ │ ├── BeanProvider.java │ │ │ ├── ContextUtils.java │ │ │ ├── ContextualInstanceInfo.java │ │ │ ├── ContextualStorage.java │ │ │ ├── RouteContextWrapper.java │ │ │ ├── RouteScopedContext.java │ │ │ ├── UIContextWrapper.java │ │ │ ├── UIScopedContext.java │ │ │ ├── VaadinServiceScopedContext.java │ │ │ └── VaadinSessionScopedContext.java │ └── resources │ │ ├── META-INF │ │ ├── beans.xml │ │ └── quarkus-extension.yaml │ │ └── application.properties │ └── test │ ├── java │ └── com │ │ └── github │ │ └── mcollovati │ │ └── vertx │ │ └── quarkus │ │ ├── NoOpVaadinVerticle.java │ │ ├── ResourceProviderTest.java │ │ ├── TestQuarkusVertxVaadinServletService.java │ │ └── context │ │ ├── AbstractContextTest.java │ │ ├── BeanManagerProxy.java │ │ ├── InjectableContextTest.java │ │ ├── RouteContextTest.java │ │ ├── RouteContextWithinDifferentUITest.java │ │ ├── RouteContextWrapperTest.java │ │ ├── RouteContextWrapperWithinDifferentUITest.java │ │ ├── RouteContextualStorageManagerTest.java │ │ ├── RouteUnderTestContext.java │ │ ├── ServiceContextTest.java │ │ ├── ServiceUnderTestContext.java │ │ ├── SessionContextTest.java │ │ ├── SessionUnderTestContext.java │ │ ├── TestBean.java │ │ ├── TestContextualStorageManager.java │ │ ├── TestHasElement.java │ │ ├── TestNavigationTarget.java │ │ ├── TestRouteScopedContext.java │ │ ├── UIUnderTestContext.java │ │ ├── UiContextTest.java │ │ ├── UiPseudoScopeContextTest.java │ │ └── UnderTestContext.java │ └── resources │ └── resource-provider │ └── some-resource.json └── vertx-vaadin-tests ├── .gitignore ├── drivers.xml ├── pom.xml ├── test-common ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── vaadin │ │ └── flow │ │ └── uitest │ │ ├── ui │ │ ├── AbstractDivView.java │ │ └── dependencies │ │ │ └── DependenciesLoadingBaseView.java │ │ └── vertx │ │ ├── ProductionModeTimingDataViewTestServlet.java │ │ ├── ProductionModeViewTestServlet.java │ │ ├── RouterTestServlet.java │ │ ├── TestBootVerticle.java │ │ ├── ViewClassLocator.java │ │ ├── ViewTestLayout.java │ │ ├── ViewTestServlet.java │ │ └── WebJarsServlet.java │ └── resources │ └── simplelogger.properties ├── test-frontend ├── addon-with-templates │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── vaadin │ │ │ └── example │ │ │ └── addon │ │ │ └── AddonLitComponent.java │ │ └── resources │ │ └── META-INF │ │ └── frontend │ │ └── AddonLitComponent.ts ├── frontend │ └── index.html ├── pom.xml ├── test-npm │ ├── README.md │ ├── frontend │ │ ├── index.html │ │ └── my-component.js │ ├── pom-production.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── vaadin │ │ │ │ └── flow │ │ │ │ └── mixedtest │ │ │ │ └── ui │ │ │ │ ├── IdTestView.java │ │ │ │ └── MissingDependenciesView.java │ │ └── resources │ │ │ └── vaadin-featureflags.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── vaadin │ │ └── flow │ │ └── mixedtest │ │ └── ui │ │ ├── IdTestIT.java │ │ └── NpmUsedIT.java ├── test-pnpm │ ├── .npmrc │ ├── .pnpmfile.cjs │ ├── README.md │ ├── frontend │ │ ├── index.html │ │ └── my-component.js │ ├── pom-production.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── vaadin │ │ │ │ └── flow │ │ │ │ └── mixedtest │ │ │ │ └── ui │ │ │ │ ├── IdTestView.java │ │ │ │ └── MissingDependenciesView.java │ │ └── resources │ │ │ └── vaadin-featureflags.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── vaadin │ │ └── flow │ │ └── mixedtest │ │ └── ui │ │ ├── IdTestIT.java │ │ └── PnpmUsedIT.java ├── vite-basics │ ├── .npmrc │ ├── frontend │ │ ├── a-directory │ │ │ └── index.js │ │ ├── cssimport-textfield.css │ │ ├── cssimport.css │ │ ├── importdir.js │ │ ├── index.html │ │ ├── jsonloader.js │ │ ├── my.json │ │ ├── testscopebuttonloader.js │ │ ├── testscopemaploader.js │ │ └── themes │ │ │ └── vite-basics │ │ │ ├── images │ │ │ └── plant.png │ │ │ ├── styles.css │ │ │ └── theme.json │ ├── package.json │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── vaadin │ │ │ │ └── viteapp │ │ │ │ ├── AppShell.java │ │ │ │ └── views │ │ │ │ └── empty │ │ │ │ └── MainView.java │ │ └── test │ │ │ ├── conf │ │ │ └── vertx-vaadin-test.conf │ │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ ├── BasicsIT.java │ │ │ ├── BundlesIT.java │ │ │ ├── ExternalPackageIT.java │ │ │ ├── FileAccessIT.java │ │ │ ├── PostinstallIT.java │ │ │ ├── ThemeIT.java │ │ │ ├── ThemeReloadIT.java │ │ │ └── ViteDevModeIT.java │ ├── tsconfig.json │ ├── types.d.ts │ └── vite.config.ts ├── vite-context-path │ ├── .npmrc │ ├── .pnpmfile.cjs │ ├── frontend │ │ ├── index.html │ │ └── themes │ │ │ └── vite-context-path │ │ │ ├── styles.css │ │ │ └── theme.json │ ├── pom-production.xml │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── vaadin │ │ │ │ └── viteapp │ │ │ │ ├── AppShell.java │ │ │ │ └── views │ │ │ │ └── empty │ │ │ │ └── MainView.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ ├── BundlesIT.java │ │ │ └── ContextPathIT.java │ ├── tsconfig.json │ ├── types.d.ts │ └── vite.config.ts ├── vite-embedded │ ├── .gitignore │ ├── .npmrc │ ├── .pnpmfile.cjs │ ├── frontend │ │ ├── index.html │ │ ├── themes │ │ │ └── my-theme │ │ │ │ └── styles.css │ │ └── web-component.html │ ├── pom-production.xml │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── vaadin │ │ │ │ │ └── viteapp │ │ │ │ │ ├── BasicComponent.java │ │ │ │ │ └── PushComponent.java │ │ │ └── webapp │ │ │ │ ├── basic-component.html │ │ │ │ └── push-component.html │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ ├── BasicComponentIT.java │ │ │ └── PushComponentIT.java │ ├── tsconfig.json │ └── types.d.ts ├── vite-production-custom-frontend │ ├── frontend-custom │ │ └── lit-templates │ │ │ └── test-form.js │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ ├── AppShell.java │ │ │ ├── littemplate │ │ │ └── TestForm.java │ │ │ └── view │ │ │ └── TestView.java │ │ └── test │ │ └── java │ │ └── com │ │ └── vaadin │ │ └── viteapp │ │ └── ProductionBasicsIT.java ├── vite-production │ ├── .npmrc │ ├── .pnpmfile.cjs │ ├── frontend │ │ ├── image.css │ │ ├── index.html │ │ ├── themes │ │ │ └── vite-production │ │ │ │ ├── images │ │ │ │ └── plant.png │ │ │ │ ├── styles.css │ │ │ │ └── theme.json │ │ └── yes.png │ ├── package-lock.json │ ├── package.json │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── vaadin │ │ │ │ └── viteapp │ │ │ │ ├── AppShell.java │ │ │ │ └── views │ │ │ │ └── empty │ │ │ │ └── MainView.java │ │ └── test │ │ │ ├── conf │ │ │ └── vertx-vaadin-test.conf │ │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ ├── BundlesIT.java │ │ │ ├── CompressionIT.java │ │ │ ├── ExternalPackageIT.java │ │ │ └── ProductionBasicsIT.java │ ├── tsconfig.json │ ├── types.d.ts │ └── vite.config.ts ├── vite-pwa-custom-offline-path │ ├── .npmrc │ ├── .pnpmfile.cjs │ ├── frontend │ │ └── index.html │ ├── pom-production.xml │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── vaadin │ │ │ │ │ └── viteapp │ │ │ │ │ ├── AppShell.java │ │ │ │ │ └── MainView.java │ │ │ └── webapp │ │ │ │ └── offline.html │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ └── MainIT.java │ ├── tsconfig.json │ └── types.d.ts ├── vite-pwa-disabled-offline │ ├── .npmrc │ ├── .pnpmfile.cjs │ ├── frontend │ │ └── index.html │ ├── pom-production.xml │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── vaadin │ │ │ │ │ └── viteapp │ │ │ │ │ ├── AppShell.java │ │ │ │ │ ├── ApplicationServiceInitListener.java │ │ │ │ │ └── MainView.java │ │ │ └── resources │ │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── com.vaadin.flow.server.VaadinServiceInitListener │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ └── MainIT.java │ ├── tsconfig.json │ └── types.d.ts ├── vite-pwa-production │ ├── .gitignore │ ├── .npmrc │ ├── .pnpmfile.cjs │ ├── frontend │ │ ├── about-view.ts │ │ ├── home-view.ts │ │ ├── index.html │ │ ├── index.ts │ │ └── themes │ │ │ └── my-theme │ │ │ ├── fonts │ │ │ └── Roboto-Regular.woff │ │ │ ├── images │ │ │ └── bg.jpeg │ │ │ └── styles.css │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── vaadin │ │ │ │ └── viteapp │ │ │ │ ├── AppShell.java │ │ │ │ └── MainView.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ └── MainIT.java │ ├── tsconfig.json │ └── types.d.ts ├── vite-pwa │ ├── .gitignore │ ├── .npmrc │ ├── .pnpmfile.cjs │ ├── frontend │ │ ├── about-view.ts │ │ ├── home-view.css │ │ ├── home-view.ts │ │ ├── index.html │ │ ├── index.ts │ │ └── themes │ │ │ └── my-theme │ │ │ ├── fonts │ │ │ └── Roboto-Regular.woff │ │ │ ├── images │ │ │ └── bg.jpeg │ │ │ └── styles.css │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── vaadin │ │ │ │ └── viteapp │ │ │ │ ├── AppShell.java │ │ │ │ └── MainView.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── vaadin │ │ │ └── viteapp │ │ │ └── MainIT.java │ ├── tsconfig.json │ └── types.d.ts └── vite-test-assets │ ├── .gitignore │ ├── packages │ ├── @testscope │ │ ├── all │ │ │ ├── all.js │ │ │ └── package.json │ │ ├── button │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ └── testscope-button.js │ │ │ └── testscope-button.js │ │ └── map │ │ │ ├── package.json │ │ │ ├── src │ │ │ ├── lib.js │ │ │ └── testscope-map.js │ │ │ └── testscope-map.js │ ├── @vaadin │ │ ├── bundles-old │ │ │ ├── package.json │ │ │ ├── vaadin-bundle.json │ │ │ └── vaadin.js │ │ └── bundles │ │ │ ├── package.json │ │ │ ├── vaadin-bundle.json │ │ │ └── vaadin.js │ ├── package-outside-npm │ │ ├── index.js │ │ └── package.json │ └── package2-outside-npm │ │ ├── index.js │ │ └── package.json │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── vaadin │ │ │ ├── flow │ │ │ └── uitest │ │ │ │ └── vertx │ │ │ │ └── TestBootVerticle.java │ │ │ └── viteapp │ │ │ └── views │ │ │ └── template │ │ │ ├── LitComponent.java │ │ │ ├── PolymerComponent.java │ │ │ ├── ReflectivelyReferencedComponent.java │ │ │ └── TemplateView.java │ └── resources │ │ └── META-INF │ │ └── frontend │ │ ├── bad.ts │ │ └── templates │ │ ├── LitComponent.ts │ │ ├── PolymerComponent.ts │ │ └── ReflectivelyReferencedComponent.ts │ └── test │ └── java │ └── com │ └── vaadin │ └── viteapp │ └── TemplateIT.java ├── test-lumo ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── vaadin │ │ └── flow │ │ └── theme │ │ └── lumo │ │ └── Lumo.java │ └── resources │ └── META-INF │ └── resources │ └── frontend │ └── lumo-includes.ts ├── test-resources ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── vaadin │ │ └── flow │ │ └── uitest │ │ └── ui │ │ └── dependencies │ │ ├── TestVersion.java │ │ └── ThemableTextField.java │ └── resources │ ├── META-INF │ └── resources │ │ └── test-files │ │ ├── css │ │ ├── allblueimportant.css │ │ └── allred.css │ │ ├── html │ │ ├── combinedMixed.html │ │ ├── htmlimport1.html │ │ ├── htmlimport2.html │ │ ├── htmlimport4-js.js │ │ ├── htmlimport4.html │ │ ├── mixedImport1.html │ │ ├── mixedImport2.html │ │ └── orderedHtmlImport.html │ │ └── js │ │ ├── body-click-listener.js │ │ ├── read-global-var.js │ │ ├── script1.js │ │ ├── script2.js │ │ └── set-global-var.js │ └── simplelogger.properties ├── test-root-context ├── .gitignore ├── frontend │ ├── AfterServerChanges.js │ ├── AttachExistingDomElementById.js │ ├── BasicTypeList.js │ ├── BeanInListing.js │ ├── ChangeInjectedComponentTextView.js │ ├── ChildIdTemplate.js │ ├── ChildOrderTemplate.js │ ├── ChildTemplate.js │ ├── ClearList.js │ ├── ClearNodeChildren.js │ ├── ClientUpdateMode.js │ ├── ConvertToBean.js │ ├── DomListenerOnAttach.js │ ├── DomRepeatPolymerTemplate.js │ ├── ElementInitOrder.js │ ├── EmptyLists.js │ ├── EventHandler.js │ ├── ExceptionsDuringPropertyUpdates.js │ ├── HiddenTemplate.js │ ├── InjectScriptTagTemplate.js │ ├── InjectedChild.js │ ├── InjectsJsTemplate.js │ ├── JsGrandParent.js │ ├── JsInjectedElement.js │ ├── JsInjectedGrandChild.js │ ├── JsSubTemplate.js │ ├── ListBinding.js │ ├── ListInsideListBinding.js │ ├── MixinInjectsElement.js │ ├── ModelList.js │ ├── MultiplePropsMutation.js │ ├── OneWayPolymerBinding.js │ ├── ParentIdTemplate.js │ ├── ParentTemplate.js │ ├── ParentTemplateInjectChild.js │ ├── PolymerDefaultPropertyValue.js │ ├── PolymerModelProperties.js │ ├── PolymerPropertyChange.js │ ├── PolymerPropertyMutationInObserver.js │ ├── PropertiesUpdatedBeforeChangeEvents.js │ ├── ServerModelNullList.js │ ├── ServerRequest.js │ ├── SubPropertyModel.js │ ├── TemplateMappingDetector.js │ ├── TemplateMappingDetectorParent.js │ ├── TemplateProperties.js │ ├── TemplateWithConnectedCallbacks.js │ ├── TemplateWithInjectedId.js │ ├── TwoWayListBinding.js │ ├── TwoWayPolymerBinding.js │ ├── UpdatableModelProperties.js │ ├── UpgradeElement.js │ ├── com │ │ └── vaadin │ │ │ └── flow │ │ │ └── uitest │ │ │ └── ui │ │ │ ├── CustomCustomElement.js │ │ │ └── dependencies │ │ │ ├── eager.js │ │ │ ├── inline.js │ │ │ └── lazy.js │ ├── components │ │ ├── context-inline.js │ │ └── frontend-inline.js │ ├── dependencies │ │ ├── eager-module.js │ │ ├── eager.css │ │ ├── eager.js │ │ ├── inline.css │ │ ├── inline.js │ │ ├── lazy.css │ │ └── lazy.js │ ├── divConnector.js │ ├── in-memory-connector.js │ ├── index.html │ ├── index.ts │ ├── js-get-by-id.js │ ├── template-scalability-panel.js │ ├── template-scalability-view.js │ ├── template-without-shadow-root-view.js │ └── x-lazy-widget.js ├── pom.xml ├── reference-screenshots │ └── .gitkeep └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── vaadin │ │ │ └── flow │ │ │ ├── InitialExtendedClientDetailsView.java │ │ │ ├── TestAppShell.java │ │ │ ├── TestPush.java │ │ │ ├── VerifyBrowserVersionView.java │ │ │ └── uitest │ │ │ ├── MyException.java │ │ │ └── ui │ │ │ ├── AbstractDebounceSynchronizeView.java │ │ │ ├── AbstractErrorHandlerView.java │ │ │ ├── AbstractPushUpdateDivView.java │ │ │ ├── AttachExistingElementView.java │ │ │ ├── AttachListenerView.java │ │ │ ├── BackButtonServerRoundTripView.java │ │ │ ├── BaseHrefView.java │ │ │ ├── BasicComponentView.java │ │ │ ├── BasicElementView.java │ │ │ ├── BodyScrollView.java │ │ │ ├── BrowserWindowResizeView.java │ │ │ ├── CallFunctionBeforeRemoveView.java │ │ │ ├── CompositeNestedView.java │ │ │ ├── CompositeView.java │ │ │ ├── CountUIsView.java │ │ │ ├── CustomCustomElementView.java │ │ │ ├── DebounceSynchronizePropertyView.java │ │ │ ├── DnDAttachDetachView.java │ │ │ ├── DnDCustomComponentView.java │ │ │ ├── DnDView.java │ │ │ ├── DomEventFilterView.java │ │ │ ├── DomListenerOnAttachView.java │ │ │ ├── DynamicTitleView.java │ │ │ ├── DynamicallyRegisteredRoute.java │ │ │ ├── ElementInitOrderView.java │ │ │ ├── ElementInnerHtmlView.java │ │ │ ├── ElementRemoveItselfView.java │ │ │ ├── ElementStyleView.java │ │ │ ├── EnabledView.java │ │ │ ├── ErrorHandlingView.java │ │ │ ├── EventListenersView.java │ │ │ ├── ExceptionDuringMapSyncView.java │ │ │ ├── ExecJavaScriptView.java │ │ │ ├── ExtendedClientDetailsView.java │ │ │ ├── ForwardToView.java │ │ │ ├── FragmentLinkView.java │ │ │ ├── FragmentLinkView2.java │ │ │ ├── HasUrlParameterErrorView.java │ │ │ ├── HistoryView.java │ │ │ ├── ImageClickView.java │ │ │ ├── InMemoryChildrenView.java │ │ │ ├── InternalErrorView.java │ │ │ ├── JavaScriptReturnValueView.java │ │ │ ├── JsApiGetByIdView.java │ │ │ ├── KeyboardEventView.java │ │ │ ├── LoadingIndicatorView.java │ │ │ ├── LongPollingMultipleThreadsView.java │ │ │ ├── LongPollingPushView.java │ │ │ ├── MyExceptionHandler.java │ │ │ ├── NavigationTriggerView.java │ │ │ ├── PageView.java │ │ │ ├── PopStateHandlerView.java │ │ │ ├── PostponeProceedView.java │ │ │ ├── PreserveOnRefreshView.java │ │ │ ├── PushLongPollingUpdateDivView.java │ │ │ ├── PushSettingsView.java │ │ │ ├── PushWSUpdateDivView.java │ │ │ ├── RequestParametersHistoryView.java │ │ │ ├── RequestParametersView.java │ │ │ ├── RerouteView.java │ │ │ ├── ResynchronizationView.java │ │ │ ├── ReturnChannelView.java │ │ │ ├── RouterLinkView.java │ │ │ ├── ScriptInjectView.java │ │ │ ├── SerializeUIView.java │ │ │ ├── ServiceInitListenersView.java │ │ │ ├── SessionCloseLogoutView.java │ │ │ ├── SetParameterForwardToView.java │ │ │ ├── ShadowRootView.java │ │ │ ├── ShortcutsView.java │ │ │ ├── StaticHtmlView.java │ │ │ ├── StreamResourceView.java │ │ │ ├── SynchronizedPropertyView.java │ │ │ ├── TestingServiceInitListener.java │ │ │ ├── TimingInfoReportedView.java │ │ │ ├── TitleView.java │ │ │ ├── UIElementView.java │ │ │ ├── ValueChangeModeView.java │ │ │ ├── VisibilityView.java │ │ │ ├── WaitForVaadinView.java │ │ │ ├── WebComponentsView.java │ │ │ ├── dependencies │ │ │ ├── AnnotatedFrontendInlineView.java │ │ │ ├── ComponentWithExternalJavaScript.java │ │ │ ├── DependenciesLoadingAnnotationsView.java │ │ │ ├── DependenciesLoadingPageApiView.java │ │ │ ├── DynamicDependencyView.java │ │ │ └── ExternalJavaScriptView.java │ │ │ ├── frontend │ │ │ └── UsageStatisticsView.java │ │ │ ├── routing │ │ │ ├── ForwardPage.java │ │ │ ├── ISEHandler.java │ │ │ ├── ISELayout.java │ │ │ ├── ISETargetView.java │ │ │ ├── NPEHandler.java │ │ │ ├── NPETargetView.java │ │ │ ├── PushLayout.java │ │ │ └── PushRouteNotFoundView.java │ │ │ ├── scroll │ │ │ ├── CustomScrollCallbacksView.java │ │ │ ├── LongToOpenView.java │ │ │ ├── MultipleAnchorsView.java │ │ │ ├── PushStateScrollView.java │ │ │ ├── ScrollView.java │ │ │ └── ServerRequestScrollView.java │ │ │ ├── template │ │ │ ├── AfterServerChangesView.java │ │ │ ├── AttachExistingDomElementByIdView.java │ │ │ ├── BasicTypeInListView.java │ │ │ ├── BeanInListingView.java │ │ │ ├── ChangeInjectedComponentTextView.java │ │ │ ├── ChildOrderView.java │ │ │ ├── ClearNodeChildrenView.java │ │ │ ├── ClientUpdateModeView.java │ │ │ ├── ConvertToBeanView.java │ │ │ ├── DomRepeatView.java │ │ │ ├── EmptyListsView.java │ │ │ ├── EventHandlerView.java │ │ │ ├── ExceptionsDuringPropertyUpdatesView.java │ │ │ ├── HiddenTemplateView.java │ │ │ ├── InjectScriptTagView.java │ │ │ ├── InjectedElementInsideMixinBehaviorView.java │ │ │ ├── InjectsJsTemplateView.java │ │ │ ├── InvisibleDefaultPropertyValueView.java │ │ │ ├── JsGrandParentView.java │ │ │ ├── JsInjectedDiv.java │ │ │ ├── JsInjectedElement.java │ │ │ ├── JsInjectedGrandChild.java │ │ │ ├── JsSubTemplate.java │ │ │ ├── Message.java │ │ │ ├── MutationSeveralSyncedPropsView.java │ │ │ ├── OneWayPolymerBindingView.java │ │ │ ├── Person.java │ │ │ ├── PolymerDefaultPropertyValue.java │ │ │ ├── PolymerDefaultPropertyValueView.java │ │ │ ├── PolymerModelPropertiesView.java │ │ │ ├── PolymerPropertiesView.java │ │ │ ├── PolymerPropertyChangeEventView.java │ │ │ ├── PolymerPropertyMutationInObserverView.java │ │ │ ├── PropertiesUpdatedBeforeChangeEventsView.java │ │ │ ├── RestoreViewWithAttachedByIdView.java │ │ │ ├── SubPropertyModelTemplate.java │ │ │ ├── SubPropertyModelView.java │ │ │ ├── TemplateHasInjectedSubTemplateView.java │ │ │ ├── TemplateInTemplateView.java │ │ │ ├── TemplateInTemplateWithIdView.java │ │ │ ├── TemplateMappingDetectorView.java │ │ │ ├── TemplateScalabilityPanel.java │ │ │ ├── TemplateScalabilityView.java │ │ │ ├── TemplateWithConnectedCallbacks.java │ │ │ ├── TemplateWithConnectedCallbacksView.java │ │ │ ├── TemplatesVisibilityView.java │ │ │ ├── TwoWayPolymerBindingView.java │ │ │ ├── UpdatableModelPropertiesView.java │ │ │ ├── UpgradeElementView.java │ │ │ ├── collections │ │ │ │ ├── ClearListView.java │ │ │ │ ├── ListBindingView.java │ │ │ │ ├── ListInsideListBindingView.java │ │ │ │ ├── Message.java │ │ │ │ ├── ModelListView.java │ │ │ │ ├── ToggleNullListView.java │ │ │ │ └── TwoWayListBindingView.java │ │ │ └── imports │ │ │ │ └── LazyWidgetView.java │ │ │ └── webcomponent │ │ │ ├── HasMax.java │ │ │ ├── HasValue.java │ │ │ ├── PaperInput.java │ │ │ ├── PaperInputView.java │ │ │ ├── PaperSlider.java │ │ │ └── PaperSliderView.java │ ├── resources │ │ ├── META-INF │ │ │ └── services │ │ │ │ └── com.vaadin.flow.server.VaadinServiceInitListener │ │ └── com │ │ │ └── vaadin │ │ │ └── flow │ │ │ └── uitest │ │ │ └── ui │ │ │ └── StaticHtmlView.html │ └── webapp │ │ ├── include.js │ │ ├── loading-indicator.css │ │ └── plain-script.js │ └── test │ ├── conf │ ├── vertx-vaadin-test-prod.conf │ └── vertx-vaadin-test.conf │ └── java │ └── com │ └── vaadin │ └── flow │ ├── AssertionTest.java │ ├── DevModeOnly.java │ ├── DevModeRule.java │ ├── FaultyLocationIT.java │ ├── InitialExtendedClientDetailsIT.java │ ├── VerifyBrowserVersionIT.java │ ├── testutil │ └── ChromeBrowserTest.java │ └── uitest │ └── ui │ ├── AbstractBasicElementComponentIT.java │ ├── AbstractDebounceSynchronizeIT.java │ ├── AbstractErrorIT.java │ ├── AbstractStreamResourceIT.java │ ├── AbstractUpdateDivIT.java │ ├── AttachExistingElementIT.java │ ├── AttachListenerIT.java │ ├── BackButtonServerRoundTripIT.java │ ├── BaseHrefIT.java │ ├── BasicComponentIT.java │ ├── BasicElementIT.java │ ├── BodyScrollIT.java │ ├── BrowserWindowResizeIT.java │ ├── CallFunctionBeforeRemoveIT.java │ ├── CompositeIT.java │ ├── CompositeNestedIT.java │ ├── CountUIsIT.java │ ├── CustomCustomElementIT.java │ ├── DebounceSynchronizePropertyIT.java │ ├── DnDAttachDetachIT.java │ ├── DnDIT.java │ ├── DomEventFilterIT.java │ ├── DomListenerOnAttachIT.java │ ├── DynamicallyRegisteredRouteIT.java │ ├── ElementInitOrderIT.java │ ├── ElementInnerHtmlIT.java │ ├── ElementRemoveItselfIT.java │ ├── ElementStyleIT.java │ ├── EnabledIT.java │ ├── ErrorHandlingIT.java │ ├── ErrorPageIT.java │ ├── EventListenersIT.java │ ├── ExceptionDuringMapSyncIT.java │ ├── ExecJavaScriptIT.java │ ├── ExtendedClientDetailsIT.java │ ├── ForwardToIT.java │ ├── FragmentLinkIT.java │ ├── HasUrlParameterErrorIT.java │ ├── HistoryIT.java │ ├── ImageClickIT.java │ ├── InMemoryChildrenIT.java │ ├── InternalErrorIT.java │ ├── JavaScriptReturnValueIT.java │ ├── JsApiGetByIdIT.java │ ├── KeyboardEventIT.java │ ├── LoadingIndicatorIT.java │ ├── LongPollingMultipleThreadsIT.java │ ├── LongPollingPushIT.java │ ├── NavigationTriggerIT.java │ ├── PageIT.java │ ├── PopStateHandlerIT.java │ ├── PostponeProceedIT.java │ ├── PreserveOnRefreshIT.java │ ├── PushLongPollingUpdateDivIT.java │ ├── PushSettingsIT.java │ ├── PushWSUpdateDivIT.java │ ├── RequestParametersHistoryIT.java │ ├── RequestParametersIT.java │ ├── RerouteIT.java │ ├── ResynchronizationIT.java │ ├── ReturnChannelIT.java │ ├── RouteNotFoundDevModeIT.java │ ├── RouteNotFoundIT.java │ ├── RouteNotFoundProdModeIT.java │ ├── RouterIT.java │ ├── RouterLinkIT.java │ ├── RouterParallelIT.java │ ├── RouterSessionExpirationIT.java │ ├── ScriptInjectIT.java │ ├── SerializeUIIT.java │ ├── ServiceInitListenersIT.java │ ├── SessionCloseLogoutIT.java │ ├── SetParameterForwardToIT.java │ ├── ShadowRootIT.java │ ├── ShortcutsIT.java │ ├── StaticHtmlIT.java │ ├── StreamResourceIT.java │ ├── SynchronizedPropertyIT.java │ ├── TimingInfoReportedIT.java │ ├── UIElementIT.java │ ├── ValueChangeModeIT.java │ ├── ViewTitleIT.java │ ├── VisibilityIT.java │ ├── WaitForVaadinIT.java │ ├── WebComponentsIT.java │ ├── dependencies │ ├── AbstractFrontendInlineIT.java │ ├── DependenciesLoadingAnnotationsIT.java │ ├── DependenciesLoadingPageApiIT.java │ ├── DynamicDependencyIT.java │ └── ExternalJavaScriptIT.java │ ├── routing │ ├── InfiniteRerouteLoopIT.java │ └── PushRouteNotFoundIT.java │ ├── scroll │ ├── AbstractScrollIT.java │ ├── MultipleAnchorsIT.java │ ├── PushStateScrollIT.java │ ├── ScrollIT.java │ └── ServerRequestScrollIT.java │ ├── template │ ├── AfterServerChangesIT.java │ ├── AttachExistingDomElementByIdIT.java │ ├── BasicTypeInListIT.java │ ├── BeanInListingIT.java │ ├── ChangeInjectedComponentTextIT.java │ ├── ChildOrderIT.java │ ├── ClearNodeChildrenIT.java │ ├── ConvertToBeanIT.java │ ├── DomRepeatIT.java │ ├── EmptyListsIT.java │ ├── EventHandlerIT.java │ ├── ExceptionsDuringPropertyUpdatesIT.java │ ├── HiddenTemplateIT.java │ ├── InjectScriptTagIT.java │ ├── InjectedElementInsideMixinBehaviorIT.java │ ├── InjectsJsTemplateIT.java │ ├── InvisibleDefaultPropertyValueIT.java │ ├── JsGrandParentIT.java │ ├── MutationSeveralSyncedPropsIT.java │ ├── OneWayPolymerBindingIT.java │ ├── PolymerDefaultPropertyValueIT.java │ ├── PolymerModelPropertiesIT.java │ ├── PolymerPropertiesIT.java │ ├── PolymerPropertyChangeEventIT.java │ ├── PolymerPropertyMutationInObserverIT.java │ ├── PropertiesUpdatedBeforeChangeEventsIT.java │ ├── RestoreViewWithAttachedByIdIT.java │ ├── SubPropertyModelIT.java │ ├── TemplateHasInjectedSubTemplateIT.java │ ├── TemplateInTemplateIT.java │ ├── TemplateInTemplateWithIdIT.java │ ├── TemplateMappingDetectorIT.java │ ├── TemplateScalabilityIT.java │ ├── TemplateWithConnectedCallbacksIT.java │ ├── TemplatesVisibilityIT.java │ ├── TwoWayPolymerBindingIT.java │ ├── UpdatableModelPropertiesIT.java │ ├── UpgradeElementIT.java │ ├── collections │ │ ├── ClearListIT.java │ │ ├── ListBindingIT.java │ │ ├── ListInsideListBindingIT.java │ │ ├── ModelListIT.java │ │ ├── ToggleNullListIT.java │ │ └── TwoWayListBindingIT.java │ └── imports │ │ └── LazyWidgetIT.java │ └── webcomponent │ ├── PaperInputIT.java │ └── PaperSliderIT.java └── test-scalability ├── .gitignore ├── frontend └── index.html ├── pom.xml └── src ├── main └── java │ └── com │ └── github │ └── mcollovati │ └── vertx │ └── vaadin │ └── test │ └── scalability │ └── HelloWorldUI.java └── test ├── conf └── vertx-vaadin-test.conf ├── resources ├── bodies │ ├── HelloWorld_0001_request.json │ └── clickButton.json └── logback-test.xml └── scala └── com └── vaadin └── flow └── test └── scalability ├── HelloWorld.scala └── WarmupFlow.scala /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "maven" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | ignore: 13 | - dependency-name: "com.vaadin.hilla:*" 14 | update-types: [ "version-update:semver-major", "version-update:semver-minor"] 15 | - dependency-name: "com.vaadin:*" 16 | update-types: [ "version-update:semver-major", "version-update:semver-minor"] 17 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /checkstyle/license.txt: -------------------------------------------------------------------------------- 1 | /\* 2 | \* The MIT License 3 | \* Copyright © \d\d\d\d(-\d\d\d\d)? .* \(.*@.*\) 4 | \* 5 | \* Permission is hereby granted, free of charge, to any person obtaining a copy 6 | \* of this software and associated documentation files \(the "Software"\), to deal 7 | \* in the Software without restriction, including without limitation the rights 8 | \* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | \* copies of the Software, and to permit persons to whom the Software is 10 | \* furnished to do so, subject to the following conditions: 11 | \* 12 | \* The above copyright notice and this permission notice shall be included in 13 | \* all copies or substantial portions of the Software. 14 | \* 15 | \* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | \* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | \* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | \* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | \* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | \* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | \* THE SOFTWARE. 22 | \*/ -------------------------------------------------------------------------------- /checkstyle/suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /license/MIT.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | Copyright © ${project.inceptionYear} ${owner} (${email}) 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. -------------------------------------------------------------------------------- /license/java-license-header: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © $YEAR Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ -------------------------------------------------------------------------------- /tools/release_flow.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | _base_dir="$(dirname $(realpath $0))/.." 4 | _newVersion=${1:?New version is missing} 5 | _mvn="$_base_dir/mvnw -f $_base_dir/pom.xml" 6 | 7 | $_mvn -Pflow-ui-tests versions:set -DnewVersion=${_newVersion} 8 | -------------------------------------------------------------------------------- /vaadin-flow-sockjs/src/main/resources/META-INF/services/com.vaadin.flow.server.communication.PushConnectionFactory: -------------------------------------------------------------------------------- 1 | com.github.mcollovati.vertx.vaadin.sockjs.communication.SockJSPushConnectionFactory -------------------------------------------------------------------------------- /vaadin-flow-sockjs/src/main/resources/com/github/mcollovati/vertx/vaadin/sockjs/SockjsClientEngine.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /vaadin-flow-sockjs/src/main/resources/com/github/mcollovati/vertx/vaadin/sockjs/SockjsClientEngineXSI.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/frontend/generated/index.ts: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * This file is auto-generated by Vaadin. 3 | * If you want to customize the entry point, you can copy this file or create 4 | * your own `index.ts` in your frontend directory. 5 | * By default, the `index.ts` file should be in `./frontend/` folder. 6 | * 7 | * NOTE: 8 | * - You need to restart the dev-server after adding the new `index.ts` file. 9 | * After that, all modifications to `index.ts` are recompiled automatically. 10 | * - `index.js` is also supported if you don't want to use TypeScript. 11 | ******************************************************************************/ 12 | 13 | // import Vaadin client-router to handle client-side and server-side navigation 14 | import { Router } from '@vaadin/router'; 15 | 16 | // import Flow module to enable navigation to Vaadin server-side views 17 | import { Flow } from 'Frontend/generated/jar-resources/Flow.js'; 18 | 19 | const { serverSideRoutes } = new Flow({ 20 | imports: () => import('Frontend/generated/flow/generated-flow-imports.js') 21 | }); 22 | 23 | const routes = [ 24 | // for client-side, place routes below (more info https://hilla.dev/docs/lit/guides/routing#initializing-the-router) 25 | 26 | // for server-side, the next magic line sends all unmatched routes: 27 | ...serverSideRoutes // IMPORTANT: this must be the last entry in the array 28 | ]; 29 | 30 | // Vaadin router needs an outlet in the index.html page to display views 31 | const router = new Router(document.querySelector('#outlet')); 32 | router.setRoutes(routes); 33 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/frontend/generated/vaadin-featureflags.ts: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | window.Vaadin = window.Vaadin || {}; 3 | window.Vaadin.featureFlags = window.Vaadin.featureFlags || {}; 4 | window.Vaadin.featureFlags.exampleFeatureFlag = false; 5 | window.Vaadin.featureFlags.hillaPush = false; 6 | window.Vaadin.featureFlags.hillaEngine = false; 7 | window.Vaadin.featureFlags.oldLicenseChecker = false; 8 | window.Vaadin.featureFlags.collaborationEngineBackend = false; 9 | window.Vaadin.featureFlags.webpackForFrontendBuild = false; 10 | window.Vaadin.featureFlags.enforceFieldValidation = false; 11 | export {}; -------------------------------------------------------------------------------- /vertx-vaadin-flow/frontend/generated/vite-devmode.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | if (import.meta.hot) { 3 | // @ts-ignore 4 | const hot = import.meta.hot; 5 | 6 | const isLiveReloadDisabled = () => { 7 | // Checks if live reload is disabled in the debug window 8 | return sessionStorage.getItem('vaadin.live-reload.active') === 'false'; 9 | }; 10 | 11 | const preventViteReload = (payload: any) => { 12 | // Changing the path prevents Vite from reloading 13 | payload.path = '/_fake/path.html'; 14 | }; 15 | 16 | let pendingNavigationTo: string | undefined = undefined; 17 | 18 | window.addEventListener('vaadin-router-go', (routerEvent: any) => { 19 | pendingNavigationTo = routerEvent.detail.pathname + routerEvent.detail.search; 20 | }); 21 | hot.on('vite:beforeFullReload', (payload: any) => { 22 | if (isLiveReloadDisabled()) { 23 | preventViteReload(payload); 24 | } 25 | if (pendingNavigationTo) { 26 | // Force reload with the new URL 27 | location.href = pendingNavigationTo; 28 | preventViteReload(payload); 29 | } 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/main/java/com/github/mcollovati/vertx/vaadin/connect/VaadinEndpointRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2016-2020 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.github.mcollovati.vertx.vaadin.connect; 24 | 25 | import com.vaadin.hilla.EndpointRegistry; 26 | 27 | public interface VaadinEndpointRegistry { 28 | 29 | void registerEndpoint(Object endpointBean); 30 | 31 | EndpointRegistry.VaadinEndpointData get(String endpointName); 32 | } 33 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/main/resources/com/github/mcollovati/vertx/vaadin/version.properties: -------------------------------------------------------------------------------- 1 | vertx-vaadin.version=${project.version} -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/java/com/github/mcollovati/vertx/support/VaadinPatchesTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2024 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.github.mcollovati.vertx.support; 24 | 25 | import org.junit.Test; 26 | 27 | public class VaadinPatchesTest { 28 | 29 | @Test 30 | public void testPatchInstallation() { 31 | VaadinPatches.patch(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/java/com/github/mcollovati/vertx/vaadin/connect/auth/VertxAccessAnnotationCheckerTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2016-2020 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.github.mcollovati.vertx.vaadin.connect.auth; 24 | 25 | public class VertxAccessAnnotationCheckerTest {} 26 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/java/com/github/mcollovati/vertx/vaadin/connect/generator/endpoints/superclassmethods/NonEndpoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2016-2020 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.github.mcollovati.vertx.vaadin.connect.generator.endpoints.superclassmethods; 24 | 25 | /** 26 | * Source taken from Vaadin Flow (https://github.com/vaadin/flow) 27 | */ 28 | public interface NonEndpoint { 29 | default void nonEndpointMethod() {} 30 | } 31 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/META-INF/VAADIN/config/flow-build-info.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/META-INF/VAADIN/config/stats_no_export.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "64bb80639ef116681818", 3 | "assetsByChunkName" :{ 4 | "bundle": "VAADIN/build/vaadin-bundle-1111.cache.js" 5 | }, 6 | "modules": [], 7 | "chunks" : [] 8 | } 9 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/META-INF/VAADIN/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Flow Test CCDM 12 | 13 | 14 | 15 | 16 | 17 |
index.html template content
18 | 19 | 20 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/META-INF/VAADIN/webapp/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "index.html": "index.html", 3 | "sw.js": "sw.js" 4 | } -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/META-INF/VAADIN/webapp/sw.js: -------------------------------------------------------------------------------- 1 | // service worker content 2 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/META-INF/resources/VAADIN/static/client/compile.properties: -------------------------------------------------------------------------------- 1 | jsFile=foo 2 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/META-INF/resources/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-flow/src/test/resources/META-INF/resources/icons/icon.png -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/META-INF/services/com.vaadin.flow.di.InstantiatorFactory: -------------------------------------------------------------------------------- 1 | com.github.mcollovati.vertx.vaadin.startup.testdata.AnotherTestInstantiatorFactory 2 | com.github.mcollovati.vertx.vaadin.startup.testdata.OneMoreTestInstantiatorFactory 3 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/frontend/my-lit-element-view.js: -------------------------------------------------------------------------------- 1 | 2 | import { LitElement, html } from "lit"; 3 | 4 | export class SimpleLitTemplateShadowRoot extends LitElement { 5 | static get properties() { 6 | return { 7 | text: String 8 | }; 9 | } 10 | render() { 11 | return html` 12 | 13 | 14 | 15 |
16 | `; 17 | } 18 | } 19 | customElements.define("my-lit-element-view", SimpleLitTemplateShadowRoot); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/frontend/web-component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /vertx-vaadin-flow/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/common-test-code/src/main/java/com/github/mcollovati/vertx/vaadin/quarkus/it/routecontext/CustomException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2000-2021 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.github.mcollovati.vertx.vaadin.quarkus.it.routecontext; 24 | 25 | public class CustomException extends RuntimeException {} 26 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/common-test-code/src/main/java/com/github/mcollovati/vertx/vaadin/quarkus/it/service/BootstrapCustomizeView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2000-2021 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.github.mcollovati.vertx.vaadin.quarkus.it.service; 24 | 25 | import com.vaadin.flow.component.html.Div; 26 | import com.vaadin.flow.router.Route; 27 | 28 | @Route("bootstrap") 29 | public class BootstrapCustomizeView extends Div {} 30 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/common-test-code/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.test-port=8888 2 | quarkus.http.host=0.0.0.0 3 | 4 | #quarkus.log.level=DEBUG 5 | 6 | quarkus.index-dependency.lumo.group-id=com.vaadin 7 | quarkus.index-dependency.lumo.artifact-id=vaadin-lumo-theme 8 | #quarkus.index-dependency.addon-without-jandex.group-id=com.vaadin 9 | #quarkus.index-dependency.addon-without-jandex.artifact-id=test-addon-without-jandex 10 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/development/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/production/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/production/frontend/my.css: -------------------------------------------------------------------------------- 1 | html { 2 | background : blue; 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/reusable-theme/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | com.github.mcollovati.vertx 7 | vertx-vaadin-quarkus-integration-tests 8 | 24.6-SNAPSHOT 9 | 10 | 11 | 4.0.0 12 | 13 | reusable-theme 14 | Flow reusable application theme 15 | jar 16 | 17 | 18 | true 19 | 20 | 21 | 22 | 23 | com.vaadin 24 | vaadin-lumo-theme 25 | ${vaadin.platform.version} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/reusable-theme/src/main/resources/META-INF/resources/themes/reusable-theme/styles.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | CSS styling examples for the Vaadin app. 4 | This is the style entrypoint for the theme and together with css in ./components/ included 5 | automatically into the theme. 6 | Visit https://vaadin.com/docs-beta/latest/theming/application-theme/ for more information. 7 | */ 8 | 9 | /* Example: CSS class name to center align the content . */ 10 | .centered-content { 11 | margin: 0 auto; 12 | max-width: 250px; 13 | } 14 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/test-addons/addon-with-jandex/src/main/resources/META-INF/frontend/src/hello-world-jandex.ts: -------------------------------------------------------------------------------- 1 | import { html, LitElement } from 'lit'; 2 | import '@axa-ch/input-text'; 3 | 4 | class HelloWorldJandex extends LitElement { 5 | 6 | render() { 7 | return html` 8 |
9 | Addon with Jandex index 10 | 11 |
`; 12 | } 13 | } 14 | 15 | customElements.define('hello-world-jandex', HelloWorldJandex); 16 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/integration-tests/test-addons/addon-without-jandex/src/main/resources/META-INF/frontend/src/hello-world.ts: -------------------------------------------------------------------------------- 1 | import { html, LitElement } from 'lit'; 2 | import '@axa-ch/input-text'; 3 | 4 | class HelloWorld extends LitElement { 5 | 6 | render() { 7 | return html` 8 |
9 | Addon without Jandex index 10 | 11 |
`; 12 | } 13 | } 14 | 15 | customElements.define('hello-world', HelloWorld); 16 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/runtime/src/main/java/com/github/mcollovati/vertx/quarkus/VaadinVerticleConfigurer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2024 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.github.mcollovati.vertx.quarkus; 24 | 25 | import io.vertx.core.json.JsonObject; 26 | 27 | public interface VaadinVerticleConfigurer { 28 | 29 | void apply(JsonObject config); 30 | } 31 | -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/runtime/src/main/resources/META-INF/beans.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-quarkus-extension/runtime/src/main/resources/META-INF/beans.xml -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/runtime/src/main/resources/META-INF/quarkus-extension.yaml: -------------------------------------------------------------------------------- 1 | name: Vertx Vaadin Extension 2 | #description: Vertx Vaadin Extension ... 3 | metadata: 4 | # keywords: 5 | # - vertx-vaadin-extension 6 | # guide: ... 7 | # categories: 8 | # - "miscellaneous" 9 | # status: "preview" -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/runtime/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | vertx-vaadin.server.port=${quarkus.http.port:8080} -------------------------------------------------------------------------------- /vertx-vaadin-quarkus-extension/runtime/src/test/resources/resource-provider/some-resource.json: -------------------------------------------------------------------------------- 1 | { 2 | "client-resource" : true 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/.gitignore: -------------------------------------------------------------------------------- 1 | selenium_standalone_zips/ 2 | driver/ 3 | driver_zips/ 4 | **/error-screenshots 5 | **/frontend/generated/ 6 | 7 | bower_components 8 | node 9 | node_modules 10 | */flow-*/frontend 11 | package.json 12 | package-lock.json 13 | webpack.config.js 14 | **/webpack.generated.js 15 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/drivers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_win32.zip 8 | 40aeb7b0b3a3ea23a139a764b56e172f2fdb90a4 9 | sha1 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_linux64.zip 19 | 0e8848ebca11706768fd748dd0282672acad35ac 20 | sha1 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_mac64.zip 30 | 3b58b8039f363de3b13a8bea7d4646105fbbd177 31 | sha1 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.github.mcollovati.vertx.tests 8 | vertx-vaadin-test 9 | 24.6-SNAPSHOT 10 | ../pom.xml 11 | 12 | vertx-vaadin-test-common 13 | vertx-vaadin common test UI classes 14 | jar 15 | 16 | true 17 | true 18 | 19 | 20 | 21 | 22 | net.bytebuddy 23 | byte-buddy 24 | 25 | 26 | net.bytebuddy 27 | byte-buddy-agent 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-common/src/main/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.defaultLogLevel=info 2 | org.slf4j.simpleLogger.showDateTime=true 3 | org.slf4j.simpleLogger.log.dev-updater=debug 4 | org.slf4j.simpleLogger.log.com.github.mcollovati=trace 5 | org.slf4j.simpleLogger.log.com.vaadin=debug 6 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/addon-with-templates/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | com.github.mcollovati.vertx.tests 9 | test-frontend 10 | 24.6-SNAPSHOT 11 | 12 | 13 | addon-with-templates 14 | Add-on containing a Lit template-based component 15 | 16 | 17 | 18 | com.vaadin 19 | flow-server 20 | 21 | 22 | com.vaadin 23 | flow-lit-template 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/addon-with-templates/src/main/resources/META-INF/frontend/AddonLitComponent.ts: -------------------------------------------------------------------------------- 1 | import { html, LitElement } from 'lit'; 2 | 3 | class AddonLitComponent extends LitElement { 4 | render() { 5 | return html`
6 |

Add-on component

7 | Default 8 |
`; 9 | } 10 | } 11 | 12 | customElements.define('addon-lit-component', AddonLitComponent); 13 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-npm/README.md: -------------------------------------------------------------------------------- 1 | `test-pnpm` is a module that tests `npm`. At the same time it 2 | checks that the application can be deployed with a custom context in the container, 3 | custom servlet path and custom route. 4 | 5 | The module has different maven build files per each mode combination. 6 | 7 | ### To run the module use the following: 8 | 9 | #### DEVELOPMENT mode 10 | Run `mvn jetty:run` and visit http://localhost:8888/context-path/servlet-path/route-path 11 | 12 | #### PRODUCTION mode 13 | Run `mvn jetty:run -f pom-production.xml` and visit http://localhost:8888/context-path/servlet-path/route-path 14 | 15 | 16 | ### To run Integration Tests for each mode run: 17 | 18 | ``` 19 | mvn verify 20 | mvn verify -f pom-production.xml 21 | ``` 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-npm/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-npm/frontend/my-component.js: -------------------------------------------------------------------------------- 1 | import { PolymerElement } from '@polymer/polymer/polymer-element.js'; 2 | import { html } from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MyComponentElement extends PolymerElement { 5 | static get template() { 6 | return html` 7 | 8 |
9 | `; 10 | } 11 | 12 | static get is() { 13 | return 'my-component' 14 | } 15 | } 16 | customElements.define(MyComponentElement.is, MyComponentElement); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-npm/src/main/resources/vaadin-featureflags.properties: -------------------------------------------------------------------------------- 1 | # Use Webpack for frontend in development mode 2 | com.vaadin.experimental.webpackForFrontendBuild=true 3 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-npm/src/test/java/com/vaadin/flow/mixedtest/ui/NpmUsedIT.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.flow.mixedtest.ui; 2 | 3 | import java.io.File; 4 | 5 | import com.vaadin.flow.testutil.FileTestUtil; 6 | 7 | import org.junit.Test; 8 | 9 | public class NpmUsedIT { 10 | 11 | @Test 12 | public void npmIsUsed() { 13 | File testPackage = new File("node_modules/lit"); 14 | FileTestUtil.waitForFile(testPackage); 15 | FileTestUtil.assertDirectory(testPackage, 16 | "npm should have been used to install frontend dependencies but node_modules/lit is a symlink and only pnpm uses symlinks"); 17 | 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-pnpm/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-pnpm/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTICE: this is an auto-generated file 3 | * 4 | * This file has been generated for `pnpm install` task. 5 | * It is used to pin client side dependencies. 6 | * This file will be overwritten on every run. 7 | */ 8 | 9 | const fs = require('fs'); 10 | 11 | const versionsFile = require('path').resolve(__dirname, 'target/frontend/versions.json'); 12 | 13 | if (!fs.existsSync(versionsFile)) { 14 | return; 15 | } 16 | const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf-8')); 17 | 18 | module.exports = { 19 | hooks: { 20 | readPackage 21 | } 22 | }; 23 | 24 | function readPackage(pkg) { 25 | const { dependencies } = pkg; 26 | 27 | if (dependencies) { 28 | for (let k in versions) { 29 | if (dependencies[k] && dependencies[k] !== versions[k]) { 30 | pkg.dependencies[k] = versions[k]; 31 | } 32 | } 33 | } 34 | 35 | // Forcing chokidar version for now until new babel version is available 36 | // check out https://github.com/babel/babel/issues/11488 37 | if (pkg.dependencies.chokidar) { 38 | pkg.dependencies.chokidar = '^3.4.0'; 39 | } 40 | 41 | return pkg; 42 | } 43 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-pnpm/README.md: -------------------------------------------------------------------------------- 1 | `test-pnpm` is a module that tests `pnpm`. At the same time it 2 | checks that the application can be deployed with a custom context in the container, 3 | custom servlet path and custom route. 4 | 5 | The module has different maven build files per each mode combination. 6 | 7 | ### To run the module use the following: 8 | 9 | #### DEVELOPMENT mode 10 | Run `mvn jetty:run` and visit http://localhost:8888/context-path/servlet-path/route-path 11 | 12 | #### PRODUCTION mode 13 | Run `mvn jetty:run -f pom-production.xml` and visit http://localhost:8888/context-path/servlet-path/route-path 14 | 15 | 16 | ### To run Integration Tests for each mode run: 17 | 18 | ``` 19 | mvn verify 20 | mvn verify -f pom-production.xml 21 | ``` 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-pnpm/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-pnpm/frontend/my-component.js: -------------------------------------------------------------------------------- 1 | import { PolymerElement } from '@polymer/polymer/polymer-element.js'; 2 | import { html } from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MyComponentElement extends PolymerElement { 5 | static get template() { 6 | return html` 7 | 8 |
9 | `; 10 | } 11 | 12 | static get is() { 13 | return 'my-component' 14 | } 15 | } 16 | customElements.define(MyComponentElement.is, MyComponentElement); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-pnpm/src/main/resources/vaadin-featureflags.properties: -------------------------------------------------------------------------------- 1 | # Use Webpack for frontend in development mode 2 | com.vaadin.experimental.webpackForFrontendBuild=true 3 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/test-pnpm/src/test/java/com/vaadin/flow/mixedtest/ui/PnpmUsedIT.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.flow.mixedtest.ui; 2 | 3 | import java.io.File; 4 | 5 | import com.vaadin.flow.testutil.FileTestUtil; 6 | 7 | import org.junit.Test; 8 | 9 | public class PnpmUsedIT { 10 | 11 | @Test 12 | public void pnpmIsUsed() { 13 | File testPackage = new File("node_modules/lit"); 14 | FileTestUtil.waitForFile(testPackage); 15 | FileTestUtil.assertSymlink(testPackage, 16 | "pnpm should have been used to install frontend dependencies but " 17 | + testPackage.getAbsolutePath() 18 | + " is a not a symlink like it should be"); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/a-directory/index.js: -------------------------------------------------------------------------------- 1 | document.getElementById('directoryImportResult').innerText = 'Directory import ok'; 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/cssimport-textfield.css: -------------------------------------------------------------------------------- 1 | :host { 2 | background: rgb(173, 216, 230); 3 | } 4 | 5 | body { 6 | /* This must not be applied to the document body */ 7 | background: red !important; 8 | } 9 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/cssimport.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: rgb(211, 211, 211); 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/importdir.js: -------------------------------------------------------------------------------- 1 | import './a-directory' 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/jsonloader.js: -------------------------------------------------------------------------------- 1 | window.loadJson = (resultHandler) => { 2 | import('./my.json').then(result => resultHandler(JSON.stringify(result.default))); 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/my.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello":"World" 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/testscopebuttonloader.js: -------------------------------------------------------------------------------- 1 | import '@testscope/all'; 2 | 3 | import { Button } from '@testscope/button'; 4 | window.BundleButtonClass = Button; -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/testscopemaploader.js: -------------------------------------------------------------------------------- 1 | import '@testscope/all'; 2 | 3 | import { Map } from '@testscope/map'; 4 | window.BundleMapClass = Map; -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/themes/vite-basics/images/plant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-frontend/vite-basics/frontend/themes/vite-basics/images/plant.png -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/themes/vite-basics/styles.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Itim'); 2 | 3 | h2 { 4 | color: blue; 5 | font-family: "Itim"; 6 | } 7 | 8 | p { 9 | color: darkgreen; 10 | } 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/frontend/themes/vite-basics/theme.json: -------------------------------------------------------------------------------- 1 | {"lumoImports":["typography","color","spacing","badge","utility"]} -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/src/main/java/com/vaadin/viteapp/AppShell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2024 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.vaadin.viteapp; 24 | 25 | import com.vaadin.flow.component.page.AppShellConfigurator; 26 | import com.vaadin.flow.theme.Theme; 27 | 28 | @Theme(value = "vite-basics") 29 | public class AppShell implements AppShellConfigurator {} 30 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/src/test/conf/vertx-vaadin-test.conf: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "port": 8888 4 | }, 5 | "vaadin": { 6 | "pnpm.enable": "false" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/tsconfig.json: -------------------------------------------------------------------------------- 1 | // This TypeScript configuration file is generated by vaadin-maven-plugin. 2 | // This is needed for TypeScript compiler to compile your TypeScript code in the project. 3 | // It is recommended to commit this file to the VCS. 4 | // You might want to change the configurations to fit your preferences 5 | // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html 6 | { 7 | "_version": "9.1", 8 | "compilerOptions": { 9 | "sourceMap": true, 10 | "jsx": "react-jsx", 11 | "inlineSources": true, 12 | "module": "esNext", 13 | "target": "es2020", 14 | "moduleResolution": "bundler", 15 | "strict": true, 16 | "skipLibCheck": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "noImplicitReturns": true, 19 | "noImplicitAny": true, 20 | "noImplicitThis": true, 21 | "noUnusedLocals": false, 22 | "noUnusedParameters": false, 23 | "experimentalDecorators": true, 24 | "useDefineForClassFields": false, 25 | "baseUrl": "frontend", 26 | "paths": { 27 | "@vaadin/flow-frontend": ["generated/jar-resources"], 28 | "@vaadin/flow-frontend/*": ["generated/jar-resources/*"], 29 | "Frontend/*": ["*"] 30 | } 31 | }, 32 | "include": [ 33 | "frontend/**/*", 34 | "types.d.ts" 35 | ], 36 | "exclude": [ 37 | "frontend/generated/jar-resources/**" 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/types.d.ts: -------------------------------------------------------------------------------- 1 | // This TypeScript modules definition file is generated by vaadin-maven-plugin. 2 | // You can not directly import your different static files into TypeScript, 3 | // This is needed for TypeScript compiler to declare and export as a TypeScript module. 4 | // It is recommended to commit this file to the VCS. 5 | // You might want to change the configurations to fit your preferences 6 | declare module '*.css?inline' { 7 | import type { CSSResultGroup } from 'lit'; 8 | const content: CSSResultGroup; 9 | export default content; 10 | } 11 | 12 | // Allow any CSS Custom Properties 13 | declare module 'csstype' { 14 | interface Properties { 15 | [index: `--${string}`]: any; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-basics/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | PluginOption, 3 | UserConfigFn 4 | } from 'vite'; 5 | import { overrideVaadinConfig } from './vite.generated'; 6 | 7 | /** 8 | * Dumps effective contents of config.optimizeDeps for tests 9 | */ 10 | function dumpOptimizeDepsPlugin(): PluginOption { 11 | let config; 12 | 13 | return { 14 | name: 'dump-optimize-deps', 15 | configResolved(_config) { 16 | config = _config; 17 | }, 18 | transformIndexHtml(html) { 19 | return [ 20 | { 21 | injectTo: 'head', 22 | tag: 'script', 23 | children: `window.ViteConfigOptimizeDeps = ${JSON.stringify(config.optimizeDeps)};` 24 | } 25 | ]; 26 | } 27 | } 28 | } 29 | 30 | const customConfig: UserConfigFn = () => ({ 31 | // Here you can add custom Vite parameters 32 | // https://vitejs.dev/config/ 33 | plugins: [ 34 | dumpOptimizeDepsPlugin() 35 | ] 36 | }); 37 | 38 | export default overrideVaadinConfig(customConfig); 39 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTICE: this is an auto-generated file 3 | * 4 | * This file has been generated for `pnpm install` task. 5 | * It is used to pin client side dependencies. 6 | * This file will be overwritten on every run. 7 | */ 8 | 9 | const fs = require('fs'); 10 | 11 | const versionsFile = require('path').resolve(__dirname, 'target/frontend/versions.json'); 12 | 13 | if (!fs.existsSync(versionsFile)) { 14 | return; 15 | } 16 | const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf-8')); 17 | 18 | module.exports = { 19 | hooks: { 20 | readPackage 21 | } 22 | }; 23 | 24 | function readPackage(pkg) { 25 | const { dependencies } = pkg; 26 | 27 | if (dependencies) { 28 | for (let k in versions) { 29 | if (dependencies[k] && dependencies[k] !== versions[k]) { 30 | pkg.dependencies[k] = versions[k]; 31 | } 32 | } 33 | } 34 | 35 | // Forcing chokidar version for now until new babel version is available 36 | // check out https://github.com/babel/babel/issues/11488 37 | if (pkg.dependencies.chokidar) { 38 | pkg.dependencies.chokidar = '^3.4.0'; 39 | } 40 | 41 | return pkg; 42 | } 43 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/frontend/themes/vite-context-path/styles.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-frontend/vite-context-path/frontend/themes/vite-context-path/styles.css -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/frontend/themes/vite-context-path/theme.json: -------------------------------------------------------------------------------- 1 | {"lumoImports":["typography","color","spacing","badge","utility"]} 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/src/main/java/com/vaadin/viteapp/AppShell.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp; 2 | 3 | import com.vaadin.flow.component.page.AppShellConfigurator; 4 | import com.vaadin.flow.theme.Theme; 5 | 6 | @Theme(value = "vite-context-path") 7 | public class AppShell implements AppShellConfigurator { 8 | } 9 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/src/main/java/com/vaadin/viteapp/views/empty/MainView.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp.views.empty; 2 | 3 | import com.vaadin.flow.component.HtmlComponent; 4 | import com.vaadin.flow.component.dependency.JsModule; 5 | import com.vaadin.flow.component.html.Div; 6 | import com.vaadin.flow.component.html.H2; 7 | import com.vaadin.flow.router.Route; 8 | 9 | @Route("") 10 | @JsModule("@testscope/all") 11 | public class MainView extends Div { 12 | public MainView() { 13 | add(new H2("Hello world!"), new HtmlComponent("testscope-button"), 14 | new HtmlComponent("testscope-map")); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/src/test/java/com/vaadin/viteapp/BundlesIT.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp; 2 | 3 | import io.github.bonigarcia.wdm.WebDriverManager; 4 | import org.junit.Assert; 5 | import org.junit.Before; 6 | import org.junit.BeforeClass; 7 | import org.junit.Test; 8 | 9 | import com.vaadin.flow.testutil.ChromeBrowserTest; 10 | 11 | public class BundlesIT extends ChromeBrowserTest { 12 | 13 | @BeforeClass 14 | public static void driver() { 15 | WebDriverManager.chromedriver().setup(); 16 | } 17 | 18 | @Before 19 | public void openView() { 20 | getDriver().get(getRootURL() + "/my-context"); 21 | waitForDevServer(); 22 | getCommandExecutor().waitForVaadin(); 23 | } 24 | 25 | @Test 26 | public void bundlesIsNotUsedWhenHasVersionMismatch() { 27 | Assert.assertFalse((Boolean) $("testscope-button").first() 28 | .getProperty("isFromBundle")); 29 | } 30 | 31 | @Test 32 | public void optimizeDepsNotExcludeBundleContents() { 33 | Assert.assertFalse(isExcluded("@testscope/all")); 34 | Assert.assertFalse(isExcluded("@testscope/button")); 35 | } 36 | 37 | private boolean isExcluded(String dependency) { 38 | return (Boolean) executeScript( 39 | "return (window.ViteConfigOptimizeDeps.exclude || []).includes(arguments[0]);", 40 | dependency); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/src/test/java/com/vaadin/viteapp/ContextPathIT.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp; 2 | 3 | import io.github.bonigarcia.wdm.WebDriverManager; 4 | import org.junit.Before; 5 | import org.junit.BeforeClass; 6 | import com.vaadin.flow.testutil.ChromeBrowserTest; 7 | import com.vaadin.testbench.TestBenchElement; 8 | 9 | import org.junit.Assert; 10 | import org.junit.Test; 11 | 12 | public class ContextPathIT extends ChromeBrowserTest { 13 | 14 | @BeforeClass 15 | public static void driver() { 16 | WebDriverManager.chromedriver().setup(); 17 | } 18 | 19 | @Before 20 | public void openView() { 21 | getDriver().get(getRootURL() + "/my-context"); 22 | waitForDevServer(); 23 | getCommandExecutor().waitForVaadin(); 24 | } 25 | 26 | @Test 27 | public void applicationStarts() { 28 | TestBenchElement header = $("h2").first(); 29 | Assert.assertEquals("Hello world!", header.getText()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/tsconfig.json: -------------------------------------------------------------------------------- 1 | // This TypeScript configuration file is generated by vaadin-maven-plugin. 2 | // This is needed for TypeScript compiler to compile your TypeScript code in the project. 3 | // It is recommended to commit this file to the VCS. 4 | // You might want to change the configurations to fit your preferences 5 | // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html 6 | { 7 | "compilerOptions": { 8 | "sourceMap": true, 9 | "inlineSources": true, 10 | "module": "esNext", 11 | "target": "es2019", 12 | "moduleResolution": "node", 13 | "strict": true, 14 | "skipDefaultLibCheck": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitAny": true, 18 | "noImplicitThis": true, 19 | "noUnusedLocals": false, 20 | "noUnusedParameters": false, 21 | "experimentalDecorators": true, 22 | "baseUrl": "frontend", 23 | "paths": { 24 | "Frontend/*": [ 25 | "*" 26 | ] 27 | } 28 | }, 29 | "include": [ 30 | "frontend/**/*.ts", 31 | "frontend/index.js", 32 | "types.d.ts" 33 | ], 34 | "exclude": [] 35 | } 36 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/types.d.ts: -------------------------------------------------------------------------------- 1 | // This TypeScript modules definition file is generated by vaadin-maven-plugin. 2 | // You can not directly import your different static files into TypeScript, 3 | // This is needed for TypeScript compiler to declare and export as a TypeScript module. 4 | // It is recommended to commit this file to the VCS. 5 | // You might want to change the configurations to fit your preferences 6 | declare module '*.css' { 7 | import { CSSResultGroup } from 'lit'; 8 | const content: CSSResultGroup; 9 | export default content; 10 | } 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-context-path/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { UserConfigFn } from 'vite'; 2 | import { overrideVaadinConfig } from './vite.generated'; 3 | 4 | /** 5 | * Dumps effective contents of config.optimizeDeps for tests 6 | */ 7 | function dumpOptimizeDepsPlugin(): PluginOption { 8 | let config; 9 | 10 | return { 11 | name: 'dump-optimize-deps', 12 | configResolved(_config) { 13 | config = _config; 14 | }, 15 | transformIndexHtml(html) { 16 | return [ 17 | { 18 | injectTo: 'head', 19 | tag: 'script', 20 | children: `window.ViteConfigOptimizeDeps = ${JSON.stringify(config.optimizeDeps)};` 21 | } 22 | ]; 23 | } 24 | } 25 | } 26 | 27 | const customConfig: UserConfigFn = (env) => ({ 28 | // Here you can add custom Vite parameters 29 | // https://vitejs.dev/config/ 30 | plugins: [ 31 | dumpOptimizeDepsPlugin() 32 | ] 33 | }); 34 | 35 | export default overrideVaadinConfig(customConfig); 36 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/.gitignore: -------------------------------------------------------------------------------- 1 | !**/index.html 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTICE: this is an auto-generated file 3 | * 4 | * This file has been generated for `pnpm install` task. 5 | * It is used to pin client side dependencies. 6 | * This file will be overwritten on every run. 7 | */ 8 | 9 | const fs = require('fs'); 10 | 11 | const versionsFile = require('path').resolve(__dirname, 'target/frontend/versions.json'); 12 | 13 | if (!fs.existsSync(versionsFile)) { 14 | return; 15 | } 16 | const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf-8')); 17 | 18 | module.exports = { 19 | hooks: { 20 | readPackage 21 | } 22 | }; 23 | 24 | function readPackage(pkg) { 25 | const { dependencies } = pkg; 26 | 27 | if (dependencies) { 28 | for (let k in versions) { 29 | if (dependencies[k] && dependencies[k] !== versions[k]) { 30 | pkg.dependencies[k] = versions[k]; 31 | } 32 | } 33 | } 34 | 35 | // Forcing chokidar version for now until new babel version is available 36 | // check out https://github.com/babel/babel/issues/11488 37 | if (pkg.dependencies.chokidar) { 38 | pkg.dependencies.chokidar = '^3.4.0'; 39 | } 40 | 41 | return pkg; 42 | } 43 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/frontend/themes/my-theme/styles.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/frontend/web-component.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/src/main/java/com/vaadin/viteapp/BasicComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.component.html.H1; 20 | import com.vaadin.flow.component.WebComponentExporter; 21 | import com.vaadin.flow.component.webcomponent.WebComponent; 22 | import com.vaadin.flow.theme.Theme; 23 | 24 | public class BasicComponent extends Div { 25 | @Theme("my-theme") 26 | public static class Exporter extends WebComponentExporter { 27 | public Exporter() { 28 | super("basic-component"); 29 | } 30 | 31 | @Override 32 | protected void configureInstance( 33 | WebComponent webComponent, 34 | BasicComponent component) { 35 | } 36 | } 37 | 38 | public BasicComponent() { 39 | H1 h1 = new H1(); 40 | h1.setText("Basic Component"); 41 | add(h1); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/src/main/webapp/basic-component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/src/main/webapp/push-component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/tsconfig.json: -------------------------------------------------------------------------------- 1 | // This TypeScript configuration file is generated by vaadin-maven-plugin. 2 | // This is needed for TypeScript compiler to compile your TypeScript code in the project. 3 | // It is recommended to commit this file to the VCS. 4 | // You might want to change the configurations to fit your preferences 5 | // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html 6 | { 7 | "compilerOptions": { 8 | "sourceMap": true, 9 | "inlineSources": true, 10 | "module": "esNext", 11 | "target": "es2019", 12 | "moduleResolution": "node", 13 | "strict": true, 14 | "skipDefaultLibCheck": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitAny": true, 18 | "noImplicitThis": true, 19 | "noUnusedLocals": false, 20 | "noUnusedParameters": false, 21 | "experimentalDecorators": true, 22 | "baseUrl": "frontend", 23 | "paths": { 24 | "Frontend/*": [ 25 | "*" 26 | ] 27 | } 28 | }, 29 | "include": [ 30 | "frontend/**/*.ts", 31 | "frontend/index.js", 32 | "types.d.ts" 33 | ], 34 | "exclude": [] 35 | } 36 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-embedded/types.d.ts: -------------------------------------------------------------------------------- 1 | // This TypeScript modules definition file is generated by vaadin-maven-plugin. 2 | // You can not directly import your different static files into TypeScript, 3 | // This is needed for TypeScript compiler to declare and export as a TypeScript module. 4 | // It is recommended to commit this file to the VCS. 5 | // You might want to change the configurations to fit your preferences 6 | declare module '*.css' { 7 | import { CSSResultGroup } from 'lit'; 8 | const content: CSSResultGroup; 9 | export default content; 10 | } 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production-custom-frontend/frontend-custom/lit-templates/test-form.js: -------------------------------------------------------------------------------- 1 | import {html, LitElement} from 'lit'; 2 | 3 | class TestForm extends LitElement { 4 | 5 | render() { 6 | return html` 7 |
Template text
8 | `; 9 | } 10 | } 11 | 12 | customElements.define('test-form', TestForm); 13 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production-custom-frontend/src/main/java/com/vaadin/viteapp/AppShell.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp; 2 | 3 | import com.vaadin.flow.component.page.AppShellConfigurator; 4 | import com.vaadin.flow.theme.Theme; 5 | 6 | public class AppShell implements AppShellConfigurator { 7 | } 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production-custom-frontend/src/main/java/com/vaadin/viteapp/littemplate/TestForm.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp.littemplate; 2 | 3 | import com.vaadin.flow.component.Tag; 4 | import com.vaadin.flow.component.dependency.JsModule; 5 | import com.vaadin.flow.component.html.Div; 6 | import com.vaadin.flow.component.littemplate.LitTemplate; 7 | import com.vaadin.flow.component.template.Id; 8 | 9 | @JsModule("./lit-templates/test-form.js") 10 | @Tag("test-form") 11 | public class TestForm extends LitTemplate { 12 | 13 | @Id 14 | private Div div; 15 | 16 | public TestForm() { 17 | div.setText("foo"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production-custom-frontend/src/main/java/com/vaadin/viteapp/view/TestView.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp.view; 2 | 3 | import com.vaadin.flow.component.html.Div; 4 | import com.vaadin.flow.router.Route; 5 | import com.vaadin.viteapp.littemplate.TestForm; 6 | 7 | @Route("") 8 | public class TestView extends Div { 9 | 10 | public TestView() { 11 | add(new TestForm()); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production-custom-frontend/src/test/java/com/vaadin/viteapp/ProductionBasicsIT.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp; 2 | 3 | import io.github.bonigarcia.wdm.WebDriverManager; 4 | import org.junit.Assert; 5 | import org.junit.BeforeClass; 6 | import org.junit.Test; 7 | 8 | import com.vaadin.flow.testutil.ChromeBrowserTest; 9 | import com.vaadin.testbench.TestBenchElement; 10 | 11 | public class ProductionBasicsIT extends ChromeBrowserTest { 12 | 13 | @BeforeClass 14 | public static void driver() { 15 | WebDriverManager.chromedriver().setup(); 16 | } 17 | 18 | @Test 19 | public void applicationStarts() { 20 | getDriver().get(getRootURL()); 21 | waitForDevServer(); 22 | TestBenchElement testForm = $("test-form").first(); 23 | Assert.assertEquals("foo", testForm.getText()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTICE: this is an auto-generated file 3 | * 4 | * This file has been generated for `pnpm install` task. 5 | * It is used to pin client side dependencies. 6 | * This file will be overwritten on every run. 7 | */ 8 | 9 | const fs = require('fs'); 10 | 11 | const versionsFile = require('path').resolve(__dirname, 'target/frontend/versions.json'); 12 | 13 | if (!fs.existsSync(versionsFile)) { 14 | return; 15 | } 16 | const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf-8')); 17 | 18 | module.exports = { 19 | hooks: { 20 | readPackage 21 | } 22 | }; 23 | 24 | function readPackage(pkg) { 25 | const { dependencies } = pkg; 26 | 27 | if (dependencies) { 28 | for (let k in versions) { 29 | if (dependencies[k] && dependencies[k] !== versions[k]) { 30 | pkg.dependencies[k] = versions[k]; 31 | } 32 | } 33 | } 34 | 35 | // Forcing chokidar version for now until new babel version is available 36 | // check out https://github.com/babel/babel/issues/11488 37 | if (pkg.dependencies.chokidar) { 38 | pkg.dependencies.chokidar = '^3.4.0'; 39 | } 40 | 41 | return pkg; 42 | } 43 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/frontend/image.css: -------------------------------------------------------------------------------- 1 | img { 2 | display: inline-block; 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/frontend/themes/vite-production/images/plant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-frontend/vite-production/frontend/themes/vite-production/images/plant.png -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/frontend/themes/vite-production/styles.css: -------------------------------------------------------------------------------- 1 | h2 { 2 | color: blue; 3 | } 4 | 5 | p { 6 | color: darkgreen; 7 | } 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/frontend/themes/vite-production/theme.json: -------------------------------------------------------------------------------- 1 | {"lumoImports":["typography","color","spacing","badge","utility"]} 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/frontend/yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-frontend/vite-production/frontend/yes.png -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/src/main/java/com/vaadin/viteapp/AppShell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2024 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.vaadin.viteapp; 24 | 25 | import com.vaadin.flow.component.page.AppShellConfigurator; 26 | import com.vaadin.flow.theme.Theme; 27 | 28 | @Theme(value = "vite-production") 29 | public class AppShell implements AppShellConfigurator {} 30 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/src/test/conf/vertx-vaadin-test.conf: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "port": 8888 4 | }, 5 | "vaadin": { 6 | "pnpm.enable": "false" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/src/test/java/com/vaadin/viteapp/ExternalPackageIT.java: -------------------------------------------------------------------------------- 1 | package com.vaadin.viteapp; 2 | 3 | import com.vaadin.flow.component.html.testbench.NativeButtonElement; 4 | import com.vaadin.flow.component.html.testbench.ParagraphElement; 5 | import com.vaadin.flow.testutil.ChromeBrowserTest; 6 | import com.vaadin.viteapp.views.empty.MainView; 7 | import org.junit.Assert; 8 | import org.junit.Test; 9 | 10 | public class ExternalPackageIT extends ChromeBrowserTest { 11 | 12 | @Test 13 | public void packageOutsideNpmWorks() { 14 | getDriver().get(getRootURL()); 15 | waitForDevServer(); 16 | $(NativeButtonElement.class).id(MainView.OUTSIDE).click(); 17 | Assert.assertEquals("It works - It works", $(ParagraphElement.class) 18 | .id(MainView.OUTSIDE_RESULT).getText()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/tsconfig.json: -------------------------------------------------------------------------------- 1 | // This TypeScript configuration file is generated by vaadin-maven-plugin. 2 | // This is needed for TypeScript compiler to compile your TypeScript code in the project. 3 | // It is recommended to commit this file to the VCS. 4 | // You might want to change the configurations to fit your preferences 5 | // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html 6 | { 7 | "_version": "9", 8 | "compilerOptions": { 9 | "sourceMap": true, 10 | "jsx": "react-jsx", 11 | "inlineSources": true, 12 | "module": "esNext", 13 | "target": "es2020", 14 | "moduleResolution": "bundler", 15 | "strict": true, 16 | "skipLibCheck": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "noImplicitReturns": true, 19 | "noImplicitAny": true, 20 | "noImplicitThis": true, 21 | "noUnusedLocals": false, 22 | "noUnusedParameters": false, 23 | "experimentalDecorators": true, 24 | "useDefineForClassFields": false, 25 | "baseUrl": "frontend", 26 | "paths": { 27 | "@vaadin/flow-frontend": ["generated/jar-resources"], 28 | "@vaadin/flow-frontend/*": ["generated/jar-resources/*"], 29 | "Frontend/*": ["*"] 30 | } 31 | }, 32 | "include": [ 33 | "frontend/**/*", 34 | "types.d.ts" 35 | ], 36 | "exclude": [ 37 | "frontend/generated/jar-resources/**" 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/types.d.ts: -------------------------------------------------------------------------------- 1 | // This TypeScript modules definition file is generated by vaadin-maven-plugin. 2 | // You can not directly import your different static files into TypeScript, 3 | // This is needed for TypeScript compiler to declare and export as a TypeScript module. 4 | // It is recommended to commit this file to the VCS. 5 | // You might want to change the configurations to fit your preferences 6 | declare module '*.css' { 7 | import { CSSResultGroup } from 'lit'; 8 | const content: CSSResultGroup; 9 | export default content; 10 | } 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-production/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { UserConfigFn } from 'vite'; 2 | import { overrideVaadinConfig } from './vite.generated'; 3 | 4 | const customConfig: UserConfigFn = (env) => ({ 5 | // Here you can add custom Vite parameters 6 | // https://vitejs.dev/config/ 7 | }); 8 | 9 | export default overrideVaadinConfig(customConfig); 10 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-custom-offline-path/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-custom-offline-path/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTICE: this is an auto-generated file 3 | * 4 | * This file has been generated for `pnpm install` task. 5 | * It is used to pin client side dependencies. 6 | * This file will be overwritten on every run. 7 | */ 8 | 9 | const fs = require('fs'); 10 | 11 | const versionsFile = require('path').resolve(__dirname, 'target/frontend/versions.json'); 12 | 13 | if (!fs.existsSync(versionsFile)) { 14 | return; 15 | } 16 | const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf-8')); 17 | 18 | module.exports = { 19 | hooks: { 20 | readPackage 21 | } 22 | }; 23 | 24 | function readPackage(pkg) { 25 | const { dependencies } = pkg; 26 | 27 | if (dependencies) { 28 | for (let k in versions) { 29 | if (dependencies[k] && dependencies[k] !== versions[k]) { 30 | pkg.dependencies[k] = versions[k]; 31 | } 32 | } 33 | } 34 | 35 | // Forcing chokidar version for now until new babel version is available 36 | // check out https://github.com/babel/babel/issues/11488 37 | if (pkg.dependencies.chokidar) { 38 | pkg.dependencies.chokidar = '^3.4.0'; 39 | } 40 | 41 | return pkg; 42 | } 43 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-custom-offline-path/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-custom-offline-path/src/main/java/com/vaadin/viteapp/AppShell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.component.page.AppShellConfigurator; 20 | import com.vaadin.flow.router.RouterLayout; 21 | import com.vaadin.flow.server.PWA; 22 | 23 | @PWA(name = "My PWA app", shortName = "app", offlinePath = "offline.html") 24 | public class AppShell extends Div 25 | implements RouterLayout, AppShellConfigurator { 26 | public AppShell() { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-custom-offline-path/src/main/java/com/vaadin/viteapp/MainView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.router.Route; 20 | 21 | @Route(value = "", layout = AppShell.class) 22 | public class MainView extends Div { 23 | } 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-custom-offline-path/src/main/webapp/offline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | PWA offline fallback 9 | 10 | 11 |
You are offline
12 | 13 | 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-custom-offline-path/tsconfig.json: -------------------------------------------------------------------------------- 1 | // This TypeScript configuration file is generated by vaadin-maven-plugin. 2 | // This is needed for TypeScript compiler to compile your TypeScript code in the project. 3 | // It is recommended to commit this file to the VCS. 4 | // You might want to change the configurations to fit your preferences 5 | // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html 6 | { 7 | "compilerOptions": { 8 | "sourceMap": true, 9 | "inlineSources": true, 10 | "module": "esNext", 11 | "target": "es2019", 12 | "moduleResolution": "node", 13 | "strict": true, 14 | "skipDefaultLibCheck": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitAny": true, 18 | "noImplicitThis": true, 19 | "noUnusedLocals": false, 20 | "noUnusedParameters": false, 21 | "experimentalDecorators": true, 22 | "baseUrl": "frontend", 23 | "paths": { 24 | "Frontend/*": [ 25 | "*" 26 | ] 27 | } 28 | }, 29 | "include": [ 30 | "frontend/**/*.ts", 31 | "frontend/index.js", 32 | "types.d.ts" 33 | ], 34 | "exclude": [] 35 | } 36 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-custom-offline-path/types.d.ts: -------------------------------------------------------------------------------- 1 | // This TypeScript modules definition file is generated by vaadin-maven-plugin. 2 | // You can not directly import your different static files into TypeScript, 3 | // This is needed for TypeScript compiler to declare and export as a TypeScript module. 4 | // It is recommended to commit this file to the VCS. 5 | // You might want to change the configurations to fit your preferences 6 | declare module '*.css' { 7 | import { CSSResultGroup } from 'lit'; 8 | const content: CSSResultGroup; 9 | export default content; 10 | } 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTICE: this is an auto-generated file 3 | * 4 | * This file has been generated for `pnpm install` task. 5 | * It is used to pin client side dependencies. 6 | * This file will be overwritten on every run. 7 | */ 8 | 9 | const fs = require('fs'); 10 | 11 | const versionsFile = require('path').resolve(__dirname, 'target/frontend/versions.json'); 12 | 13 | if (!fs.existsSync(versionsFile)) { 14 | return; 15 | } 16 | const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf-8')); 17 | 18 | module.exports = { 19 | hooks: { 20 | readPackage 21 | } 22 | }; 23 | 24 | function readPackage(pkg) { 25 | const { dependencies } = pkg; 26 | 27 | if (dependencies) { 28 | for (let k in versions) { 29 | if (dependencies[k] && dependencies[k] !== versions[k]) { 30 | pkg.dependencies[k] = versions[k]; 31 | } 32 | } 33 | } 34 | 35 | // Forcing chokidar version for now until new babel version is available 36 | // check out https://github.com/babel/babel/issues/11488 37 | if (pkg.dependencies.chokidar) { 38 | pkg.dependencies.chokidar = '^3.4.0'; 39 | } 40 | 41 | return pkg; 42 | } 43 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/src/main/java/com/vaadin/viteapp/AppShell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.component.page.AppShellConfigurator; 20 | import com.vaadin.flow.router.RouterLayout; 21 | import com.vaadin.flow.server.PWA; 22 | 23 | @PWA(name = "PWA app", shortName = "app", offline = false) 24 | public class AppShell extends Div 25 | implements RouterLayout, AppShellConfigurator { 26 | public AppShell() { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/src/main/java/com/vaadin/viteapp/ApplicationServiceInitListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.server.ServiceInitEvent; 19 | import com.vaadin.flow.server.VaadinServiceInitListener; 20 | 21 | public class ApplicationServiceInitListener 22 | implements VaadinServiceInitListener { 23 | @Override 24 | public void serviceInit(ServiceInitEvent event) { 25 | event.addRequestHandler((session, request, response) -> { 26 | if (request.getPathInfo().equals("/fake-sw.js")) { 27 | response.setStatus(200); 28 | response.setContentType("text/javascript"); 29 | response.setContentLength(0); 30 | return true; 31 | } 32 | 33 | return false; 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/src/main/java/com/vaadin/viteapp/MainView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.router.Route; 20 | 21 | @Route(value = "", layout = AppShell.class) 22 | public class MainView extends Div { 23 | } 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/src/main/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener: -------------------------------------------------------------------------------- 1 | com.vaadin.viteapp.ApplicationServiceInitListener 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/tsconfig.json: -------------------------------------------------------------------------------- 1 | // This TypeScript configuration file is generated by vaadin-maven-plugin. 2 | // This is needed for TypeScript compiler to compile your TypeScript code in the project. 3 | // It is recommended to commit this file to the VCS. 4 | // You might want to change the configurations to fit your preferences 5 | // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html 6 | { 7 | "compilerOptions": { 8 | "sourceMap": true, 9 | "inlineSources": true, 10 | "module": "esNext", 11 | "target": "es2019", 12 | "moduleResolution": "node", 13 | "strict": true, 14 | "skipDefaultLibCheck": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitAny": true, 18 | "noImplicitThis": true, 19 | "noUnusedLocals": false, 20 | "noUnusedParameters": false, 21 | "experimentalDecorators": true, 22 | "baseUrl": "frontend", 23 | "paths": { 24 | "Frontend/*": [ 25 | "*" 26 | ] 27 | } 28 | }, 29 | "include": [ 30 | "frontend/**/*.ts", 31 | "frontend/index.js", 32 | "types.d.ts" 33 | ], 34 | "exclude": [] 35 | } 36 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-disabled-offline/types.d.ts: -------------------------------------------------------------------------------- 1 | // This TypeScript modules definition file is generated by vaadin-maven-plugin. 2 | // You can not directly import your different static files into TypeScript, 3 | // This is needed for TypeScript compiler to declare and export as a TypeScript module. 4 | // It is recommended to commit this file to the VCS. 5 | // You might want to change the configurations to fit your preferences 6 | declare module '*.css' { 7 | import { CSSResultGroup } from 'lit'; 8 | const content: CSSResultGroup; 9 | export default content; 10 | } 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/.gitignore: -------------------------------------------------------------------------------- 1 | !**/index.html 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTICE: this is an auto-generated file 3 | * 4 | * This file has been generated for `pnpm install` task. 5 | * It is used to pin client side dependencies. 6 | * This file will be overwritten on every run. 7 | */ 8 | 9 | const fs = require('fs'); 10 | 11 | const versionsFile = require('path').resolve(__dirname, 'target/frontend/versions.json'); 12 | 13 | if (!fs.existsSync(versionsFile)) { 14 | return; 15 | } 16 | const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf-8')); 17 | 18 | module.exports = { 19 | hooks: { 20 | readPackage 21 | } 22 | }; 23 | 24 | function readPackage(pkg) { 25 | const { dependencies } = pkg; 26 | 27 | if (dependencies) { 28 | for (let k in versions) { 29 | if (dependencies[k] && dependencies[k] !== versions[k]) { 30 | pkg.dependencies[k] = versions[k]; 31 | } 32 | } 33 | } 34 | 35 | // Forcing chokidar version for now until new babel version is available 36 | // check out https://github.com/babel/babel/issues/11488 37 | if (pkg.dependencies.chokidar) { 38 | pkg.dependencies.chokidar = '^3.4.0'; 39 | } 40 | 41 | return pkg; 42 | } 43 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/about-view.ts: -------------------------------------------------------------------------------- 1 | class AboutView extends HTMLElement { 2 | connectedCallback() { 3 | this.innerHTML = `

About Page

` 4 | } 5 | } 6 | 7 | customElements.define('about-view', AboutView); 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/home-view.ts: -------------------------------------------------------------------------------- 1 | class HomeView extends HTMLElement { 2 | connectedCallback() { 3 | this.innerHTML = `

Home Page

` 4 | } 5 | } 6 | 7 | customElements.define('home-view', HomeView); 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/index.ts: -------------------------------------------------------------------------------- 1 | import './home-view'; 2 | import './about-view.ts'; 3 | import { Router } from '@vaadin/router'; 4 | 5 | const router = new Router(document.querySelector('#outlet')); 6 | 7 | router.setRoutes([ 8 | { 9 | path: '', 10 | component: 'home-view', 11 | }, 12 | { 13 | path: 'about', 14 | component: 'about-view', 15 | }, 16 | ]); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/fonts/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/fonts/Roboto-Regular.woff -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/images/bg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/images/bg.jpeg -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/styles.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Roboto'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url('./fonts/Roboto-Regular.woff') format('woff'); 6 | } 7 | 8 | body { 9 | font-family: 'Roboto'; 10 | background-image: url('./images/bg.jpeg'); 11 | background-size: cover; 12 | background-repeat: no-repeat; 13 | } 14 | 15 | #outlet { 16 | box-sizing: border-box; 17 | padding: var(--lumo-space-xl); 18 | } 19 | 20 | h1 { 21 | margin: 0 0 var(--lumo-space-xl); 22 | } 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/src/main/java/com/vaadin/viteapp/AppShell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.component.page.AppShellConfigurator; 20 | import com.vaadin.flow.router.RouterLayout; 21 | import com.vaadin.flow.server.PWA; 22 | import com.vaadin.flow.theme.Theme; 23 | 24 | @Theme("my-theme") 25 | @PWA(name = "My PWA app", shortName = "app") 26 | public class AppShell extends Div 27 | implements RouterLayout, AppShellConfigurator { 28 | public AppShell() { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/src/main/java/com/vaadin/viteapp/MainView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.router.Route; 20 | 21 | @Route(value = "", layout = AppShell.class) 22 | public class MainView extends Div { 23 | } 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/tsconfig.json: -------------------------------------------------------------------------------- 1 | // This TypeScript configuration file is generated by vaadin-maven-plugin. 2 | // This is needed for TypeScript compiler to compile your TypeScript code in the project. 3 | // It is recommended to commit this file to the VCS. 4 | // You might want to change the configurations to fit your preferences 5 | // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html 6 | { 7 | "compilerOptions": { 8 | "sourceMap": true, 9 | "inlineSources": true, 10 | "module": "esNext", 11 | "target": "es2019", 12 | "moduleResolution": "node", 13 | "strict": true, 14 | "skipDefaultLibCheck": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitAny": true, 18 | "noImplicitThis": true, 19 | "noUnusedLocals": false, 20 | "noUnusedParameters": false, 21 | "experimentalDecorators": true, 22 | "baseUrl": "frontend", 23 | "paths": { 24 | "Frontend/*": [ 25 | "*" 26 | ] 27 | } 28 | }, 29 | "include": [ 30 | "frontend/**/*.ts", 31 | "frontend/index.js", 32 | "types.d.ts" 33 | ], 34 | "exclude": [] 35 | } 36 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa-production/types.d.ts: -------------------------------------------------------------------------------- 1 | // This TypeScript modules definition file is generated by vaadin-maven-plugin. 2 | // You can not directly import your different static files into TypeScript, 3 | // This is needed for TypeScript compiler to declare and export as a TypeScript module. 4 | // It is recommended to commit this file to the VCS. 5 | // You might want to change the configurations to fit your preferences 6 | declare module '*.css' { 7 | import { CSSResultGroup } from 'lit'; 8 | const content: CSSResultGroup; 9 | export default content; 10 | } 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/.gitignore: -------------------------------------------------------------------------------- 1 | !**/index.html 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | strict-peer-dependencies=false 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTICE: this is an auto-generated file 3 | * 4 | * This file has been generated for `pnpm install` task. 5 | * It is used to pin client side dependencies. 6 | * This file will be overwritten on every run. 7 | */ 8 | 9 | const fs = require('fs'); 10 | 11 | const versionsFile = require('path').resolve(__dirname, 'target/frontend/versions.json'); 12 | 13 | if (!fs.existsSync(versionsFile)) { 14 | return; 15 | } 16 | const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf-8')); 17 | 18 | module.exports = { 19 | hooks: { 20 | readPackage 21 | } 22 | }; 23 | 24 | function readPackage(pkg) { 25 | const { dependencies } = pkg; 26 | 27 | if (dependencies) { 28 | for (let k in versions) { 29 | if (dependencies[k] && dependencies[k] !== versions[k]) { 30 | pkg.dependencies[k] = versions[k]; 31 | } 32 | } 33 | } 34 | 35 | // Forcing chokidar version for now until new babel version is available 36 | // check out https://github.com/babel/babel/issues/11488 37 | if (pkg.dependencies.chokidar) { 38 | pkg.dependencies.chokidar = '^3.4.0'; 39 | } 40 | 41 | return pkg; 42 | } 43 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/frontend/about-view.ts: -------------------------------------------------------------------------------- 1 | export class AboutView extends HTMLElement { 2 | connectedCallback() { 3 | this.innerHTML = `

About Page

` 4 | } 5 | } 6 | 7 | customElements.define('about-view', AboutView); 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/frontend/home-view.css: -------------------------------------------------------------------------------- 1 | home-view h1 { 2 | color: var(--lumo-primary-text-color); 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/frontend/home-view.ts: -------------------------------------------------------------------------------- 1 | import './home-view.css'; 2 | 3 | export class HomeView extends HTMLElement { 4 | connectedCallback() { 5 | this.innerHTML = `

Home Page

` 6 | } 7 | } 8 | 9 | customElements.define('home-view', HomeView); 10 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/frontend/index.ts: -------------------------------------------------------------------------------- 1 | import { Router } from '@vaadin/router'; 2 | 3 | const router = new Router(document.querySelector('#outlet')); 4 | 5 | router.setRoutes([ 6 | { 7 | path: '', 8 | component: 'home-view', 9 | async action() { 10 | await import('./home-view.js'); 11 | } 12 | }, 13 | { 14 | path: 'about', 15 | component: 'about-view', 16 | async action() { 17 | await import('./about-view.js'); 18 | } 19 | }, 20 | ]); 21 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/frontend/themes/my-theme/fonts/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-frontend/vite-pwa/frontend/themes/my-theme/fonts/Roboto-Regular.woff -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/frontend/themes/my-theme/images/bg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-frontend/vite-pwa/frontend/themes/my-theme/images/bg.jpeg -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/frontend/themes/my-theme/styles.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Roboto'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url('./fonts/Roboto-Regular.woff') format('woff'); 6 | } 7 | 8 | body { 9 | font-family: 'Roboto'; 10 | background-image: url('./images/bg.jpeg'); 11 | background-size: cover; 12 | background-repeat: no-repeat; 13 | } 14 | 15 | #outlet { 16 | box-sizing: border-box; 17 | padding: var(--lumo-space-xl); 18 | } 19 | 20 | h1 { 21 | margin: 0 0 var(--lumo-space-xl); 22 | } 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/src/main/java/com/vaadin/viteapp/AppShell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.component.page.AppShellConfigurator; 20 | import com.vaadin.flow.router.RouterLayout; 21 | import com.vaadin.flow.server.PWA; 22 | import com.vaadin.flow.theme.Theme; 23 | 24 | @Theme("my-theme") 25 | @PWA(name = "My PWA app", shortName = "app") 26 | public class AppShell extends Div 27 | implements RouterLayout, AppShellConfigurator { 28 | public AppShell() { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/src/main/java/com/vaadin/viteapp/MainView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2022 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.vaadin.viteapp; 17 | 18 | import com.vaadin.flow.component.html.Div; 19 | import com.vaadin.flow.router.Route; 20 | 21 | @Route(value = "", layout = AppShell.class) 22 | public class MainView extends Div { 23 | } 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/tsconfig.json: -------------------------------------------------------------------------------- 1 | // This TypeScript configuration file is generated by vaadin-maven-plugin. 2 | // This is needed for TypeScript compiler to compile your TypeScript code in the project. 3 | // It is recommended to commit this file to the VCS. 4 | // You might want to change the configurations to fit your preferences 5 | // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html 6 | { 7 | "compilerOptions": { 8 | "sourceMap": true, 9 | "inlineSources": true, 10 | "module": "esNext", 11 | "target": "es2019", 12 | "moduleResolution": "node", 13 | "strict": true, 14 | "skipDefaultLibCheck": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitAny": true, 18 | "noImplicitThis": true, 19 | "noUnusedLocals": false, 20 | "noUnusedParameters": false, 21 | "experimentalDecorators": true, 22 | "baseUrl": "frontend", 23 | "paths": { 24 | "Frontend/*": [ 25 | "*" 26 | ] 27 | } 28 | }, 29 | "include": [ 30 | "frontend/**/*.ts", 31 | "frontend/index.js", 32 | "types.d.ts" 33 | ], 34 | "exclude": [] 35 | } 36 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-pwa/types.d.ts: -------------------------------------------------------------------------------- 1 | // This TypeScript modules definition file is generated by vaadin-maven-plugin. 2 | // You can not directly import your different static files into TypeScript, 3 | // This is needed for TypeScript compiler to declare and export as a TypeScript module. 4 | // It is recommended to commit this file to the VCS. 5 | // You might want to change the configurations to fit your preferences 6 | declare module '*.css' { 7 | import { CSSResultGroup } from 'lit'; 8 | const content: CSSResultGroup; 9 | export default content; 10 | } 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/.gitignore: -------------------------------------------------------------------------------- 1 | !packages/**/package.json 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/all/all.js: -------------------------------------------------------------------------------- 1 | import '@testscope/button'; 2 | import '@testscope/map'; 3 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/all/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@testscope/all", 3 | "version": "1.0.0", 4 | "description": "", 5 | "type": "module", 6 | "main": "all.js", 7 | "module": "all.js", 8 | "scripts": { 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "author": "Vaadin Ltd", 12 | "license": "Apache-2.0" 13 | } 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/button/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@testscope/button", 3 | "version": "1.0.0", 4 | "description": "", 5 | "type": "module", 6 | "main": "testscope-button.js", 7 | "module": "testscope-button.js", 8 | "scripts": { 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "author": "Vaadin Ltd", 12 | "license": "Apache-2.0" 13 | } 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/button/src/testscope-button.js: -------------------------------------------------------------------------------- 1 | export class Button extends HTMLElement { 2 | static get is() { 3 | return 'testscope-button'; 4 | } 5 | 6 | connectedCallback() { 7 | if (!this.textContent) { 8 | this.textContent = 'testscope-button NOT from bundle'; 9 | } 10 | } 11 | 12 | get isFromBundle() { 13 | return false; 14 | } 15 | } 16 | 17 | customElements.define('testscope-button', Button); 18 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/button/testscope-button.js: -------------------------------------------------------------------------------- 1 | export * from './src/testscope-button.js' -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/map/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@testscope/map", 3 | "version": "1.0.0", 4 | "description": "", 5 | "type": "module", 6 | "main": "testscope-map.js", 7 | "module": "testscope-map.js", 8 | "scripts": { 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "author": "Vaadin Ltd", 12 | "license": "Apache-2.0" 13 | } 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/map/src/lib.js: -------------------------------------------------------------------------------- 1 | export default { 2 | MAP: 'map', 3 | }; -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/map/src/testscope-map.js: -------------------------------------------------------------------------------- 1 | import { default as lib } from '@testscope/map/src/lib.js'; 2 | 3 | export class Map extends HTMLElement { 4 | static get is() { 5 | return 'testscope-map'; 6 | } 7 | 8 | connectedCallback() { 9 | if (!this.textContent) { 10 | this.textContent = `testscope-${lib.MAP} NOT from bundle`; 11 | } 12 | } 13 | 14 | get isFromBundle() { 15 | return false; 16 | } 17 | } 18 | 19 | customElements.define('testscope-map', Map); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@testscope/map/testscope-map.js: -------------------------------------------------------------------------------- 1 | export * from './src/testscope-map.js' -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@vaadin/bundles-old/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@test/bundles", 3 | "version": "0.1.0", 4 | "description": "", 5 | "type": "module", 6 | "main": "vaadin.js", 7 | "module": "vaadin.js", 8 | "scripts": { 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "author": "Vaadin Ltd", 12 | "license": "Apache-2.0" 13 | } 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@vaadin/bundles-old/vaadin.js: -------------------------------------------------------------------------------- 1 | throw new Error('Unexpected use of the bundle!'); -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/@vaadin/bundles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vaadin/bundles", 3 | "version": "1.0.0", 4 | "description": "", 5 | "type": "module", 6 | "main": "vaadin.js", 7 | "module": "vaadin.js", 8 | "scripts": { 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "author": "Vaadin Ltd", 12 | "license": "Apache-2.0" 13 | } 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/package-outside-npm/index.js: -------------------------------------------------------------------------------- 1 | window.packageOutsideNpm = () => { 2 | return "It works"; 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/package-outside-npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-outside-npm", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "postinstall": "echo 'hello' > ../target/classs/package-outside-npm.postinstall" 9 | }, 10 | "author": "", 11 | "license": "Apache-2.0" 12 | } 13 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/package2-outside-npm/index.js: -------------------------------------------------------------------------------- 1 | window.package2OutsideNpm = () => { 2 | return "It works"; 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/packages/package2-outside-npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package2-outside-npm", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "postinstall": "echo 'hello' > ../target/classs/package2-outside-npm.postinstall" 9 | }, 10 | "author": "", 11 | "license": "Apache-2.0" 12 | } 13 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/src/main/resources/META-INF/frontend/bad.ts: -------------------------------------------------------------------------------- 1 | let hello: any; // Must be initialized 2 | 3 | function foo(err: any) { // parameter declared but not read 4 | this.emit('end'); // `this` implicitly has type `any` 5 | } 6 | 7 | function func1(bar) { // Parameter 'bar' implicitly has an 'any' type. 8 | const baz = "a"; // Local declared but never used 9 | 10 | return bar + 'a'; 11 | } 12 | 13 | (window as any).bad = function() { 14 | return "good"; 15 | } 16 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/src/main/resources/META-INF/frontend/templates/LitComponent.ts: -------------------------------------------------------------------------------- 1 | import { html, LitElement } from 'lit'; 2 | 3 | class LitComponent extends LitElement { 4 | render() { 5 | return html`
6 |

Local Lit component

7 | Default 8 |
`; 9 | } 10 | } 11 | 12 | customElements.define('lit-component', LitComponent); 13 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/src/main/resources/META-INF/frontend/templates/PolymerComponent.ts: -------------------------------------------------------------------------------- 1 | import {PolymerElement,html} from '@polymer/polymer/polymer-element.js'; 2 | 3 | class PolymerComponent extends PolymerElement { 4 | 5 | static get template() { 6 | return html`
7 |

Local Polymer component

8 | Default 9 |
`; 10 | } 11 | 12 | static get is() { 13 | return 'polymer-component'; 14 | } 15 | } 16 | 17 | customElements.define(PolymerComponent.is, PolymerComponent); 18 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-frontend/vite-test-assets/src/main/resources/META-INF/frontend/templates/ReflectivelyReferencedComponent.ts: -------------------------------------------------------------------------------- 1 | import { html, LitElement } from 'lit'; 2 | 3 | class ReflectivelyReferencedComponent extends LitElement { 4 | render() { 5 | return html`ReflectivelyReferencedComponent contents`; 6 | } 7 | } 8 | 9 | customElements.define('reflectively-referenced-component', ReflectivelyReferencedComponent); 10 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-lumo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.github.mcollovati.vertx.tests 8 | vertx-vaadin-test 9 | 24.6-SNAPSHOT 10 | 11 | flow-test-lumo 12 | Lumo class for use in test modules requiring LUMO 13 | jar 14 | 15 | true 16 | true 17 | 18 | 19 | 20 | com.github.mcollovati.vertx.tests 21 | vertx-vaadin-test-resources 22 | ${project.version} 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-lumo/src/main/resources/META-INF/resources/frontend/lumo-includes.ts: -------------------------------------------------------------------------------- 1 | import { color } from '@vaadin/vaadin-lumo-styles'; 2 | import { typography } from '@vaadin/vaadin-lumo-styles'; 3 | 4 | const tpl = document.createElement('template'); 5 | tpl.innerHTML = ``; 9 | document.head.appendChild(tpl.content); 10 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.github.mcollovati.vertx.tests 7 | vertx-vaadin-test 8 | 24.6-SNAPSHOT 9 | ../pom.xml 10 | 11 | vertx-vaadin-test-resources 12 | Flow Test Resources 13 | Static resources shared between test modules 14 | jar 15 | 16 | true 17 | 18 | 19 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/java/com/vaadin/flow/uitest/ui/dependencies/TestVersion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2024 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.vaadin.flow.uitest.ui.dependencies; 24 | 25 | public class TestVersion { 26 | public static final String VAADIN = "24.3.2"; 27 | public static final String FONTAWESOME = "5.15.1"; 28 | } 29 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/css/allblueimportant.css: -------------------------------------------------------------------------------- 1 | * { 2 | color: blue !important; 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/css/allred.css: -------------------------------------------------------------------------------- 1 | * { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/html/combinedMixed.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/html/htmlimport1.html: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/html/htmlimport2.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/html/htmlimport4-js.js: -------------------------------------------------------------------------------- 1 | window.logMessage = function(msg) { 2 | var d = document.createElement("div"); 3 | d.innerText = msg; 4 | d.classList.add("message"); 5 | document.body.appendChild(d); 6 | }; 7 | 8 | window.addEventListener('WebComponentsReady', function(e) { 9 | logMessage("HTML import 4 companion JS loaded"); 10 | }); 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/html/htmlimport4.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/html/mixedImport1.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/html/mixedImport2.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/html/orderedHtmlImport.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/js/body-click-listener.js: -------------------------------------------------------------------------------- 1 | document.body.addEventListener("click", function(e) { 2 | if (e.target != document.body) { 3 | // Ignore clicks on other elements 4 | return; 5 | } 6 | var d = document.createElement("div"); 7 | d.innerText = "Click on body, reported by JavaScript click handler"; 8 | d.classList.add("body-click-added"); 9 | document.body.appendChild(d); 10 | }); 11 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/js/read-global-var.js: -------------------------------------------------------------------------------- 1 | var log = document.createElement("div"); 2 | log.id = "read-global-var-text"; 3 | log.textContent = "Second script loaded. Global variable (window.globalVar) is: '" + window.globalVar+"'"; 4 | document.body.insertBefore(log, null); 5 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/js/script1.js: -------------------------------------------------------------------------------- 1 | window.logMessage('script1 is loaded'); 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/js/script2.js: -------------------------------------------------------------------------------- 1 | window.logMessage('script2 is loaded'); 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/META-INF/resources/test-files/js/set-global-var.js: -------------------------------------------------------------------------------- 1 | window.globalVar = "Set by set-global-var.js"; 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-resources/src/main/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.defaultLogLevel = info 2 | org.slf4j.simpleLogger.log.org.atmosphere = warn 3 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/.gitignore: -------------------------------------------------------------------------------- 1 | .npmrc 2 | frontend/generated/ 3 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/AfterServerChanges.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class AfterServerChanges extends PolymerElement { 5 | static get template() { 6 | return html` 7 |
[[text]]
8 |
[[count]]
9 |
[[delta]]
10 | `; 11 | } 12 | 13 | static get properties(){ 14 | return { 15 | count: { 16 | type: Number, 17 | value: 0 18 | }, 19 | old: { 20 | type: String, 21 | value: "" 22 | }, 23 | delta: { 24 | type: Boolean, 25 | value: false 26 | } 27 | } 28 | } 29 | 30 | static get is() { 31 | return 'after-server-changes' 32 | } 33 | 34 | afterServerUpdate(){ 35 | this.delta = this.old != this.text; 36 | this.count++; 37 | this.old = this.text; 38 | } 39 | 40 | } 41 | 42 | customElements.define(AfterServerChanges.is, AfterServerChanges); 43 | 44 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/AttachExistingDomElementById.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ExistingDomElement extends PolymerElement { 5 | static get template() { 6 | return html` 7 |
8 | 9 |
10 | 11 |
12 |
13 | 14 | `; 15 | } 16 | static get is() { 17 | return 'existing-dom-element' 18 | } 19 | 20 | } 21 | 22 | customElements.define(ExistingDomElement.is, ExistingDomElement); 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/BasicTypeList.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import '@polymer/polymer/lib/elements/dom-repeat.js'; 4 | 5 | 6 | class BasicTypeList extends PolymerElement { 7 | static get template() { 8 | return html` 9 | 12 | `; 13 | } 14 | static get is() { 15 | return 'basic-type-list' 16 | } 17 | 18 | } 19 | 20 | customElements.define(BasicTypeList.is, BasicTypeList); 21 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/BeanInListing.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import '@polymer/polymer/lib/elements/dom-repeat.js'; 4 | 5 | class BeanListing extends PolymerElement { 6 | static get template() { 7 | return html` 8 | 11 | 12 | 15 | 16 | 17 | `; 18 | } 19 | static get is() { 20 | return 'listing-bean-view' 21 | } 22 | 23 | static get properties(){ 24 | return { 25 | activeUser: { 26 | type: Object, 27 | value: {}, 28 | notify: true 29 | }, 30 | activeMessage: { 31 | type: String, 32 | value: null, 33 | notify: true 34 | } 35 | }; 36 | } 37 | 38 | handleUserClick(event){ 39 | this.activeUser = event.model.item; 40 | } 41 | 42 | handleMsgClick(event){ 43 | this.activeMessage = event.model.item; 44 | } 45 | } 46 | 47 | customElements.define(BeanListing.is, BeanListing); 48 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ChangeInjectedComponentTextView.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ChangeInjectedComponentTextView extends PolymerElement { 5 | static get template() { 6 | return html` 7 |
8 |
9 | Foo 10 | 11 | Baz 12 |
13 |
14 | `; 15 | } 16 | 17 | static get is() { 18 | return 'update-injected-component-text' 19 | } 20 | } 21 | 22 | customElements.define(ChangeInjectedComponentTextView.is, ChangeInjectedComponentTextView); 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ChildIdTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ChildIdTemplate extends PolymerElement { 5 | static get is() { return 'child-id-template' } 6 | 7 | static get template() { 8 | return html` 9 |
10 |
Child template
11 |
12 |
13 | `; 14 | } 15 | } 16 | customElements.define(ChildIdTemplate.is, ChildIdTemplate); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ChildTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ChildTemplate extends PolymerElement { 5 | static get is() { return 'child-template' } 6 | 7 | static get template() { 8 | return html` 9 |
Child Template
10 |
[[text]]
11 | `; 12 | } 13 | } 14 | customElements.define(ChildTemplate.is, ChildTemplate); 15 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ClearList.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import '@polymer/polymer/lib/elements/dom-repeat.js'; 4 | 5 | class ClearList extends PolymerElement { 6 | static get is() { 7 | return 'clear-list' 8 | } 9 | 10 | static get template() { 11 | return html` 12 | 15 | 16 | `; 17 | } 18 | } 19 | customElements.define(ClearList.is, ClearList); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ClientUpdateMode.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MyTemplate extends PolymerElement { 5 | static get is() { return 'client-update-mode' } 6 | 7 | static get template() { 8 | return html` 9 | Basic value:
10 | Two-way denied:
11 | Indirect value: [[indirect]]
12 | Indirect allowed value: [[indirectAllowed]]
13 |
14 | `; 15 | } 16 | 17 | updateIndirect() { 18 | this.indirect = this.value; 19 | this.indirectAllowed = this.value; 20 | } 21 | } 22 | customElements.define(MyTemplate.is, MyTemplate); 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ConvertToBean.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ConvertToBean extends PolymerElement { 5 | static get is() { 6 | return 'convert-to-bean' 7 | } 8 | 9 | static get template() { 10 | return html` 11 | 16 |
[[bean.day]]
17 |
18 | 19 | 20 | 21 | 22 | 23 |
24 | `; 25 | } 26 | } 27 | customElements.define(ConvertToBean.is, ConvertToBean); 28 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/DomListenerOnAttach.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class EventOnAttach extends PolymerElement { 5 | static get template() { 6 | return html` 7 | Fires an event when attached 8 | `; 9 | } 10 | static get is() { 11 | return 'event-on-attach' 12 | } 13 | 14 | connectedCallback() { 15 | super.connectedCallback(); 16 | 17 | this.dispatchEvent(new CustomEvent('attach')); 18 | } 19 | } 20 | 21 | customElements.define(EventOnAttach.is, EventOnAttach); 22 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/DomRepeatPolymerTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import '@polymer/polymer/lib/elements/dom-repeat.js'; 4 | 5 | class EmployeesList extends PolymerElement { 6 | static get is() { 7 | return 'employees-list' 8 | } 9 | 10 | static get template() { 11 | return html` 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 26 |
NameTitleEmail
27 | 28 |
[[eventIndex]]
29 |
[[repeatIndex]]
30 | `; 31 | } 32 | } 33 | customElements.define(EmployeesList.is, EmployeesList); 34 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/EmptyLists.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class EmptyList extends PolymerElement { 5 | static get is() { 6 | return 'empty-list' 7 | } 8 | 9 | static get template() { 10 | return html` 11 | 16 | `; 17 | } 18 | } 19 | customElements.define(EmptyList.is, EmptyList); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ExceptionsDuringPropertyUpdates.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ExceptionsDuringPropertyUpdates extends PolymerElement { 5 | static get is() { return 'exceptions-property-update' } 6 | 7 | static get template() { 8 | return html` 9 | 10 | 11 | `; 12 | } 13 | 14 | static get properties() { 15 | return { 16 | text :{ 17 | type: String, 18 | notify: true, 19 | }, 20 | name :{ 21 | type: String, 22 | notify: true 23 | }, 24 | title :{ 25 | type: String, 26 | notify: true 27 | } 28 | }; 29 | } 30 | 31 | _handleClick() { 32 | this.title ="foo"; 33 | this.name="bar"; 34 | this.text="baz"; 35 | } 36 | } 37 | customElements.define(ExceptionsDuringPropertyUpdates.is, ExceptionsDuringPropertyUpdates); 38 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/HiddenTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class HiddenTemplate extends PolymerElement { 5 | static get is() { 6 | return 'hidden-template' 7 | } 8 | 9 | static get template() { 10 | return html` 11 | 12 |
Bar
13 | 14 | `; 15 | } 16 | 17 | } 18 | customElements.define(HiddenTemplate.is, HiddenTemplate); 19 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/InjectScriptTagTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class InjectScriptTagTemplate extends PolymerElement { 5 | static get is() { return 'inject-script-tag-template' } 6 | 7 | onButtonClick() { 8 | this.$server.changeValue(); 9 | } 10 | 11 | static get template() { 12 | return html` 13 |
[[value]]
14 | 15 | 16 | `; 17 | } 18 | } 19 | 20 | customElements.define(InjectScriptTagTemplate.is, InjectScriptTagTemplate); 21 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/InjectedChild.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class InjectedChild extends PolymerElement { 5 | static get is() { 6 | return 'injected-child' 7 | } 8 | 9 | static get template() { 10 | return html` 11 |
[[text]]
12 | `; 13 | } 14 | } 15 | 16 | customElements.define(InjectedChild.is, InjectedChild); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/InjectsJsTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import './JsInjectedElement.js'; 4 | 5 | class InjectsJsTemplate extends PolymerElement { 6 | static get is() { return 'injects-js-template' } 7 | 8 | static get template() { 9 | return html` 10 | 11 |
12 | `; 13 | } 14 | } 15 | 16 | customElements.define(InjectsJsTemplate.is, InjectsJsTemplate); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/JsGrandParent.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class JsGrandTemplate extends PolymerElement { 5 | static get is() { 6 | return 'js-grand-parent' 7 | } 8 | 9 | updateSubTempate(){ 10 | this.$['sub-template'].foo='baz'; 11 | } 12 | 13 | static get template() { 14 | return html` 15 | 16 | `; 17 | } 18 | } 19 | customElements.define(JsGrandTemplate.is, JsGrandTemplate); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/JsInjectedElement.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class JsInjectedTemplate extends PolymerElement { 5 | static get is() { return 'js-injected-template' } 6 | 7 | clientHandler() { 8 | this.$server.handleClientCall("bar"); 9 | } 10 | 11 | static get template() { 12 | return html` 13 | 14 | 15 | `; 16 | } 17 | } 18 | 19 | customElements.define(JsInjectedTemplate.is, JsInjectedTemplate); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/JsInjectedGrandChild.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class JsInjectedGrandChild extends PolymerElement { 5 | static get is() { return 'js-injected-grand-child' } 6 | 7 | greet() { 8 | this.$server.handleClientCall("bar"); 9 | } 10 | 11 | static get template() { 12 | return html` 13 | 14 |
[[bar]]
15 | `; 16 | } 17 | } 18 | 19 | customElements.define(JsInjectedGrandChild.is, JsInjectedGrandChild); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/JsSubTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class JsSubTemplate extends PolymerElement { 5 | static get is() { 6 | return 'js-sub-template' 7 | } 8 | 9 | static get template() { 10 | return html` 11 |
[[foo]]
12 | 13 | `; 14 | } 15 | } 16 | customElements.define(JsSubTemplate.is, JsSubTemplate); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ListInsideListBinding.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import '@polymer/polymer/lib/elements/dom-repeat.js'; 4 | import '@polymer/polymer/lib/elements/dom-if.js'; 5 | 6 | class ListInsideListBinding extends PolymerElement { 7 | static get is() { 8 | return 'list-inside-list-binding' 9 | } 10 | 11 | static get template() { 12 | return html` 13 | 14 | 21 | 22 | 25 | 26 | 27 | `; 28 | } 29 | } 30 | customElements.define(ListInsideListBinding.is, ListInsideListBinding); 31 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/MixinInjectsElement.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement, html} from '@polymer/polymer'; 2 | import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js'; 3 | import {IronResizableBehavior} from '@polymer/iron-resizable-behavior/iron-resizable-behavior.js'; 4 | 5 | class MixinInjects extends mixinBehaviors([IronResizableBehavior], PolymerElement) { 6 | static get is() { 7 | return 'mixin-injects' 8 | } 9 | 10 | static get template() { 11 | return html` 12 |
13 | `; 14 | } 15 | } 16 | customElements.define(MixinInjects.is, MixinInjects); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/MultiplePropsMutation.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MultiplePropsMutation extends PolymerElement { 5 | static get is() { return 'multiple-props-mutation' } 6 | 7 | static get template() { 8 | return html` 9 | 10 | 11 | 12 | `; 13 | } 14 | 15 | static get properties() { 16 | return { 17 | name :{ 18 | type: String, 19 | notify: true 20 | }, 21 | message :{ 22 | type: String, 23 | notify: true 24 | }, 25 | }; 26 | } 27 | } 28 | customElements.define(MultiplePropsMutation.is, MultiplePropsMutation); 29 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/OneWayPolymerBinding.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import '@polymer/polymer/lib/elements/dom-if.js'; 4 | 5 | class MyTemplate extends PolymerElement { 6 | static get is() { return 'my-one-way-template' } 7 | 8 | static get template() { 9 | return html` 10 |
[[message]]
11 |
[[title]]
12 | 13 | 14 | 17 | 20 | `; 21 | } 22 | } 23 | customElements.define(MyTemplate.is, MyTemplate); 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ParentIdTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ParentIdTemplate extends PolymerElement { 5 | static get is() { return 'parent-id-template' } 6 | 7 | static get template() { 8 | return html` 9 | 15 |
Parent Template
16 | 17 | 18 | `; 19 | } 20 | } 21 | customElements.define(ParentIdTemplate.is, ParentIdTemplate); 22 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ParentTemplate.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import './ChildTemplate.js'; 4 | 5 | class ParentTemplate extends PolymerElement { 6 | static get is() { return 'parent-template' } 7 | 8 | static get template() { 9 | return html` 10 |
Parent Template
11 |
12 |
Placeholder
13 | 14 | 15 | 16 |
17 | 23 | `; 24 | } 25 | } 26 | customElements.define(ParentTemplate.is, ParentTemplate); 27 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ParentTemplateInjectChild.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ParentInjectChild extends PolymerElement { 5 | static get is() { 6 | return 'parent-inject-child' 7 | } 8 | 9 | static get template() { 10 | return html` 11 | 12 | 13 | `; 14 | } 15 | } 16 | customElements.define(ParentInjectChild.is, ParentInjectChild); 17 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/PolymerDefaultPropertyValue.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MyTemplate extends PolymerElement { 5 | static get is() { return 'default-property' } 6 | 7 | static get template() { 8 | return html` 9 |
[[text]]
10 |
[[name]]
11 |
[[message]]
12 |
[[email]]
13 | `; 14 | } 15 | 16 | static get properties(){ 17 | return { 18 | text: { 19 | type: String, 20 | value: "" 21 | }, 22 | name :{ 23 | type: String, 24 | value: "bar" 25 | }, 26 | message :{ 27 | type: String, 28 | value: "msg", 29 | notify: true 30 | }, 31 | email :{ 32 | type: String, 33 | value: "foo@example.com", 34 | notify: true 35 | } 36 | }; 37 | } 38 | } 39 | customElements.define(MyTemplate.is, MyTemplate); 40 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/PolymerModelProperties.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MyTemplate extends PolymerElement { 5 | static get is() { return 'model-properties' } 6 | 7 | static get properties() { 8 | return { 9 | text :{ 10 | type: String, 11 | notify: true 12 | } 13 | }; 14 | } 15 | 16 | static get template() { 17 | return html` 18 | 19 | `; 20 | } 21 | } 22 | customElements.define(MyTemplate.is, MyTemplate); 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/PolymerPropertyChange.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MyTemplate extends PolymerElement { 5 | static get is() { return 'property-change' } 6 | 7 | static get properties() { 8 | return { 9 | text: { 10 | type: String, 11 | notify: true 12 | } 13 | }; 14 | } 15 | 16 | static get template() { 17 | return html` 18 | 19 | `; 20 | } 21 | } 22 | customElements.define(MyTemplate.is, MyTemplate); 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/PolymerPropertyMutationInObserver.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MyTemplate extends PolymerElement { 5 | static get is() { return 'property-mutation-in-observer' } 6 | 7 | static get template() { 8 | return html` 9 | 10 | `; 11 | } 12 | 13 | static get properties() { 14 | return { 15 | text: { 16 | type: String, 17 | observer: '_onTextChanged' 18 | } 19 | }; 20 | } 21 | 22 | _onTextChanged(current, previous) { 23 | if (this.text && this.text !== 'mutated') { 24 | this.text = 'mutated'; 25 | } 26 | } 27 | } 28 | customElements.define(MyTemplate.is, MyTemplate); 29 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/PropertiesUpdatedBeforeChangeEvents.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class PropertiesUpdatedBeforeChangeEvents extends PolymerElement { 5 | static get is() { return 'properties-updated-before-change-events' } 6 | 7 | static get template() { 8 | return html` 9 | 10 |
[[secondProp]]
11 |
[[text]]
12 | `; 13 | } 14 | 15 | static get properties(){ 16 | return { 17 | firstProp: { 18 | type: String, 19 | value: "", 20 | observer: '_firstPropChanged', 21 | notify: true 22 | } 23 | } 24 | } 25 | 26 | _firstPropChanged(newVal, oldVal) { 27 | this.secondProp = newVal; 28 | } 29 | } 30 | customElements.define(PropertiesUpdatedBeforeChangeEvents.is, PropertiesUpdatedBeforeChangeEvents); 31 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ServerModelNullList.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ServerModelNullList extends PolymerElement { 5 | static get is() { return 'server-model-null-list'; } 6 | 7 | static get template() { 8 | return html` 9 | This custom element has a corresponding server model with List property that is never changed. 10 | `; 11 | } 12 | } 13 | 14 | window.customElements.define(ServerModelNullList.is, ServerModelNullList); 15 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/ServerRequest.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class ServerRequest extends PolymerElement { 5 | static get template() { 6 | return html` 7 |
8 | 9 | `; 10 | } 11 | static get is() { 12 | return 'server-request' 13 | } 14 | 15 | _requestServer(){ 16 | this.$server.requestServer(); 17 | } 18 | } 19 | 20 | customElements.define(ServerRequest.is, ServerRequest); 21 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/SubPropertyModel.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class SubPropertyModel extends PolymerElement { 5 | static get is() { 6 | return 'sub-property-model' 7 | } 8 | 9 | static get template() { 10 | return html` 11 |
[[status.message]]
12 | 13 | 14 | 15 | `; 16 | } 17 | 18 | sync() { 19 | this.set("status.message", "Set from the client"); 20 | } 21 | } 22 | customElements.define(SubPropertyModel.is, SubPropertyModel); 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/TemplateMappingDetector.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class TemplateMappingDetector extends PolymerElement { 5 | static get is() { return 'template-mapping-detector' } 6 | 7 | static get template() { 8 | return html` 9 |
10 |
11 | `; 12 | } 13 | } 14 | customElements.define(TemplateMappingDetector.is, TemplateMappingDetector); 15 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/TemplateMappingDetectorParent.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class TemplateMappingDetectorParent extends PolymerElement { 5 | static get is() { return 'template-mapping-detector-parent' } 6 | 7 | static get template() { 8 | return html` 9 | 10 | `; 11 | } 12 | } 13 | customElements.define(TemplateMappingDetectorParent.is, TemplateMappingDetectorParent); 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/TemplateProperties.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class TemplateProperties extends PolymerElement { 5 | static get is() { return 'template-properties' } 6 | 7 | static get template() { 8 | return html` 9 |
[[name]]
10 | 11 | `; 12 | } 13 | } 14 | customElements.define(TemplateProperties.is, TemplateProperties); 15 | 16 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/TemplateWithConnectedCallbacks.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class TemplateWithConnectedCallbacks extends PolymerElement { 5 | static get properties() { 6 | return { 7 | connected: { 8 | type: String, 9 | value: "Not connected", 10 | notify: true 11 | } 12 | } 13 | } 14 | static get is() { return 'template-with-connected-callbacks' } 15 | 16 | connectedCallback() { 17 | super.connectedCallback(); 18 | this.connected = "Connected"; 19 | } 20 | 21 | disconnectedCallback() { 22 | super.disconnectedCallback(); 23 | this.connected = "Not connected"; 24 | } 25 | static get template() { 26 | return html` 27 |
{{connected}}
28 | `; 29 | } 30 | } 31 | customElements.define(TemplateWithConnectedCallbacks.is, TemplateWithConnectedCallbacks); 32 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/TemplateWithInjectedId.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class TemplateWithInjectedId extends PolymerElement { 5 | static get is() { return 'template-with-injected-id' } 6 | 7 | static get template() { 8 | return html` 9 |
10 |
11 | `; 12 | } 13 | } 14 | customElements.define(TemplateWithInjectedId.is, TemplateWithInjectedId); 15 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/TwoWayListBinding.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import '@polymer/polymer/lib/elements/dom-repeat.js'; 4 | 5 | class TwoWayListBinding extends PolymerElement { 6 | static get is() { 7 | return 'two-way-list-binding' 8 | } 9 | 10 | static get template() { 11 | return html` 12 |
13 | 18 | 19 |
20 | `; 21 | } 22 | } 23 | customElements.define(TwoWayListBinding.is, TwoWayListBinding); 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/TwoWayPolymerBinding.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | 5 | class MyTemplate extends PolymerElement { 6 | static get is() { return 'my-template' } 7 | 8 | static get properties(){ 9 | return { 10 | value: { 11 | type: String, 12 | value: "foo", 13 | notify: true 14 | } 15 | } 16 | } 17 | 18 | static get template() { 19 | return html` 20 | 21 |
[[status]]
22 | 23 | `; 24 | } 25 | } 26 | customElements.define(MyTemplate.is, MyTemplate); 27 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/UpgradeElement.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class MyTemplate extends PolymerElement { 5 | static get is() { return 'upgrade-element' } 6 | 7 | static get template() { 8 | return html` 9 | 10 | `; 11 | } 12 | } 13 | 14 | window.MyTemplate = MyTemplate; 15 | 16 | customElements.whenDefined('upgrade-element').then(function () { 17 | window.upgradeElementDefined = true; 18 | }); 19 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/CustomCustomElement.js: -------------------------------------------------------------------------------- 1 | // A custom element that isn't using Polymer 2 | class CustomCustomElement extends HTMLElement { 3 | static get is() { return 'custom-custom-element' } 4 | 5 | constructor() { 6 | super(); 7 | this.attachShadow({mode: "open"}); 8 | this.property = "constructor"; 9 | } 10 | 11 | set property(value) { 12 | this.shadowRoot.textContent = value; 13 | } 14 | 15 | get property() { 16 | return this.shadowRoot.textContent; 17 | } 18 | } 19 | customElements.define(CustomCustomElement.is, CustomCustomElement); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/eager.js: -------------------------------------------------------------------------------- 1 | function attachTestDiv(textContent) { 2 | const div = document.createElement("div"); 3 | div.className = "dependenciesTest"; 4 | div.textContent = textContent; 5 | const outlet = document.getElementById('outlet') || document.body; 6 | outlet.appendChild(div); 7 | } 8 | 9 | // Attach any existing message to the DOM 10 | if (window.messages) { 11 | window.messages.forEach(attachTestDiv); 12 | } 13 | 14 | // Swap out implementation with one that directly attaches to the DOM 15 | window.messages = { 16 | push: attachTestDiv 17 | }; 18 | 19 | //attachTestDiv("eager.js"); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/inline.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2020 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | // document.body might not yet be accessible, so just leave a message 18 | window.messages = window.messages || []; 19 | //window.messages.push("inline.js"); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/lazy.js: -------------------------------------------------------------------------------- 1 | // See eager.js for window.messsages implementation 2 | window.messages = window.messages || []; 3 | //window.messages.push("lazy.js"); 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/components/context-inline.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2020 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | function doNotifyJsExecution(){ 18 | var lbl = document.createElement("label"); 19 | lbl.setAttribute("id", "js"); 20 | lbl.innerHTML='Inlined JS'; 21 | document.body.appendChild(lbl); 22 | } 23 | 24 | function notifyJsExecution(){ 25 | if ( document.body) { 26 | doNotifyJsExecution() 27 | } else { 28 | setTimeout(notifyJsExecution, 50); 29 | } 30 | } 31 | 32 | //notifyJsExecution(); 33 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/components/frontend-inline.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2020 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | function doNotifyJsExecution(){ 18 | var lbl = document.createElement("label"); 19 | lbl.setAttribute("id", "js"); 20 | lbl.innerHTML='Inlined JS'; 21 | document.body.appendChild(lbl); 22 | } 23 | 24 | function notifyJsExecution(){ 25 | if ( document.body) { 26 | doNotifyJsExecution() 27 | } else { 28 | setTimeout(notifyJsExecution, 50); 29 | } 30 | } 31 | 32 | //notifyJsExecution(); 33 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/dependencies/eager-module.js: -------------------------------------------------------------------------------- 1 | window.messages = window.messages || []; 2 | window.messages.push("eager-module.js"); -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/dependencies/eager.css: -------------------------------------------------------------------------------- 1 | #preloadedDiv { 2 | color: rgba(255, 0, 0, 1); 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/dependencies/eager.js: -------------------------------------------------------------------------------- 1 | function attachTestDiv(textContent) { 2 | const div = document.createElement("div"); 3 | div.className = "dependenciesTest"; 4 | div.textContent = textContent; 5 | const outlet = document.getElementById('outlet') || document.body; 6 | outlet.appendChild(div); 7 | } 8 | 9 | // Attach any existing message to the DOM 10 | if (window.messages && window.messages.forEach) { 11 | window.messages.forEach(attachTestDiv); 12 | } 13 | 14 | // Swap out implementation with one that directly attaches to the DOM 15 | window.messages = { 16 | push: attachTestDiv 17 | }; 18 | 19 | attachTestDiv("eager.js"); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/dependencies/inline.css: -------------------------------------------------------------------------------- 1 | /* inline.css */ 2 | 3 | #preloadedDiv { 4 | color: rgba(255, 255, 0, 1); 5 | } 6 | 7 | #inlineCssTestDiv { 8 | color: rgba(255, 255, 0, 1); 9 | } 10 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/dependencies/inline.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2020 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | // document.body might not yet be accessible, so just leave a message 18 | window.messages = window.messages || []; 19 | window.messages.push("inline.js"); 20 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/dependencies/lazy.css: -------------------------------------------------------------------------------- 1 | #preloadedDiv { 2 | color: rgba(0, 0, 255, 1); 3 | } 4 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/dependencies/lazy.js: -------------------------------------------------------------------------------- 1 | // See eager.js for window.messsages implementation 2 | window.messages.push("lazy.js"); 3 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/divConnector.js: -------------------------------------------------------------------------------- 1 | window.divConnector = { 2 | 3 | jsFunction: function( divComponent ){ 4 | divComponent.$server.handleClientCall("foo"); 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/in-memory-connector.js: -------------------------------------------------------------------------------- 1 | window.inMemoryConnector = { 2 | 3 | init: function( component, inMemoryElement ){ 4 | component.$dataContainer = inMemoryElement; 5 | 6 | component.useInMemoryElement = function(parent){ 7 | var copy = component.$dataContainer.cloneNode(true); 8 | parent.appendChild(copy); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/index.ts: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * This file is auto-generated by Vaadin. 3 | * If you want to customize the entry point, you can copy this file or create 4 | * your own `index.ts` in your frontend directory. 5 | * By default, the `index.ts` file should be in `./frontend/` folder. 6 | * 7 | * NOTE: 8 | * - You need to restart the dev-server after adding the new `index.ts` file. 9 | * After that, all modifications to `index.ts` are recompiled automatically. 10 | * - `index.js` is also supported if you don't want to use TypeScript. 11 | ******************************************************************************/ 12 | 13 | 14 | // import Vaadin client-router to handle client-side and server-side navigation 15 | import {Router} from '@vaadin/router'; 16 | 17 | // import Flow module to enable navigation to Vaadin server-side views 18 | import {Flow} from '@vaadin/flow-frontend/Flow'; 19 | 20 | const {serverSideRoutes} = new Flow({ 21 | imports: () => import('Frontend/generated/flow/generated-flow-imports.js') 22 | }); 23 | 24 | const routes = [ 25 | // for client-side, place routes below (more info https://vaadin.com/docs/v15/flow/typescript/creating-routes.html) 26 | 27 | // for server-side, the next magic line sends all unmatched routes: 28 | ...serverSideRoutes // IMPORTANT: this must be the last entry in the array 29 | ]; 30 | 31 | // Vaadin router needs an outlet in the index.html page to display views 32 | const router = new Router(document.querySelector('#outlet')); 33 | router.setRoutes(routes); 34 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/js-get-by-id.js: -------------------------------------------------------------------------------- 1 | window.jsApiConnector = { 2 | 3 | jsFunction: function( element, appId, nodeId ){ 4 | element.operation = function(){ 5 | var node = window.Vaadin.Flow.clients[appId].getByNodeId(nodeId); 6 | element.textContent = node.textContent; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/template-scalability-panel.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class TemplateScalabilityPanel extends PolymerElement { 5 | static get is() { 6 | return 'template-scalability-panel'; 7 | } 8 | 9 | static get template() { 10 | return html` 11 | 16 | 17 | 18 | `; 19 | } 20 | } 21 | 22 | customElements.define(TemplateScalabilityPanel.is, TemplateScalabilityPanel); 23 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/template-scalability-view.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class TemplateScalabilityView extends PolymerElement { 5 | static get is() { 6 | return 'template-scalability-view'; 7 | } 8 | 9 | static get template() { 10 | return html` 11 | 16 | 17 |
18 | 19 |
20 | `; 21 | } 22 | } 23 | 24 | customElements.define(TemplateScalabilityView.is, TemplateScalabilityView); 25 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/template-without-shadow-root-view.js: -------------------------------------------------------------------------------- 1 | import { PolymerElement } from '@polymer/polymer/polymer-element.js'; 2 | import { html } from '@polymer/polymer/lib/utils/html-tag.js'; 3 | 4 | class PolymerTemplateWithoutShadowRootView extends PolymerElement { 5 | _attachDom(dom) { 6 | // Do not create a shadow root 7 | this.appendChild(dom); 8 | } 9 | 10 | static get properties() { 11 | return { 12 | }; 13 | } 14 | static get is() { 15 | return 'template-without-shadow-root-view'; 16 | } 17 | 18 | static get template() { 19 | return html` 20 |
21 | `; 22 | } 23 | } 24 | 25 | customElements.define(PolymerTemplateWithoutShadowRootView.is, PolymerTemplateWithoutShadowRootView); 26 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/frontend/x-lazy-widget.js: -------------------------------------------------------------------------------- 1 | import {PolymerElement} from '@polymer/polymer/polymer-element.js'; 2 | import {html} from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js'; 4 | import '@polymer/polymer/lib/elements/dom-if.js'; 5 | 6 | console.timeStamp('LazyWidget script start'); 7 | class LazyWidget extends GestureEventListeners(PolymerElement) { 8 | static get is() { 9 | return 'x-lazy-widget' 10 | } 11 | 12 | static get template() { 13 | return html` 14 | 21 |

I'm a lazy widget

22 | 23 | 24 | 27 | `; 28 | } 29 | 30 | _onButtonTapped(event) { 31 | this.hasGreeting = false; 32 | this.$server.greet(this.$.input.value); 33 | } 34 | } 35 | 36 | (function sleep(milliseconds) { 37 | var start = new Date().getTime(); 38 | for (var i = 0; i < 1e7; i++) { 39 | if ((new Date().getTime() - start) > milliseconds){ 40 | break; 41 | } 42 | } 43 | })(1000); 44 | customElements.define(LazyWidget.is, LazyWidget); 45 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/reference-screenshots/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcollovati/vertx-vaadin/1e188b55e68195cabbbe86037d85313f1b1bfcd4/vertx-vaadin-tests/test-root-context/reference-screenshots/.gitkeep -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/MyException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2000-2020 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.vaadin.flow.uitest; 24 | 25 | /** 26 | * Exception throw in HasUrlParameterErrorView. 27 | * 28 | * @since 1.0 29 | */ 30 | public class MyException extends RuntimeException {} 31 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/PushWSUpdateDivView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2000-2020 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.vaadin.flow.uitest.ui; 24 | 25 | import com.vaadin.flow.TestPush; 26 | import com.vaadin.flow.router.Route; 27 | 28 | @TestPush 29 | @Route("com.vaadin.flow.uitest.ui.PushWSUpdateDivView") 30 | public class PushWSUpdateDivView extends AbstractPushUpdateDivView {} 31 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/main/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener: -------------------------------------------------------------------------------- 1 | com.vaadin.flow.uitest.ui.TestingServiceInitListener 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/main/webapp/include.js: -------------------------------------------------------------------------------- 1 | var s = document.createElement("span"); 2 | s.id="added-from-src-script"; 3 | s.textContent="Hello from src script"; 4 | foo.parentElement.appendChild(s); -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/main/webapp/loading-indicator.css: -------------------------------------------------------------------------------- 1 | .v-loading-indicator { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | right: 0; 6 | bottom: 0; 7 | pointer-events: auto; 8 | 9 | animation: fadein 0.3s ease-out 0.2s normal 1 both; 10 | z-index: 2147483647; 11 | } 12 | 13 | @keyframes fadein { 14 | 0% { 15 | background: rgba(0,0,0,0); 16 | } 17 | 100% { 18 | background: rgba(0,0,0,.5); 19 | } 20 | } 21 | 22 | .v-loading-indicator:before { 23 | width: 76px; 24 | height: 76px; 25 | 26 | position: absolute; 27 | top: 50%; 28 | left: 50%; 29 | 30 | margin: -38px 0 0 -38px; 31 | 32 | border-radius: 100%; 33 | animation: bouncedelay 1.2s infinite 0.4s ease-in-out both; 34 | content: ""; 35 | } 36 | 37 | .v-loading-indicator.first:before { 38 | background-color: skyblue; 39 | } 40 | 41 | .v-loading-indicator.second:before { 42 | background-color: salmon; 43 | } 44 | 45 | .v-loading-indicator.third:before { 46 | background-color: red; 47 | } 48 | 49 | @keyframes bouncedelay { 50 | 0%, 80%, 100% { 51 | transform: scale(0); 52 | } 40% { 53 | transform: scale(1.0); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/main/webapp/plain-script.js: -------------------------------------------------------------------------------- 1 | var div = document.createElement("div"); 2 | div.id="added-from-src-script"; 3 | div.textContent="Hello from src script"; 4 | document.body.insertBefore(div, document.body.firstChild); -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/test/conf/vertx-vaadin-test-prod.conf: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "port": 8888 4 | }, 5 | "vaadin": { 6 | "productionMode": true, 7 | "pnpm.enable": "true", 8 | "compatibilityMode": "false", 9 | "mountPoint": "/view" 10 | }, 11 | "mountAliases": [ "/new-router-session" ] 12 | } 13 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/test/conf/vertx-vaadin-test.conf: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "port": 8888 4 | }, 5 | "vaadin": { 6 | "pnpm.enable": "false", 7 | "compatibilityMode": "false", 8 | "mountPoint": "/view", 9 | "useDeprecatedV14Bootstrapping": "false", 10 | "devmode.liveReload.enabled": "true" 11 | }, 12 | "mountAliases": [ "/new-router-session" ] 13 | } 14 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/PushLongPollingUpdateDivIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2000-2020 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.vaadin.flow.uitest.ui; 24 | 25 | /** 26 | * The tests are in the superclass. 27 | */ 28 | public class PushLongPollingUpdateDivIT extends AbstractUpdateDivIT {} 29 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/PushWSUpdateDivIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright © 2000-2020 Marco Collovati (mcollovati@gmail.com) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | package com.vaadin.flow.uitest.ui; 24 | 25 | import com.vaadin.flow.testcategory.IgnoreOSGi; 26 | import org.junit.experimental.categories.Category; 27 | 28 | /** 29 | * The tests are in the superclass. 30 | */ 31 | @Category(IgnoreOSGi.class) 32 | public class PushWSUpdateDivIT extends AbstractUpdateDivIT {} 33 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-scalability/.gitignore: -------------------------------------------------------------------------------- 1 | .npmrc 2 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-scalability/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-scalability/src/test/conf/vertx-vaadin-test.conf: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "port": 8888 4 | }, 5 | "vaadin": { 6 | "pnpm.enable": "true", 7 | "compatibilityMode": "false", 8 | "mountPoint": "/helloworld/", 9 | "devmode.transpile": "true" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-scalability/src/test/resources/bodies/HelloWorld_0001_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "csrfToken": "${securityKey}", 3 | "rpc": [ 4 | { 5 | "type": "event", 6 | "node": 4, 7 | "event": "click", 8 | "data": { 9 | "event.shiftKey": false, 10 | "event.metaKey": false, 11 | "event.detail": 1, 12 | "event.clientX": 25, 13 | "event.ctrlKey": false, 14 | "event.clientY": 13, 15 | "event.altKey": false, 16 | "event.button": 0, 17 | "event.screenY": 138, 18 | "event.screenX": 25 19 | } 20 | } 21 | ], 22 | "syncId": ${syncId}, 23 | "clientId": ${clientId}, 24 | "wsver": "9.9.9.INTERNAL-DEBUG-BUILD" 25 | } 26 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-scalability/src/test/resources/bodies/clickButton.json: -------------------------------------------------------------------------------- 1 | { 2 | "csrfToken": "${securityKey}", 3 | "rpc": [ 4 | { 5 | "type": "event", 6 | "node": 4, 7 | "event": "click", 8 | "data": { 9 | "event.shiftKey": false, 10 | "event.metaKey": false, 11 | "event.detail": 1, 12 | "event.clientX": 25, 13 | "event.ctrlKey": false, 14 | "event.clientY": 13, 15 | "event.altKey": false, 16 | "event.button": 0, 17 | "event.screenY": 138, 18 | "event.screenX": 25 19 | } 20 | } 21 | ], 22 | "syncId": ${syncId}, 23 | "clientId": ${clientId} 24 | } 25 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-scalability/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx 7 | 8 | false 9 | 10 | 11 | 12 | target/gatling/simulation-errors.log 13 | 14 | %d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx 15 | 16 | false 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /vertx-vaadin-tests/test-scalability/src/test/scala/com/vaadin/flow/test/scalability/WarmupFlow.scala: -------------------------------------------------------------------------------- 1 | package com.vaadin.flow.test.scalability 2 | 3 | import scala.concurrent.duration._ 4 | 5 | import io.gatling.core.Predef._ 6 | import io.gatling.http.Predef._ 7 | import io.gatling.jdbc.Predef._ 8 | 9 | class WarmupFlow extends Simulation { 10 | 11 | val httpProtocol = http 12 | .baseURL("http://localhost:8888") 13 | .warmUp("http://localhost:8888/") 14 | .acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") 15 | .acceptEncodingHeader("gzip, deflate") 16 | .acceptLanguageHeader("en-US,en;q=0.5") 17 | .userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0") 18 | 19 | var scn = scenario("Warm up Jetty").exec( 20 | http("Open hello world") 21 | .get("/helloworld/")) 22 | 23 | setUp(scn.inject(atOnceUsers(1000))).protocols(httpProtocol) 24 | } 25 | --------------------------------------------------------------------------------