Skip to content

Commit

Permalink
Merge pull request #50 from vaadin/update-to-v24
Browse files Browse the repository at this point in the history
chore: PiT - Update to Vaadin v24
  • Loading branch information
ZheSun88 authored Jun 12, 2024
2 parents 3c4181b + 9d9307b commit cc39cfa
Show file tree
Hide file tree
Showing 21 changed files with 4,175 additions and 4,340 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The following files are generated/updated by vaadin-maven-plugin
node_modules/
frontend/generated/
src/main/frontend/generated/
pnpmfile.js
vite.generated.ts

Expand Down
1 change: 0 additions & 1 deletion frontend/views/README

This file was deleted.

8,070 changes: 4,025 additions & 4,045 deletions package-lock.json

Large diffs are not rendered by default.

368 changes: 111 additions & 257 deletions package.json

Large diffs are not rendered by default.

30 changes: 13 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

<properties>
<java.version>17</java.version>
<vaadin.version>24.3.13</vaadin.version>
<hilla.version>2.5.6</hilla.version>
<vaadin.version>24.4.1</vaadin.version>
<vaadin.version>24.4.1</vaadin.version>
</properties>

<parent>
Expand Down Expand Up @@ -58,9 +58,9 @@
<scope>import</scope>
</dependency>
<dependency>
<groupId>dev.hilla</groupId>
<artifactId>hilla-bom</artifactId>
<version>${hilla.version}</version>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -69,12 +69,8 @@

<dependencies>
<dependency>
<groupId>dev.hilla</groupId>
<artifactId>hilla-react</artifactId>
</dependency>
<dependency>
<groupId>dev.hilla</groupId>
<artifactId>hilla-react-spring-boot-starter</artifactId>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
Expand Down Expand Up @@ -111,9 +107,9 @@
</plugin>

<plugin>
<groupId>dev.hilla</groupId>
<artifactId>hilla-maven-plugin</artifactId>
<version>${hilla.version}</version>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -145,9 +141,9 @@
<build>
<plugins>
<plugin>
<groupId>dev.hilla</groupId>
<artifactId>hilla-maven-plugin</artifactId>
<version>${hilla.version}</version>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ProgressBar } from '@hilla/react-components/ProgressBar.js';
import { ProgressBar } from '@vaadin/react-components/ProgressBar.js';

export default function Placeholder() {
return <ProgressBar indeterminate={true} className="m-0" />;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AppLayout } from '@hilla/react-components/AppLayout.js';
import { DrawerToggle } from '@hilla/react-components/DrawerToggle.js';
import { AppLayout } from '@vaadin/react-components/AppLayout.js';
import { DrawerToggle } from '@vaadin/react-components/DrawerToggle.js';
import Placeholder from 'Frontend/components/placeholder/Placeholder.js';
import { useRouteMetadata } from 'Frontend/util/routing.js';
import { Suspense, useEffect } from 'react';
Expand Down
1 change: 1 addition & 0 deletions src/main/frontend/views/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Place your React views or hand written templates in this folder.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Button } from "@hilla/react-components/Button.js";
import { TextField } from "@hilla/react-components/TextField.js";
import { Button } from "@vaadin/react-components/Button.js";
import { TextField } from "@vaadin/react-components/TextField.js";
import { HelloEndpoint } from "Frontend/generated/endpoints.js";
import { useState } from "react";
import {VerticalLayout} from "@hilla/react-components/VerticalLayout.js";
import {VerticalLayout} from "@vaadin/react-components/VerticalLayout.js";

export default function HillaView() {
const [name, setName] = useState("");
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/vaadin/example/endpoints/HelloEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.vaadin.example.GreetService;

import com.vaadin.flow.server.auth.AnonymousAllowed;
import dev.hilla.Endpoint;
import dev.hilla.Nonnull;
import com.vaadin.hilla.Endpoint;
import com.vaadin.hilla.Nonnull;

@Endpoint
@AnonymousAllowed
Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// You might want to change the configurations to fit your preferences
// For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html
{
"_version": "9",
"_version": "9.1",
"compilerOptions": {
"sourceMap": true,
"jsx": "react-jsx",
Expand All @@ -22,18 +22,18 @@
"noUnusedParameters": false,
"experimentalDecorators": true,
"useDefineForClassFields": false,
"baseUrl": "frontend",
"baseUrl": "src/main/frontend",
"paths": {
"@vaadin/flow-frontend": ["generated/jar-resources"],
"@vaadin/flow-frontend/*": ["generated/jar-resources/*"],
"Frontend/*": ["*"]
}
},
"include": [
"frontend/**/*",
"src/main/frontend/**/*",
"types.d.ts"
],
"exclude": [
"frontend/generated/jar-resources/**"
"src/main/frontend/generated/jar-resources/**"
]
}
11 changes: 11 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,14 @@ declare module '*.webp' {
const ref: string;
export default ref;
}
declare module '*.css?inline' {
import type { CSSResultGroup } from 'lit';
const content: CSSResultGroup;
export default content;
}

declare module 'csstype' {
interface Properties {
[index: `--${string}`]: any;
}
}
8 changes: 1 addition & 7 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import react from '@vitejs/plugin-react';
import type { UserConfigFn } from 'vite';
import { UserConfigFn } from 'vite';
import { overrideVaadinConfig } from './vite.generated';

const customConfig: UserConfigFn = (env) => ({
// Here you can add custom Vite parameters
// https://vitejs.dev/config/
plugins: [
react({
include: '**/*.tsx',
}),
],
});

export default overrideVaadinConfig(customConfig);

0 comments on commit cc39cfa

Please sign in to comment.