Update Hilla to pre-release 24.8.0.alpha6

because of Kotlin nullability support
This commit is contained in:
grimsi
2025-05-09 13:52:06 +02:00
parent 4e3b6f7152
commit ccd3ebf9e8
15 changed files with 961 additions and 900 deletions
+3
View File
@@ -6,6 +6,9 @@ allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
setUrl("https://maven.vaadin.com/vaadin-prereleases/")
}
}
}
+852 -820
View File
File diff suppressed because it is too large Load Diff
+53 -53
View File
@@ -9,22 +9,22 @@
"@polymer/polymer": "3.5.2",
"@react-stately/data": "^3.12.2",
"@react-types/shared": "^3.28.0",
"@vaadin/bundles": "24.7.5",
"@vaadin/bundles": "24.8.0-alpha15",
"@vaadin/common-frontend": "0.0.19",
"@vaadin/hilla-file-router": "24.7.3",
"@vaadin/hilla-frontend": "24.7.3",
"@vaadin/hilla-lit-form": "24.7.3",
"@vaadin/hilla-react-auth": "24.7.3",
"@vaadin/hilla-react-crud": "24.7.3",
"@vaadin/hilla-react-form": "24.7.3",
"@vaadin/hilla-react-i18n": "24.7.3",
"@vaadin/hilla-react-signals": "24.7.3",
"@vaadin/polymer-legacy-adapter": "24.7.5",
"@vaadin/react-components": "24.7.5",
"@vaadin/hilla-file-router": "24.8.0-alpha6",
"@vaadin/hilla-frontend": "24.8.0-alpha6",
"@vaadin/hilla-lit-form": "24.8.0-alpha6",
"@vaadin/hilla-react-auth": "24.8.0-alpha6",
"@vaadin/hilla-react-crud": "24.8.0-alpha6",
"@vaadin/hilla-react-form": "24.8.0-alpha6",
"@vaadin/hilla-react-i18n": "24.8.0-alpha6",
"@vaadin/hilla-react-signals": "24.8.0-alpha6",
"@vaadin/polymer-legacy-adapter": "24.8.0-alpha15",
"@vaadin/react-components": "24.8.0-alpha15",
"@vaadin/vaadin-development-mode-detector": "2.0.7",
"@vaadin/vaadin-lumo-styles": "24.7.5",
"@vaadin/vaadin-material-styles": "24.7.5",
"@vaadin/vaadin-themable-mixin": "24.7.5",
"@vaadin/vaadin-lumo-styles": "24.8.0-alpha15",
"@vaadin/vaadin-material-styles": "24.8.0-alpha15",
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha15",
"@vaadin/vaadin-usage-statistics": "2.1.3",
"classnames": "^2.5.1",
"construct-style-sheets-polyfill": "3.1.0",
@@ -55,17 +55,17 @@
"@types/node": "^22.4.0",
"@types/react": "18.3.20",
"@types/react-dom": "18.3.6",
"@vaadin/hilla-generator-cli": "24.7.3",
"@vaadin/hilla-generator-core": "24.7.3",
"@vaadin/hilla-generator-plugin-backbone": "24.7.3",
"@vaadin/hilla-generator-plugin-barrel": "24.7.3",
"@vaadin/hilla-generator-plugin-client": "24.7.3",
"@vaadin/hilla-generator-plugin-model": "24.7.3",
"@vaadin/hilla-generator-plugin-push": "24.7.3",
"@vaadin/hilla-generator-plugin-signals": "24.7.3",
"@vaadin/hilla-generator-plugin-subtypes": "24.7.3",
"@vaadin/hilla-generator-plugin-transfertypes": "24.7.3",
"@vaadin/hilla-generator-utils": "24.7.3",
"@vaadin/hilla-generator-cli": "24.8.0-alpha6",
"@vaadin/hilla-generator-core": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-backbone": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-barrel": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-client": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-model": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-push": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-signals": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-subtypes": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-transfertypes": "24.8.0-alpha6",
"@vaadin/hilla-generator-utils": "24.8.0-alpha6",
"@vitejs/plugin-react": "4.4.1",
"@vitejs/plugin-react-swc": "^3.7.0",
"async": "3.2.6",
@@ -78,7 +78,7 @@
"strip-css-comments": "5.0.0",
"tailwindcss": "^3.4.13",
"transform-ast": "2.4.4",
"typescript": "5.7.3",
"typescript": "5.8.3",
"vite": "6.3.3",
"vite-plugin-checker": "0.9.1",
"workbox-build": "7.3.0",
@@ -133,22 +133,22 @@
"vaadin": {
"dependencies": {
"@polymer/polymer": "3.5.2",
"@vaadin/bundles": "24.7.5",
"@vaadin/bundles": "24.8.0-alpha15",
"@vaadin/common-frontend": "0.0.19",
"@vaadin/hilla-file-router": "24.7.3",
"@vaadin/hilla-frontend": "24.7.3",
"@vaadin/hilla-lit-form": "24.7.3",
"@vaadin/hilla-react-auth": "24.7.3",
"@vaadin/hilla-react-crud": "24.7.3",
"@vaadin/hilla-react-form": "24.7.3",
"@vaadin/hilla-react-i18n": "24.7.3",
"@vaadin/hilla-react-signals": "24.7.3",
"@vaadin/polymer-legacy-adapter": "24.7.5",
"@vaadin/react-components": "24.7.5",
"@vaadin/hilla-file-router": "24.8.0-alpha6",
"@vaadin/hilla-frontend": "24.8.0-alpha6",
"@vaadin/hilla-lit-form": "24.8.0-alpha6",
"@vaadin/hilla-react-auth": "24.8.0-alpha6",
"@vaadin/hilla-react-crud": "24.8.0-alpha6",
"@vaadin/hilla-react-form": "24.8.0-alpha6",
"@vaadin/hilla-react-i18n": "24.8.0-alpha6",
"@vaadin/hilla-react-signals": "24.8.0-alpha6",
"@vaadin/polymer-legacy-adapter": "24.8.0-alpha15",
"@vaadin/react-components": "24.8.0-alpha15",
"@vaadin/vaadin-development-mode-detector": "2.0.7",
"@vaadin/vaadin-lumo-styles": "24.7.5",
"@vaadin/vaadin-material-styles": "24.7.5",
"@vaadin/vaadin-themable-mixin": "24.7.5",
"@vaadin/vaadin-lumo-styles": "24.8.0-alpha15",
"@vaadin/vaadin-material-styles": "24.8.0-alpha15",
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha15",
"@vaadin/vaadin-usage-statistics": "2.1.3",
"construct-style-sheets-polyfill": "3.1.0",
"date-fns": "2.29.3",
@@ -164,17 +164,17 @@
"@rollup/pluginutils": "5.1.4",
"@types/react": "18.3.20",
"@types/react-dom": "18.3.6",
"@vaadin/hilla-generator-cli": "24.7.3",
"@vaadin/hilla-generator-core": "24.7.3",
"@vaadin/hilla-generator-plugin-backbone": "24.7.3",
"@vaadin/hilla-generator-plugin-barrel": "24.7.3",
"@vaadin/hilla-generator-plugin-client": "24.7.3",
"@vaadin/hilla-generator-plugin-model": "24.7.3",
"@vaadin/hilla-generator-plugin-push": "24.7.3",
"@vaadin/hilla-generator-plugin-signals": "24.7.3",
"@vaadin/hilla-generator-plugin-subtypes": "24.7.3",
"@vaadin/hilla-generator-plugin-transfertypes": "24.7.3",
"@vaadin/hilla-generator-utils": "24.7.3",
"@vaadin/hilla-generator-cli": "24.8.0-alpha6",
"@vaadin/hilla-generator-core": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-backbone": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-barrel": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-client": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-model": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-push": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-signals": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-subtypes": "24.8.0-alpha6",
"@vaadin/hilla-generator-plugin-transfertypes": "24.8.0-alpha6",
"@vaadin/hilla-generator-utils": "24.8.0-alpha6",
"@vitejs/plugin-react": "4.4.1",
"async": "3.2.6",
"glob": "11.0.2",
@@ -182,13 +182,13 @@
"rollup-plugin-visualizer": "5.14.0",
"strip-css-comments": "5.0.0",
"transform-ast": "2.4.4",
"typescript": "5.7.3",
"typescript": "5.8.3",
"vite": "6.3.3",
"vite-plugin-checker": "0.9.1",
"workbox-build": "7.3.0",
"workbox-core": "7.3.0",
"workbox-precaching": "7.3.0"
},
"hash": "4507ade910f8d37b606e1a8cff078e31d3a90314f1c7426a4aea761dc563f02a"
"hash": "fdf5506c7d7915b341632254a47867cd7d7007cab8d08447bd909b37cdb94cf9"
}
}
@@ -14,7 +14,7 @@ function MessageManagementLayout({getConfig, getConfigs, formik}: any) {
const editorModal = useDisclosure();
const testNotificationModal = useDisclosure();
const [availableTemplates, setAvailableTemplates] = useState<MessageTemplateDto[]>([]);
const [selectedTemplate, setSelectedTemplate] = useState<MessageTemplateDto | null>(null);
const [selectedTemplate, setSelectedTemplate] = useState<MessageTemplateDto>();
useEffect(() => {
MessageTemplateEndpoint.getAll().then((response: any) => {
@@ -113,13 +113,13 @@ function MessageManagementLayout({getConfig, getConfigs, formik}: any) {
<EditTemplateModal
isOpen={editorModal.isOpen}
onOpenChange={editorModal.onOpenChange}
selectedTemplate={selectedTemplate}
selectedTemplate={selectedTemplate!!}
/>
<SendTestNotificationModal
isOpen={testNotificationModal.isOpen}
onOpenChange={testNotificationModal.onOpenChange}
selectedTemplate={selectedTemplate}
selectedTemplate={selectedTemplate!!}
/>
</div>
);
@@ -12,8 +12,6 @@ export default function PluginManagement() {
useEffect(() => {
PluginManagementEndpoint.getPlugins().then((response) => {
if (response === undefined) return;
let sortedPlugins: PluginDto[] = response
.filter(p => !!p)
.sort((a: PluginDto, b: PluginDto) => {
@@ -17,7 +17,7 @@ function UserManagementLayout({getConfig, formik}: any) {
useEffect(() => {
UserEndpoint.getAllUsers().then(
(response) => setUsers(response as UserInfoDto[])
(response) => setUsers(response)
);
ConfigEndpoint.get("sso.oidc.auto-register-new-users").then(
@@ -9,7 +9,7 @@ import MessageTemplateDto from "Frontend/generated/de/grimsi/gameyfin/messages/t
interface SendTestNotificationModalProps {
isOpen: boolean;
onOpenChange: () => void;
selectedTemplate: MessageTemplateDto | null;
selectedTemplate: MessageTemplateDto;
}
export default function SendTestNotificationModal({
@@ -35,7 +35,7 @@ export default function SendTestNotificationModal({
initialValues={{}}
isInitialValid={false}
onSubmit={async (values) => {
await MessageEndpoint.sendTestNotification(selectedTemplate?.key, values);
await MessageEndpoint.sendTestNotification(selectedTemplate.key, values);
addToast({
title: "Notification sent",
description: "Test notification to you has been sent",
@@ -43,7 +43,7 @@ export default function SendTestNotificationModal({
});
onClose();
}}
validationSchema={generateValidationSchema(selectedTemplate?.availablePlaceholders as string[])}
validationSchema={generateValidationSchema(selectedTemplate.availablePlaceholders)}
>
{(formik) => (
<Form>
@@ -53,7 +53,7 @@ export default function SendTestNotificationModal({
<ModalBody>
<p className="text-ls font-semibold mb-4">Fill the placeholders of the
template</p>
{selectedTemplate?.availablePlaceholders?.map((placeholder) =>
{selectedTemplate.availablePlaceholders.map((placeholder) =>
<Input key={placeholder} label={placeholder} name={placeholder}/>
)}
</ModalBody>
@@ -28,12 +28,9 @@ export default function FileTreeView({onPathChange}: { onPathChange: (file: stri
const [flattenedFileTree, setFlattenedFileTree] = useState<INode[]>([rootNode]);
useEffect(() => {
FilesystemEndpoint.getHostOperatingSystem().then(
result => {
if (result === undefined) return;
setHostOSType(result);
}
)
FilesystemEndpoint.getHostOperatingSystem().then((response) => {
setHostOSType(response);
})
FilesystemEndpoint.listSubDirectories("").then(
result => {
@@ -32,14 +32,14 @@ export default function AssignRolesModal({isOpen, onOpenChange, user}: AssignRol
const [error, setError] = useState<string>();
useEffect(() => {
setSelectedRole(rolesToSelection(user.roles!));
setSelectedRole(rolesToSelection(user.roles));
UserEndpoint.getRolesBelow().then((availableRoles) => {
setAvailableRoles(availableRoles!.map((role) => ({id: role!.toString()})));
setAvailableRoles(availableRoles.map((role) => ({id: role.toString()})));
});
}, []);
function rolesToSelection(roles: Array<string | undefined>): Selection {
return new Set(roles.map((role) => role!.toString()));
function rolesToSelection(roles: Array<string>): Selection {
return new Set(roles.map((role) => role.toString()));
}
async function assignRoles() {
@@ -47,7 +47,6 @@ export default function AssignRolesModal({isOpen, onOpenChange, user}: AssignRol
let selectedRolesArray = Array.from(selectedRole).map((role) => role.toString());
let result = await UserEndpoint.assignRoles(user.username, selectedRolesArray);
if (!result) return;
switch (result) {
case RoleAssignmentResult.SUCCESS:
window.location.reload();
@@ -17,7 +17,7 @@ export default function InviteUserModal({isOpen, onOpenChange}: InviteUserModalP
}, []);
async function inviteUser(onClose: () => void) {
if (email === null) return;
if (!email) return;
if (await UserEndpoint.existsByMail(email)) {
setError("User with this email already exists");
@@ -21,6 +21,8 @@ export default function PasswordResetModal({
}, []);
async function resetPassword() {
if (!resetEmail) return;
await PasswordResetEndpoint.requestPasswordReset(resetEmail);
addToast({
title: "Password reset requested",
@@ -1,4 +1,16 @@
import {useEffect, useState} from "react";
import {LibraryEndpoint} from "Frontend/generated/endpoints";
import LibraryDto from "Frontend/generated/de/grimsi/gameyfin/libraries/dto/LibraryDto";
export default function HomeView() {
const [libraries, setLibraries] = useState<LibraryDto[]>([]);
useEffect(() => {
LibraryEndpoint.getAllLibraries().then(libraries => {
setLibraries(libraries);
});
}, [])
return (
<div className="grow justify-center mt-12">
<div className="flex flex-col items-center gap-6">
@@ -10,7 +10,7 @@ import UserInvitationAcceptanceResult
from "Frontend/generated/de/grimsi/gameyfin/users/enums/UserInvitationAcceptanceResult";
export default function InvitationRegistrationView() {
const [searchParams, setSearchParams] = useSearchParams();
const [searchParams] = useSearchParams();
const [token, setToken] = useState<string>();
const [email, setEmail] = useState<string>();
const navigate = useNavigate();
@@ -24,6 +24,8 @@ export default function InvitationRegistrationView() {
}, [searchParams]);
async function register(values: any, formik: any) {
if (!token || !email) return;
let result = await RegistrationEndpoint.acceptInvitation(token, {
email: email,
username: values.username,
+19 -3
View File
@@ -85,6 +85,8 @@ const themeOptions = {
const hasExportedWebComponents = existsSync(path.resolve(frontendFolder, 'web-component.html'));
const target = ['safari15', 'es2022'];
// Block debug and trace logs.
console.trace = () => {};
console.debug = () => {};
@@ -139,10 +141,10 @@ function buildSWPlugin(opts: { devMode: boolean }): PluginOption {
write: !devMode,
minify: viteConfig.build.minify,
outDir: viteConfig.build.outDir,
target,
sourcemap: viteConfig.command === 'serve' || viteConfig.build.sourcemap,
emptyOutDir: false,
modulePreload: false,
target: ['safari15', 'es2022'],
rollupOptions: {
input: {
sw: settings.clientServiceWorkerSource
@@ -698,13 +700,24 @@ export const vaadinConfig: UserConfigFn = (env) => {
outDir: buildOutputFolder,
emptyOutDir: devBundle,
assetsDir: 'VAADIN/build',
target: ['safari15', 'es2022'],
target,
rollupOptions: {
input: {
indexhtml: projectIndexHtml,
...(hasExportedWebComponents ? { webcomponenthtml: path.resolve(frontendFolder, 'web-component.html') } : {})
},
output: {
// Workaround to enable dynamic imports with top-level await for
// commonjs modules, such as "atmosphere.js" in Hilla. Extracting
// Rollup's commonjs helpers into separate manual chunk avoids
// circular dependencies in this case. Caused
// - https://github.com/vitejs/vite/issues/10995
// - https://github.com/rollup/rollup/issues/5884
// - https://github.com/vitejs/vite/issues/19695
// - https://github.com/vitejs/vite/issues/12209
manualChunks: (id: string) => id.startsWith('\0commonjsHelpers.js') ? 'commonjsHelpers' : null
},
onwarn: (warning: rollup.RollupLog, defaultHandler: rollup.LoggingFunction) => {
const ignoreEvalWarning = [
'generated/jar-resources/FlowClient.js',
@@ -719,6 +732,9 @@ export const vaadinConfig: UserConfigFn = (env) => {
}
},
optimizeDeps: {
esbuildOptions: {
target,
},
entries: [
// Pre-scan entrypoints in Vite to avoid reloading on first open
'generated/vaadin.ts'
@@ -836,11 +852,11 @@ export const vaadinConfig: UserConfigFn = (env) => {
}
}
},
vitePluginFileSystemRouter({isDevMode: devMode}),
checker({
typescript: true
}),
productionMode && visualizer({ brotliSize: true, filename: bundleSizeFile })
, vitePluginFileSystemRouter({isDevMode: devMode})
]
};
};
+1 -1
View File
@@ -1,7 +1,7 @@
# Plugin versions
kotlinVersion=2.1.20
kspVersion=2.1.20-2.0.1
vaadinVersion=24.7.3
vaadinVersion=24.8.0.alpha6
springBootVersion=3.4.5
springCloudVersion=2024.0.1
springDependencyManagementVersion=1.1.7