Skip to content

Commit

Permalink
feat: add dashboard packages (#6548)
Browse files Browse the repository at this point in the history
* feat: add dashboard packages

* chore: use correct license

* refactor: comment out npm package temporarily

* refactor: add polymer legacy adapter

* chore: remove incorrect npm package

* fix: correct the inverted module names

* chore: add license to pom

* fix: add module to root level pom

* chore: run formatter

* feat: add packages for testbench and integration tests

* fix: update polymer legacy adapter version

* chore: remove unused dependency
  • Loading branch information
ugur-vaadin committed Oct 10, 2024
1 parent d1899e3 commit c2214cc
Show file tree
Hide file tree
Showing 17 changed files with 548 additions and 0 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<module>vaadin-combo-box-flow-parent</module>
<module>vaadin-context-menu-flow-parent</module>
<module>vaadin-custom-field-flow-parent</module>
<module>vaadin-dashboard-flow-parent</module>
<module>vaadin-date-picker-flow-parent</module>
<module>vaadin-date-time-picker-flow-parent</module>
<module>vaadin-details-flow-parent</module>
Expand Down
3 changes: 3 additions & 0 deletions vaadin-dashboard-flow-parent/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This program is available under Vaadin Commercial License and Service Terms.
See https://vaadin.com/commercial-license-and-service-terms for the full
license.
22 changes: 22 additions & 0 deletions vaadin-dashboard-flow-parent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dashboard component for Vaadin Flow

This project is the Component wrapper implementation of [`<vaadin-dashboard>`](https://github.com/vaadin/web-components/tree/main/packages/dashboard)
element for use from the server side with [Vaadin Flow](https://github.com/vaadin/flow).

## Using the component in a Flow application

To use the component in an application using maven,
add the following dependency to your `pom.xml`:
```
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dashboard-flow</artifactId>
<version>${component.version}</version>
</dependency>
```

## License

This component is distributed under [Vaadin Commercial License and Service Terms](https://vaadin.com/commercial-license-and-service-terms).

To purchase a license, visit http://vaadin.com/pricing
40 changes: 40 additions & 0 deletions vaadin-dashboard-flow-parent/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-flow-components</artifactId>
<version>24.5-SNAPSHOT</version>
</parent>
<artifactId>vaadin-dashboard-flow-parent</artifactId>
<packaging>pom</packaging>
<name>Vaadin Dashboard Parent</name>
<description>Vaadin Dashboard Parent</description>
<licenses>
<license>
<name>Vaadin Commercial License and Service Terms</name>
<url>https://vaadin.com/commercial-license-and-service-terms</url>
</license>
</licenses>
<properties>
<spotless.licence-header>${maven.multiModuleProjectDirectory}/scripts/templates/vaadin-commercial-license-header.txt</spotless.licence-header>
</properties>
<modules>
<module>vaadin-dashboard-flow</module>
<module>vaadin-dashboard-testbench</module>
</modules>
<profiles>
<profile>
<id>default</id>
<activation>
<property>
<name>!release</name>
</property>
</activation>
<modules>
<module>vaadin-dashboard-flow-integration-tests</module>
</modules>
</profile>
</profiles>
<dependencies/>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dashboard-flow-parent</artifactId>
<version>24.5-SNAPSHOT</version>
</parent>
<artifactId>vaadin-dashboard-integration-tests</artifactId>
<packaging>war</packaging>
<name>Vaadin Dashboard Integration Tests</name>
<description>Vaadin Dashboard Integration Tests</description>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-client</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-data</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-html-components</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-lumo-theme</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-test-util</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-flow-components-test-util</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-lit-template</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-polymer-template</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}</directory>
<includes>
<include>package*.json</include>
<include>pnpm*</include>
<include>vite.generated.ts</include>
<include>types.d.ts</include>
<include>tsconfig.json</include>
<include>frontend/routes.tsx</include>
<include>frontend/App.tsx</include>
</includes>
</fileset>
<fileset>
<directory>${project.basedir}/node_modules</directory>
<directory>${project.basedir}/frontend/generated</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<configuration>
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>build-frontend</id>
<activation>
<property>
<name>!skipFrontend</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>flow-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run-jetty</id>
<activation>
<property>
<name>!skipJetty</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<scan>5</scan>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2000-2024 Vaadin Ltd.
*
* This program is available under Vaadin Commercial License and Service Terms.
*
* See {@literal <https://vaadin.com/commercial-license-and-service-terms>} for the full
* license.
*/
package com.vaadin.flow.component.dashboard.tests;

import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.router.Route;

/**
* @author Vaadin Ltd
*/
@Route("vaadin-dashboard")
public class DashboardPage extends Div {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2000-2024 Vaadin Ltd.
*
* This program is available under Vaadin Commercial License and Service Terms.
*
* See {@literal <https://vaadin.com/commercial-license-and-service-terms>} for the full
* license.
*/
package com.vaadin.flow.component.dashboard.tests;

import com.vaadin.flow.testutil.TestPath;
import com.vaadin.tests.AbstractComponentIT;

/**
* @author Vaadin Ltd
*/
@TestPath("vaadin-dashboard")
public class DashboardIT extends AbstractComponentIT {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// @ts-ignore can not be resolved until NPM packages are installed
import { UserConfigFn } from 'vite';
// @ts-ignore can not be resolved until Flow generates base Vite config
import { overrideVaadinConfig } from './vite.generated';
// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin';

const customConfig: UserConfigFn = (env) => ({
// Here you can add custom Vite parameters
// https://vitejs.dev/config/

// Use local version of web-components, disabled by default
// To use this un-comment the lines below and change the path to
// the absolute path of your web-components repo's node_modules
// folder
// DO NOT COMMIT THESE CHANGES!
/*
plugins: [
useLocalWebComponents('/path/to/web-components/node_modules')
]
*/
});

export default overrideVaadinConfig(customConfig);
99 changes: 99 additions & 0 deletions vaadin-dashboard-flow-parent/vaadin-dashboard-flow/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dashboard-flow-parent</artifactId>
<version>24.5-SNAPSHOT</version>
</parent>
<artifactId>vaadin-dashboard-flow</artifactId>
<packaging>jar</packaging>
<name>Vaadin Dashboard</name>
<description>Vaadin Dashboard</description>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-flow-components-base</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-test-generic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF
</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>attach-docs</id>
<activation>
<property>
<name>with-docs</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading

0 comments on commit c2214cc

Please sign in to comment.