Skip to content

Commit

Permalink
chore: Upgrade to Vaadin 24.4.0.alpha24 (#35)
Browse files Browse the repository at this point in the history
* chore: Upgrade to 24.4.0.alpha22

* chore: Upgrade to 24.4.0.alpha22

* fix TS compile error

* test: Test Menu annotation and related logic

* remove local testing leftovers

* remove local testing leftovers
  • Loading branch information
mshabarov authored Apr 26, 2024
1 parent 9f63e27 commit 776d54a
Show file tree
Hide file tree
Showing 8 changed files with 1,688 additions and 1,700 deletions.
3,251 changes: 1,624 additions & 1,627 deletions package-lock.json

Large diffs are not rendered by default.

113 changes: 52 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@
"type": "module",
"dependencies": {
"@polymer/polymer": "3.5.1",
"@vaadin/bundles": "24.4.0-alpha22",
"@vaadin/bundles": "24.4.0-alpha23",
"@vaadin/common-frontend": "0.0.19",
"@vaadin/hilla-file-router": "24.4.0-alpha23",
"@vaadin/hilla-frontend": "24.4.0-alpha23",
"@vaadin/hilla-lit-form": "24.4.0-alpha23",
"@vaadin/hilla-react-auth": "24.4.0-alpha23",
"@vaadin/hilla-react-crud": "24.4.0-alpha23",
"@vaadin/hilla-react-form": "24.4.0-alpha23",
"@vaadin/hilla-react-i18n": "24.4.0-alpha23",
"@vaadin/hilla-react-signals": "24.4.0-alpha23",
"@vaadin/polymer-legacy-adapter": "24.4.0-alpha22",
"@vaadin/react-components": "24.4.0-alpha22",
"@vaadin/hilla-file-router": "24.4.0-alpha25",
"@vaadin/hilla-frontend": "24.4.0-alpha25",
"@vaadin/hilla-lit-form": "24.4.0-alpha25",
"@vaadin/hilla-react-auth": "24.4.0-alpha25",
"@vaadin/hilla-react-crud": "24.4.0-alpha25",
"@vaadin/hilla-react-form": "24.4.0-alpha25",
"@vaadin/hilla-react-i18n": "24.4.0-alpha25",
"@vaadin/hilla-react-signals": "24.4.0-alpha25",
"@vaadin/polymer-legacy-adapter": "24.4.0-alpha23",
"@vaadin/react-components": "24.4.0-alpha23",
"@vaadin/router": "1.7.5",
"@vaadin/vaadin-development-mode-detector": "2.0.6",
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha22",
"@vaadin/vaadin-material-styles": "24.4.0-alpha22",
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha22",
"@vaadin/vaadin-usage-statistics": "2.1.2",
"construct-style-sheets-polyfill": "3.1.0",
"date-fns": "2.29.3",
"lit": "3.1.2",
"proj4": "2.10.0",
"lit": "3.1.3",
"proj4": "2.11.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-router-dom": "6.22.3"
Expand All @@ -34,17 +31,17 @@
"@babel/preset-react": "7.24.1",
"@rollup/plugin-replace": "5.0.5",
"@rollup/pluginutils": "5.1.0",
"@types/react": "18.2.75",
"@types/react-dom": "18.2.24",
"@vaadin/hilla-generator-cli": "24.4.0-alpha23",
"@vaadin/hilla-generator-core": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-backbone": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-barrel": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-client": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-model": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-push": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-subtypes": "24.4.0-alpha23",
"@vaadin/hilla-generator-utils": "24.4.0-alpha23",
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25",
"@vaadin/hilla-generator-cli": "24.4.0-alpha25",
"@vaadin/hilla-generator-core": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-backbone": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-barrel": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-client": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-model": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-push": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-subtypes": "24.4.0-alpha25",
"@vaadin/hilla-generator-utils": "24.4.0-alpha25",
"@vitejs/plugin-react": "4.2.1",
"async": "3.2.5",
"glob": "10.3.12",
Expand All @@ -53,7 +50,7 @@
"strip-css-comments": "5.0.0",
"transform-ast": "2.4.4",
"typescript": "5.4.5",
"vite": "5.2.8",
"vite": "5.2.9",
"vite-plugin-checker": "0.6.4",
"workbox-build": "7.0.0",
"workbox-core": "7.0.0",
Expand All @@ -62,28 +59,25 @@
"vaadin": {
"dependencies": {
"@polymer/polymer": "3.5.1",
"@vaadin/bundles": "24.4.0-alpha22",
"@vaadin/bundles": "24.4.0-alpha23",
"@vaadin/common-frontend": "0.0.19",
"@vaadin/hilla-file-router": "24.4.0-alpha23",
"@vaadin/hilla-frontend": "24.4.0-alpha23",
"@vaadin/hilla-lit-form": "24.4.0-alpha23",
"@vaadin/hilla-react-auth": "24.4.0-alpha23",
"@vaadin/hilla-react-crud": "24.4.0-alpha23",
"@vaadin/hilla-react-form": "24.4.0-alpha23",
"@vaadin/hilla-react-i18n": "24.4.0-alpha23",
"@vaadin/hilla-react-signals": "24.4.0-alpha23",
"@vaadin/polymer-legacy-adapter": "24.4.0-alpha22",
"@vaadin/react-components": "24.4.0-alpha22",
"@vaadin/hilla-file-router": "24.4.0-alpha25",
"@vaadin/hilla-frontend": "24.4.0-alpha25",
"@vaadin/hilla-lit-form": "24.4.0-alpha25",
"@vaadin/hilla-react-auth": "24.4.0-alpha25",
"@vaadin/hilla-react-crud": "24.4.0-alpha25",
"@vaadin/hilla-react-form": "24.4.0-alpha25",
"@vaadin/hilla-react-i18n": "24.4.0-alpha25",
"@vaadin/hilla-react-signals": "24.4.0-alpha25",
"@vaadin/polymer-legacy-adapter": "24.4.0-alpha23",
"@vaadin/react-components": "24.4.0-alpha23",
"@vaadin/router": "1.7.5",
"@vaadin/vaadin-development-mode-detector": "2.0.6",
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha22",
"@vaadin/vaadin-material-styles": "24.4.0-alpha22",
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha22",
"@vaadin/vaadin-usage-statistics": "2.1.2",
"construct-style-sheets-polyfill": "3.1.0",
"date-fns": "2.29.3",
"lit": "3.1.2",
"proj4": "2.10.0",
"lit": "3.1.3",
"proj4": "2.11.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-router-dom": "6.22.3"
Expand All @@ -92,17 +86,17 @@
"@babel/preset-react": "7.24.1",
"@rollup/plugin-replace": "5.0.5",
"@rollup/pluginutils": "5.1.0",
"@types/react": "18.2.75",
"@types/react-dom": "18.2.24",
"@vaadin/hilla-generator-cli": "24.4.0-alpha23",
"@vaadin/hilla-generator-core": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-backbone": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-barrel": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-client": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-model": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-push": "24.4.0-alpha23",
"@vaadin/hilla-generator-plugin-subtypes": "24.4.0-alpha23",
"@vaadin/hilla-generator-utils": "24.4.0-alpha23",
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25",
"@vaadin/hilla-generator-cli": "24.4.0-alpha25",
"@vaadin/hilla-generator-core": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-backbone": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-barrel": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-client": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-model": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-push": "24.4.0-alpha25",
"@vaadin/hilla-generator-plugin-subtypes": "24.4.0-alpha25",
"@vaadin/hilla-generator-utils": "24.4.0-alpha25",
"@vitejs/plugin-react": "4.2.1",
"async": "3.2.5",
"glob": "10.3.12",
Expand All @@ -111,13 +105,13 @@
"strip-css-comments": "5.0.0",
"transform-ast": "2.4.4",
"typescript": "5.4.5",
"vite": "5.2.8",
"vite": "5.2.9",
"vite-plugin-checker": "0.6.4",
"workbox-build": "7.0.0",
"workbox-core": "7.0.0",
"workbox-precaching": "7.0.0"
},
"hash": "c8026922f2fe39cf887cb6a7ed916c2d4a9141be9f89da97963ffb95dfca200e"
"hash": "92b58d8f4fa0cb6b10bab8431cedc5bce6883d5ae68748d5dde70e5d38022b24"
},
"overrides": {
"@vaadin/bundles": "$@vaadin/bundles",
Expand All @@ -142,9 +136,6 @@
"@vaadin/hilla-react-form": "$@vaadin/hilla-react-form",
"@vaadin/hilla-react-signals": "$@vaadin/hilla-react-signals",
"date-fns": "$date-fns",
"proj4": "$proj4",
"@vaadin/vaadin-themable-mixin": "$@vaadin/vaadin-themable-mixin",
"@vaadin/vaadin-lumo-styles": "$@vaadin/vaadin-lumo-styles",
"@vaadin/vaadin-material-styles": "$@vaadin/vaadin-material-styles"
"proj4": "$proj4"
}
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<properties>
<java.version>17</java.version>
<vaadin.version>24.4.0.alpha23</vaadin.version>
<vaadin.version>24.4.0.alpha24</vaadin.version>
</properties>

<parent>
Expand Down Expand Up @@ -63,7 +63,7 @@
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<!-- Replace artifactId with vaadin-core to use only free components -->
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { createElement } from 'react';
import { createRoot } from 'react-dom/client';
import { RouterProvider } from 'react-router-dom';
import { router } from 'Frontend/generated/routes.js';
import { router } from 'Frontend/generated/routes';
import { AuthProvider } from './auth';

function App() {
Expand Down
8 changes: 0 additions & 8 deletions src/main/frontend/views/@layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ export default function Layout() {
}
}

const flowIsInRole = state.user?.authorities?.includes(
'ROLE_ADMIN');

return (
<AppLayout primarySection="drawer">
<div slot="drawer" className="flex flex-col justify-between h-full p-m">
Expand All @@ -48,11 +45,6 @@ export default function Layout() {
</NavLink>
))
}
{ flowIsInRole ? (
<NavLink to={'/flow'} className={navLinkClasses}>
Flow Admin
</NavLink>
) : null}
</nav>
</header>
<footer className="flex flex-col gap-s">
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/vaadin/example/FlowView.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
import com.vaadin.flow.component.html.Paragraph;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.textfield.TextField;
import com.vaadin.flow.router.Menu;
import com.vaadin.flow.router.Route;

/**
* Flow view that is available only for users with role 'ADMIN'
*/
@RolesAllowed("ADMIN")
@Menu(title = "Flow admin")
@Route("flow")
public class FlowView extends VerticalLayout {

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/vaadin/example/FlowViewIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void clickingButtonTwiceShowsTwoNotifications() {
button.click();
$(ParagraphElement.class).waitForFirst();
button.click();
Assertions.assertEquals(2, $(ParagraphElement.class).all().size());
waitUntil(driver -> $(ParagraphElement.class).all().size() == 2);
}

@BrowserTest
Expand Down
6 changes: 6 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ declare module '*.css?inline' {
const content: CSSResultGroup;
export default content;
}

declare module 'csstype' {
interface Properties {
[index: `--${string}`]: any;
}
}

0 comments on commit 776d54a

Please sign in to comment.