This commit is contained in:
@@ -0,0 +1,493 @@
|
||||
/*
|
||||
* Copyright 2000-2024 Vaadin Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
/// <reference lib="es2018" />
|
||||
import { Flow as _Flow } from "Frontend/generated/jar-resources/Flow.js";
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState
|
||||
} from "react";
|
||||
import {
|
||||
matchRoutes,
|
||||
useBlocker,
|
||||
useLocation,
|
||||
useNavigate,
|
||||
type NavigateOptions, useHref,
|
||||
} from "react-router-dom";
|
||||
import type { AgnosticRouteObject } from '@remix-run/router';
|
||||
|
||||
const flow = new _Flow({
|
||||
imports: () => import("Frontend/generated/flow/generated-flow-imports.js")
|
||||
});
|
||||
|
||||
const router = {
|
||||
render() {
|
||||
return Promise.resolve();
|
||||
}
|
||||
};
|
||||
|
||||
// ClickHandler for vaadin-router-go event is copied from vaadin/router click.js
|
||||
// @ts-ignore
|
||||
function getAnchorOrigin(anchor) {
|
||||
// IE11: on HTTP and HTTPS the default port is not included into
|
||||
// window.location.origin, so won't include it here either.
|
||||
const port = anchor.port;
|
||||
const protocol = anchor.protocol;
|
||||
const defaultHttp = protocol === 'http:' && port === '80';
|
||||
const defaultHttps = protocol === 'https:' && port === '443';
|
||||
const host = (defaultHttp || defaultHttps)
|
||||
? anchor.hostname // does not include the port number (e.g. www.example.org)
|
||||
: anchor.host; // does include the port number (e.g. www.example.org:80)
|
||||
return `${protocol}//${host}`;
|
||||
}
|
||||
|
||||
function normalizeURL(url: URL): void | string {
|
||||
// ignore click if baseURI does not match the document (external)
|
||||
if (!url.href.startsWith(document.baseURI)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Normalize path against baseURI
|
||||
return '/' + url.href.slice(document.baseURI.length);
|
||||
}
|
||||
|
||||
function extractPath(event: MouseEvent): void | string {
|
||||
// ignore the click if the default action is prevented
|
||||
if (event.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore the click if not with the primary mouse button
|
||||
if (event.button !== 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore the click if a modifier key is pressed
|
||||
if (event.shiftKey || event.ctrlKey || event.altKey || event.metaKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
// find the <a> element that the click is at (or within)
|
||||
let maybeAnchor = event.target;
|
||||
const path = event.composedPath
|
||||
? event.composedPath()
|
||||
// @ts-ignore
|
||||
: (event.path || []);
|
||||
|
||||
// example to check: `for...of` loop here throws the "Not yet implemented" error
|
||||
for (let i = 0; i < path.length; i++) {
|
||||
const target = path[i];
|
||||
if (target.nodeName && target.nodeName.toLowerCase() === 'a') {
|
||||
maybeAnchor = target;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
while (maybeAnchor && maybeAnchor.nodeName.toLowerCase() !== 'a') {
|
||||
// @ts-ignore
|
||||
maybeAnchor = maybeAnchor.parentNode;
|
||||
}
|
||||
|
||||
// ignore the click if not at an <a> element
|
||||
// @ts-ignore
|
||||
if (!maybeAnchor || maybeAnchor.nodeName.toLowerCase() !== 'a') {
|
||||
return;
|
||||
}
|
||||
|
||||
const anchor = maybeAnchor as HTMLAnchorElement;
|
||||
|
||||
// ignore the click if the <a> element has a non-default target
|
||||
if (anchor.target && anchor.target.toLowerCase() !== '_self') {
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore the click if the <a> element has the 'download' attribute
|
||||
if (anchor.hasAttribute('download')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore the click if the <a> element has the 'router-ignore' attribute
|
||||
if (anchor.hasAttribute('router-ignore')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore the click if the target URL is a fragment on the current page
|
||||
if (anchor.pathname === window.location.pathname && anchor.hash !== '') {
|
||||
// @ts-ignore
|
||||
window.location.hash = anchor.hash;
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore the click if the target is external to the app
|
||||
// In IE11 HTMLAnchorElement does not have the `origin` property
|
||||
// @ts-ignore
|
||||
const origin = anchor.origin || getAnchorOrigin(anchor);
|
||||
if (origin !== window.location.origin) {
|
||||
return;
|
||||
}
|
||||
|
||||
return normalizeURL(new URL(anchor.href, anchor.baseURI));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire 'vaadin-navigated' event to inform components of navigation.
|
||||
* @param pathname pathname of navigation
|
||||
* @param search search of navigation
|
||||
*/
|
||||
function fireNavigated(pathname:string, search: string) {
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(new CustomEvent('vaadin-navigated', {
|
||||
detail: {
|
||||
pathname,
|
||||
search
|
||||
}
|
||||
}));
|
||||
// @ts-ignore
|
||||
delete window.Vaadin.Flow.navigation;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
function postpone() {
|
||||
}
|
||||
|
||||
const prevent = () => postpone;
|
||||
|
||||
type RouterContainer = Awaited<ReturnType<typeof flow.serverSideRoutes[0]["action"]>>;
|
||||
|
||||
|
||||
type NavigateOpts = {
|
||||
to: string,
|
||||
callback: boolean,
|
||||
opts?: NavigateOptions
|
||||
};
|
||||
|
||||
type NavigateFn = (to: string, callback: boolean, opts?: NavigateOptions) => void;
|
||||
|
||||
/**
|
||||
* A hook providing the `navigate(path: string, opts?: NavigateOptions)` function
|
||||
* with React Router API that has more consistent history updates. Uses internal
|
||||
* queue for processing navigate calls.
|
||||
*/
|
||||
function useQueuedNavigate(waitReference: React.MutableRefObject<Promise<void> | undefined>, navigated: React.MutableRefObject<boolean>): NavigateFn {
|
||||
const navigate = useNavigate();
|
||||
const navigateQueue = useRef<NavigateOpts[]>([]).current;
|
||||
const [navigateQueueLength, setNavigateQueueLength] = useState(0);
|
||||
|
||||
const dequeueNavigation = useCallback(() => {
|
||||
const navigateArgs = navigateQueue.shift();
|
||||
if (navigateArgs === undefined) {
|
||||
// Empty queue, do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
const blockingNavigate = async () => {
|
||||
if (waitReference.current) {
|
||||
await waitReference.current;
|
||||
waitReference.current = undefined;
|
||||
}
|
||||
navigated.current = !navigateArgs.callback;
|
||||
navigate(navigateArgs.to, navigateArgs.opts);
|
||||
setNavigateQueueLength(navigateQueue.length);
|
||||
}
|
||||
blockingNavigate();
|
||||
}, [navigate, setNavigateQueueLength]);
|
||||
|
||||
const dequeueNavigationAfterCurrentTask = useCallback(() => {
|
||||
queueMicrotask(dequeueNavigation);
|
||||
}, [dequeueNavigation]);
|
||||
|
||||
const enqueueNavigation = useCallback((to: string, callback: boolean, opts?: NavigateOptions) => {
|
||||
navigateQueue.push({to: to, callback: callback, opts: opts});
|
||||
setNavigateQueueLength(navigateQueue.length);
|
||||
if (navigateQueue.length === 1) {
|
||||
// The first navigation can be started right after any pending sync
|
||||
// jobs, which could add more navigations to the queue.
|
||||
dequeueNavigationAfterCurrentTask();
|
||||
}
|
||||
}, [setNavigateQueueLength, dequeueNavigationAfterCurrentTask]);
|
||||
|
||||
useEffect(() => () => {
|
||||
// The Flow component has rendered, but history might not be
|
||||
// updated yet, as React Router does it asynchronously.
|
||||
// Use microtask callback for history consistency.
|
||||
dequeueNavigationAfterCurrentTask();
|
||||
}, [navigateQueueLength, dequeueNavigationAfterCurrentTask]);
|
||||
|
||||
return enqueueNavigation;
|
||||
}
|
||||
|
||||
function Flow() {
|
||||
const ref = useRef<HTMLOutputElement>(null);
|
||||
const navigate = useNavigate();
|
||||
const blocker = useBlocker(({ currentLocation, nextLocation }) => {
|
||||
navigated.current = navigated.current || (nextLocation.pathname === currentLocation.pathname && nextLocation.search === currentLocation.search && nextLocation.hash === currentLocation.hash);
|
||||
return true;
|
||||
});
|
||||
const location = useLocation();
|
||||
const navigated = useRef<boolean>(false);
|
||||
const blockerHandled = useRef<boolean>(false);
|
||||
const fromAnchor = useRef<boolean>(false);
|
||||
const containerRef = useRef<RouterContainer | undefined>(undefined);
|
||||
const roundTrip = useRef<Promise<void> | undefined>(undefined);
|
||||
const queuedNavigate = useQueuedNavigate(roundTrip, navigated);
|
||||
const basename = useHref('/');
|
||||
|
||||
const navigateEventHandler = useCallback((event: MouseEvent) => {
|
||||
const path = extractPath(event);
|
||||
if (!path) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event && event.preventDefault) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
navigated.current = false;
|
||||
// When navigation is triggered by click on a link, fromAnchor is set to true
|
||||
// in order to get a server round-trip even when navigating to the same URL again
|
||||
fromAnchor.current = true;
|
||||
navigate(path);
|
||||
// Dispatch close event for overlay drawer on click navigation.
|
||||
window.dispatchEvent(new CustomEvent('close-overlay-drawer'));
|
||||
}, [navigate]);
|
||||
|
||||
const vaadinRouterGoEventHandler = useCallback((event: CustomEvent<URL>) => {
|
||||
const url = event.detail;
|
||||
const path = normalizeURL(url);
|
||||
if (!path) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
navigate(path);
|
||||
}, [navigate]);
|
||||
|
||||
const vaadinNavigateEventHandler = useCallback((event: CustomEvent<{state: unknown, url: string, replace?: boolean, callback: boolean}>) => {
|
||||
// @ts-ignore
|
||||
window.Vaadin.Flow.navigation = true;
|
||||
const path = '/' + event.detail.url;
|
||||
fromAnchor.current = false;
|
||||
queuedNavigate(path, event.detail.callback, { state: event.detail.state, replace: event.detail.replace });
|
||||
}, [navigate]);
|
||||
|
||||
const redirect = useCallback((path: string) => {
|
||||
return (() => {
|
||||
navigate(path, {replace: true});
|
||||
});
|
||||
}, [navigate]);
|
||||
|
||||
useEffect(() => {
|
||||
// @ts-ignore
|
||||
window.addEventListener('vaadin-router-go', vaadinRouterGoEventHandler);
|
||||
// @ts-ignore
|
||||
window.addEventListener('vaadin-navigate', vaadinNavigateEventHandler);
|
||||
|
||||
return () => {
|
||||
// @ts-ignore
|
||||
window.removeEventListener('vaadin-router-go', vaadinRouterGoEventHandler);
|
||||
// @ts-ignore
|
||||
window.removeEventListener('vaadin-navigate', vaadinNavigateEventHandler);
|
||||
};
|
||||
}, [vaadinRouterGoEventHandler, vaadinNavigateEventHandler]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
containerRef.current?.parentNode?.removeChild(containerRef.current);
|
||||
containerRef.current = undefined;
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (blocker.state === 'blocked') {
|
||||
if(blockerHandled.current) {
|
||||
// Blocker is handled and the new navigation
|
||||
// gets queued to be executed after the current handling ends.
|
||||
const {pathname, state} = blocker.location;
|
||||
queuedNavigate(pathname.substring(basename.length), true, { state: state, replace: true });
|
||||
return;
|
||||
}
|
||||
blockerHandled.current = true;
|
||||
let blockingPromise: any;
|
||||
roundTrip.current = new Promise<void>((resolve,reject) => blockingPromise = {resolve:resolve,reject:reject});
|
||||
// Release blocker handling after promise is fulfilled
|
||||
roundTrip.current.then(() => blockerHandled.current = false, () => blockerHandled.current = false);
|
||||
|
||||
// Proceed to the blocked location, unless the navigation originates from a click on a link.
|
||||
// In that case continue with function execution and perform a server round-trip
|
||||
if (navigated.current && !fromAnchor.current) {
|
||||
blocker.proceed();
|
||||
blockingPromise.resolve();
|
||||
return;
|
||||
}
|
||||
fromAnchor.current = false;
|
||||
const {pathname, search} = blocker.location;
|
||||
const routes = ((window as any)?.Vaadin?.routesConfig || []) as AgnosticRouteObject[];
|
||||
let matched = matchRoutes(Array.from(routes), pathname);
|
||||
|
||||
// Navigation between server routes
|
||||
// @ts-ignore
|
||||
if (matched && matched.filter(path => path.route?.element?.type?.name === Flow.name).length != 0) {
|
||||
containerRef.current?.onBeforeEnter?.call(containerRef?.current,
|
||||
{pathname, search}, {
|
||||
prevent() {
|
||||
blocker.reset();
|
||||
blockingPromise.resolve();
|
||||
navigated.current = false;
|
||||
},
|
||||
redirect,
|
||||
continue() {
|
||||
blocker.proceed();
|
||||
blockingPromise.resolve();
|
||||
}
|
||||
}, router);
|
||||
navigated.current = true;
|
||||
} else {
|
||||
// For covering the 'server -> client' use case
|
||||
Promise.resolve(containerRef.current?.onBeforeLeave?.call(containerRef?.current, {
|
||||
pathname,
|
||||
search
|
||||
}, {prevent}, router))
|
||||
.then((cmd: unknown) => {
|
||||
if (cmd === postpone && containerRef.current) {
|
||||
// postponed navigation: expose existing blocker to Flow
|
||||
containerRef.current.serverConnected = (cancel) => {
|
||||
if (cancel) {
|
||||
blocker.reset();
|
||||
blockingPromise.resolve();
|
||||
} else {
|
||||
blocker.proceed();
|
||||
window.removeEventListener('click', navigateEventHandler);
|
||||
blockingPromise.resolve();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// permitted navigation: proceed with the blocker
|
||||
blocker.proceed();
|
||||
window.removeEventListener('click', navigateEventHandler);
|
||||
blockingPromise.resolve();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [blocker.state, blocker.location]);
|
||||
|
||||
useEffect(() => {
|
||||
if (blocker.state === 'blocked') {
|
||||
return;
|
||||
}
|
||||
if (navigated.current) {
|
||||
navigated.current = false;
|
||||
fireNavigated(location.pathname,location.search);
|
||||
return;
|
||||
}
|
||||
flow.serverSideRoutes[0].action({pathname: location.pathname, search: location.search})
|
||||
.then((container) => {
|
||||
const outlet = ref.current?.parentNode;
|
||||
if (outlet && outlet !== container.parentNode) {
|
||||
outlet.append(container);
|
||||
window.addEventListener('click', navigateEventHandler);
|
||||
containerRef.current = container
|
||||
}
|
||||
return container.onBeforeEnter?.call(container, {pathname: location.pathname, search: location.search}, {prevent, redirect, continue() {
|
||||
fireNavigated(location.pathname,location.search);}}, router);
|
||||
})
|
||||
.then((result: unknown) => {
|
||||
if (typeof result === "function") {
|
||||
result();
|
||||
}
|
||||
});
|
||||
}, [location]);
|
||||
|
||||
return <output ref={ref} />;
|
||||
}
|
||||
Flow.type = 'FlowContainer'; // This is for copilot to recognize this
|
||||
|
||||
export const serverSideRoutes = [
|
||||
{ path: '/*', element: <Flow/> },
|
||||
];
|
||||
|
||||
/**
|
||||
* Load the script for an exported WebComponent with the given tag
|
||||
*
|
||||
* @param tag name of the exported web-component to load
|
||||
*
|
||||
* @returns Promise(resolve, reject) that is fulfilled on script load
|
||||
*/
|
||||
export const loadComponentScript = (tag: String): Promise<void> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
useEffect(() => {
|
||||
const script = document.createElement('script');
|
||||
script.src = `/web-component/${tag}.js`;
|
||||
script.onload = function() {
|
||||
resolve();
|
||||
};
|
||||
script.onerror = function(err) {
|
||||
reject(err);
|
||||
};
|
||||
document.head.appendChild(script);
|
||||
|
||||
return () => {
|
||||
document.head.removeChild(script);
|
||||
}
|
||||
}, []);
|
||||
});
|
||||
};
|
||||
|
||||
interface Properties {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load WebComponent script and create a React element for the WebComponent.
|
||||
*
|
||||
* @param tag custom web-component tag name.
|
||||
* @param props optional Properties object to create element attributes with
|
||||
* @param onload optional callback to be called for script onload
|
||||
* @param onerror optional callback for error loading the script
|
||||
*/
|
||||
export const reactElement = (tag: string, props?: Properties, onload?: () => void, onerror?: (err:any) => void) => {
|
||||
loadComponentScript(tag).then(() => onload?.(), (err) => {
|
||||
if(onerror) {
|
||||
onerror(err);
|
||||
} else {
|
||||
console.error(`Failed to load script for ${tag}.`, err);
|
||||
}
|
||||
});
|
||||
|
||||
if(props) {
|
||||
return React.createElement(tag, props);
|
||||
}
|
||||
return React.createElement(tag);
|
||||
};
|
||||
|
||||
export default Flow;
|
||||
|
||||
// @ts-ignore
|
||||
if (import.meta.hot) {
|
||||
// @ts-ignore
|
||||
import.meta.hot.accept((newModule) => {
|
||||
// A hot module replace for Flow.tsx happens when any JS/TS imported through @JsModule
|
||||
// or similar is updated because this updates generated-flow-imports.js and that in turn
|
||||
// is imported by this file. We have no means of hot replacing those files, e.g. some
|
||||
// custom lit element so we need to reload the page. */
|
||||
if (newModule) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
/*
|
||||
* Copyright 2000-2024 Vaadin Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
import {createRoot, Root} from "react-dom/client";
|
||||
import {createElement, type Dispatch, type ReactElement, useReducer} from "react";
|
||||
|
||||
type FlowStateKeyChangedAction<K extends string, V> = Readonly<{
|
||||
type: 'stateKeyChanged',
|
||||
key: K,
|
||||
value: V,
|
||||
}>;
|
||||
|
||||
type FlowStateReducerAction = FlowStateKeyChangedAction<string, unknown>;
|
||||
|
||||
function stateReducer<S extends Readonly<Record<string, unknown>>>(state: S, action: FlowStateReducerAction): S {
|
||||
switch (action.type) {
|
||||
case "stateKeyChanged":
|
||||
const {key, value} = action;
|
||||
return {
|
||||
...state,
|
||||
key: value
|
||||
} as S;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
type DispatchEvent<T> = T extends undefined
|
||||
? () => boolean
|
||||
: (value: T) => boolean;
|
||||
|
||||
const emptyAction: Dispatch<unknown> = () => {};
|
||||
|
||||
/**
|
||||
* An object with APIs exposed for using in the {@link ReactAdapterElement#render}
|
||||
* implementation.
|
||||
*/
|
||||
export type RenderHooks = {
|
||||
/**
|
||||
* A hook API for using stateful JS properties of the Web Component from
|
||||
* the React `render()`.
|
||||
*
|
||||
* @typeParam T - Type of the state value
|
||||
*
|
||||
* @param key - Web Component property name, which is used for two-way
|
||||
* value propagation from the server and back.
|
||||
* @param initialValue - Fallback initial value (optional). Only applies if
|
||||
* the Java component constructor does not invoke `setState`.
|
||||
* @returns A tuple with two values:
|
||||
* 1. The current state.
|
||||
* 2. The `set` function for changing the state and triggering render
|
||||
* @protected
|
||||
*/
|
||||
readonly useState: ReactAdapterElement["useState"]
|
||||
|
||||
/**
|
||||
* A hook helper to simplify dispatching a `CustomEvent` on the Web
|
||||
* Component from React.
|
||||
*
|
||||
* @typeParam T - The type for `event.detail` value (optional).
|
||||
*
|
||||
* @param type - The `CustomEvent` type string.
|
||||
* @param options - The settings for the `CustomEvent`.
|
||||
* @returns The `dispatch` function. The function parameters change
|
||||
* depending on the `T` generic type:
|
||||
* - For `undefined` type (default), has no parameters.
|
||||
* - For other types, has one parameter for the `event.detail` value of that type.
|
||||
* @protected
|
||||
*/
|
||||
readonly useCustomEvent: ReactAdapterElement["useCustomEvent"]
|
||||
};
|
||||
|
||||
/**
|
||||
* A base class for Web Components that render using React. Enables creating
|
||||
* adapters for integrating React components with Flow. Intended for use with
|
||||
* `ReactAdapterComponent` Flow Java class.
|
||||
*/
|
||||
export abstract class ReactAdapterElement extends HTMLElement {
|
||||
#root: Root | undefined = undefined;
|
||||
#rootRendered: boolean = false;
|
||||
|
||||
#state: Record<string, unknown> = Object.create(null);
|
||||
#stateSetters = new Map<string, Dispatch<unknown>>();
|
||||
#customEvents = new Map<string, DispatchEvent<unknown>>();
|
||||
#dispatchFlowState: Dispatch<FlowStateReducerAction> = emptyAction;
|
||||
|
||||
readonly #renderHooks: RenderHooks;
|
||||
|
||||
readonly #Wrapper: () => ReactElement | null;
|
||||
|
||||
#unmountComplete = Promise.resolve();
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.#renderHooks = {
|
||||
useState: this.useState.bind(this),
|
||||
useCustomEvent: this.useCustomEvent.bind(this)
|
||||
};
|
||||
this.#Wrapper = this.#renderWrapper.bind(this);
|
||||
this.#markAsUsed();
|
||||
}
|
||||
|
||||
public async connectedCallback() {
|
||||
await this.#unmountComplete;
|
||||
this.#root = createRoot(this);
|
||||
this.#maybeRenderRoot();
|
||||
}
|
||||
|
||||
public async disconnectedCallback() {
|
||||
this.#unmountComplete = Promise.resolve();
|
||||
await this.#unmountComplete;
|
||||
this.#root?.unmount();
|
||||
this.#root = undefined;
|
||||
this.#rootRendered = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A hook API for using stateful JS properties of the Web Component from
|
||||
* the React `render()`.
|
||||
*
|
||||
* @typeParam T - Type of the state value
|
||||
*
|
||||
* @param key - Web Component property name, which is used for two-way
|
||||
* value propagation from the server and back.
|
||||
* @param initialValue - Fallback initial value (optional). Only applies if
|
||||
* the Java component constructor does not invoke `setState`.
|
||||
* @returns A tuple with two values:
|
||||
* 1. The current state.
|
||||
* 2. The `set` function for changing the state and triggering render
|
||||
* @protected
|
||||
*/
|
||||
protected useState<T>(key: string, initialValue?: T): [value: T, setValue: Dispatch<T>] {
|
||||
if (this.#stateSetters.has(key)) {
|
||||
return [this.#state[key] as T, this.#stateSetters.get(key)!];
|
||||
}
|
||||
|
||||
const value = ((this as Record<string, unknown>)[key] as T) ?? initialValue!;
|
||||
this.#state[key] = value;
|
||||
Object.defineProperty(this, key, {
|
||||
enumerable: true,
|
||||
get(): T {
|
||||
return this.#state[key];
|
||||
},
|
||||
set(nextValue: T) {
|
||||
this.#state[key] = nextValue;
|
||||
this.#dispatchFlowState({type: 'stateKeyChanged', key, value});
|
||||
}
|
||||
});
|
||||
|
||||
const dispatchChangedEvent = this.useCustomEvent<{value: T}>(`${key}-changed`, {detail: {value}});
|
||||
const setValue = (value: T) => {
|
||||
this.#state[key] = value;
|
||||
dispatchChangedEvent({value});
|
||||
this.#dispatchFlowState({type: 'stateKeyChanged', key, value});
|
||||
};
|
||||
this.#stateSetters.set(key, setValue as Dispatch<unknown>);
|
||||
return [value, setValue];
|
||||
}
|
||||
|
||||
/**
|
||||
* A hook helper to simplify dispatching a `CustomEvent` on the Web
|
||||
* Component from React.
|
||||
*
|
||||
* @typeParam T - The type for `event.detail` value (optional).
|
||||
*
|
||||
* @param type - The `CustomEvent` type string.
|
||||
* @param options - The settings for the `CustomEvent`.
|
||||
* @returns The `dispatch` function. The function parameters change
|
||||
* depending on the `T` generic type:
|
||||
* - For `undefined` type (default), has no parameters.
|
||||
* - For other types, has one parameter for the `event.detail` value of that type.
|
||||
* @protected
|
||||
*/
|
||||
protected useCustomEvent<T = undefined>(type: string, options: CustomEventInit<T> = {}): DispatchEvent<T> {
|
||||
if (!this.#customEvents.has(type)) {
|
||||
const dispatch = ((detail?: T) => {
|
||||
const eventInitDict = detail === undefined ? options : {
|
||||
...options,
|
||||
detail
|
||||
};
|
||||
const event = new CustomEvent(type, eventInitDict);
|
||||
return this.dispatchEvent(event);
|
||||
}) as DispatchEvent<T>;
|
||||
this.#customEvents.set(type, dispatch as DispatchEvent<unknown>);
|
||||
return dispatch;
|
||||
}
|
||||
return this.#customEvents.get(type)! as DispatchEvent<T>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Web Component render function. To be implemented by users with React.
|
||||
*
|
||||
* @param hooks - the adapter APIs exposed for the implementation.
|
||||
* @protected
|
||||
*/
|
||||
protected abstract render(hooks: RenderHooks): ReactElement | null;
|
||||
|
||||
#maybeRenderRoot() {
|
||||
if (this.#rootRendered || !this.#root) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.#root.render(createElement(this.#Wrapper));
|
||||
this.#rootRendered = true;
|
||||
}
|
||||
|
||||
#renderWrapper(): ReactElement | null {
|
||||
const [state, dispatchFlowState] = useReducer(stateReducer, this.#state);
|
||||
this.#state = state;
|
||||
this.#dispatchFlowState = dispatchFlowState;
|
||||
return this.render(this.#renderHooks);
|
||||
}
|
||||
|
||||
#markAsUsed() : void {
|
||||
// @ts-ignore
|
||||
let vaadinObject = window.Vaadin || {};
|
||||
// @ts-ignore
|
||||
if (vaadinObject.developmentMode) {
|
||||
vaadinObject.registrations = vaadinObject.registrations || [];
|
||||
vaadinObject.registrations.push({
|
||||
is: 'ReactAdapterElement',
|
||||
version: '24.4.17'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/list-box/src/vaadin-list-box.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/upload/src/vaadin-upload.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/avatar/src/vaadin-avatar.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/item/src/vaadin-item.js';
|
||||
import 'Frontend/generated/jar-resources/menubarConnector.js';
|
||||
import '@vaadin/menu-bar/src/vaadin-menu-bar.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/integer-field/src/vaadin-integer-field.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/avatar/src/vaadin-avatar.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import 'Frontend/generated/jar-resources/menubarConnector.js';
|
||||
import '@vaadin/menu-bar/src/vaadin-menu-bar.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/list-box/src/vaadin-list-box.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/custom-field/src/vaadin-custom-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/item/src/vaadin-item.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/integer-field/src/vaadin-integer-field.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/select/src/vaadin-select.js';
|
||||
import 'Frontend/generated/jar-resources/selectConnector.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/list-box/src/vaadin-list-box.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/custom-field/src/vaadin-custom-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/item/src/vaadin-item.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/integer-field/src/vaadin-integer-field.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/list-box/src/vaadin-list-box.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/item/src/vaadin-item.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/list-box/src/vaadin-list-box.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/item/src/vaadin-item.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/integer-field/src/vaadin-integer-field.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/list-box/src/vaadin-list-box.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/upload/src/vaadin-upload.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/avatar/src/vaadin-avatar.js';
|
||||
import '@vaadin/custom-field/src/vaadin-custom-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/accordion/src/vaadin-accordion.js';
|
||||
import '@vaadin/item/src/vaadin-item.js';
|
||||
import '@vaadin/details/src/vaadin-details.js';
|
||||
import 'Frontend/generated/jar-resources/menubarConnector.js';
|
||||
import '@vaadin/menu-bar/src/vaadin-menu-bar.js';
|
||||
import 'Frontend/generated/jar-resources/messageListConnector.js';
|
||||
import '@vaadin/message-list/src/vaadin-message-list.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/accordion/src/vaadin-accordion-panel.js';
|
||||
import '@vaadin/integer-field/src/vaadin-integer-field.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/list-box/src/vaadin-list-box.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/upload/src/vaadin-upload.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/avatar/src/vaadin-avatar.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/accordion/src/vaadin-accordion.js';
|
||||
import '@vaadin/item/src/vaadin-item.js';
|
||||
import '@vaadin/details/src/vaadin-details.js';
|
||||
import 'Frontend/generated/jar-resources/menubarConnector.js';
|
||||
import '@vaadin/menu-bar/src/vaadin-menu-bar.js';
|
||||
import 'Frontend/generated/jar-resources/messageListConnector.js';
|
||||
import '@vaadin/message-list/src/vaadin-message-list.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/accordion/src/vaadin-accordion-panel.js';
|
||||
import '@vaadin/integer-field/src/vaadin-integer-field.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/combo-box/src/vaadin-combo-box.js';
|
||||
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
|
||||
import '@vaadin/list-box/src/vaadin-list-box.js';
|
||||
import '@vaadin/app-layout/src/vaadin-app-layout.js';
|
||||
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
||||
import '@vaadin/button/src/vaadin-button.js';
|
||||
import 'Frontend/generated/jar-resources/buttonFunctions.js';
|
||||
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-layout.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column-group.js';
|
||||
import '@vaadin/icon/src/vaadin-icon.js';
|
||||
import '@vaadin/grid/src/vaadin-grid.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-column.js';
|
||||
import '@vaadin/grid/src/vaadin-grid-sorter.js';
|
||||
import '@vaadin/checkbox/src/vaadin-checkbox.js';
|
||||
import 'Frontend/generated/jar-resources/gridConnector.ts';
|
||||
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
|
||||
import '@vaadin/avatar/src/vaadin-avatar.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
||||
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
|
||||
import '@vaadin/item/src/vaadin-item.js';
|
||||
import 'Frontend/generated/jar-resources/menubarConnector.js';
|
||||
import '@vaadin/menu-bar/src/vaadin-menu-bar.js';
|
||||
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
|
||||
import '@vaadin/integer-field/src/vaadin-integer-field.js';
|
||||
import '@vaadin/password-field/src/vaadin-password-field.js';
|
||||
import '@vaadin/email-field/src/vaadin-email-field.js';
|
||||
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
|
||||
import '@vaadin/context-menu/src/vaadin-context-menu.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
|
||||
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
|
||||
import '@vaadin/form-layout/src/vaadin-form-item.js';
|
||||
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
|
||||
import '@vaadin/text-field/src/vaadin-text-field.js';
|
||||
import '@vaadin/icons/vaadin-iconset.js';
|
||||
import '@vaadin/scroller/src/vaadin-scroller.js';
|
||||
import 'Frontend/generated/jar-resources/lit-renderer.ts';
|
||||
@@ -0,0 +1 @@
|
||||
export {}
|
||||
@@ -0,0 +1,129 @@
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/login/src/vaadin-login-form.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/common-frontend/ConnectionIndicator.js';
|
||||
import '@vaadin/vaadin-lumo-styles/color-global.js';
|
||||
import '@vaadin/vaadin-lumo-styles/typography-global.js';
|
||||
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
||||
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
||||
import '@vaadin/vaadin-lumo-styles/style.js';
|
||||
import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js';
|
||||
|
||||
const loadOnDemand = (key) => {
|
||||
const pending = [];
|
||||
if (key === 'c328bf4e4c470cb597d58899026ba6b89a944dee8ffd3ea011e90ee9aeeee27c') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '9ce37be5a74bf0ff9346f2822bbac9270df4f953da21cb2d785e770ca5dd01d7') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === 'ccd55787f5a1e343f5dc1254ffc7fab91e1913779dc57cb415ad1300dea4cb1f') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '2cb1880b969b3fedc36eac80054c349df90ddf1cd80ee10b968c29f4eaa88a4e') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'a4c2b914cec6ef827916799d9f759a1f4f76d51ed83273926c90ec09aac6becf') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === 'db309c5c427d2bdf28b482ca33ed5b07959a29e078fbc382227064eb0bc47cd1') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'c52559b64d6adfff5f69234e7fdb496781e7381311f9f4b9ecfed53fffac5d57') {
|
||||
pending.push(import('./chunks/chunk-f6178cce1ebec61e59880c992fc82a6e72ccc813d60340c8f06ca55bd9d2ae6e.js'));
|
||||
}
|
||||
if (key === '5abe8617842b0f1f3f760c1f2646da92447ae772525c9f959dacb56bb6a53951') {
|
||||
pending.push(import('./chunks/chunk-d45507d93ce78f2bd5626318d615a77e981f3b67d14e311609fc7e6eb8b4a8dc.js'));
|
||||
}
|
||||
if (key === '92cc7bc27fb17a2ce7c5e6437206562e88af166d62d4201b3376c89096f2294b') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '8b1c3c53d0fee6dc15701341cd201cba5cf6001f63290b8400c27b705ddc6a69') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '33e92d55f9a1f8728d4b6a2b77866adf628cbcea2f314570ab749e7be65fd4f2') {
|
||||
pending.push(import('./chunks/chunk-7e3f67aa42739bbfd7719d491ec96f62aa601afc6ff4c5c137101462407daef7.js'));
|
||||
}
|
||||
if (key === 'a8644bbdac9f76a186dae33402283360b6298dc5256a9476710657c7a722c138') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '7d5a0beef4287b5aedb42549f517887177d18e56f5e9137696af8122d14267b9') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '4b1578b95f124f37ae3f8f70e0249e97a188ccc65fcdf8d499c46fe2bbb931e1') {
|
||||
pending.push(import('./chunks/chunk-1ae26979025aaa18725130a0056c321945542c581500949cd45dd11c177d56be.js'));
|
||||
}
|
||||
if (key === 'eef3df7f33228e76092b585d0b298b901795b89e5252d41bfd46b2d93ee54d98') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '1319ee36f1c03b61f0cf5b7db53752d14c1fdcd0ef44ad62d26de022421453d8') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '03224c2c38efec439bff4a3b5fd75c59eb7c7cbe602c4ab6204bf960f4cc8dd1') {
|
||||
pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js'));
|
||||
}
|
||||
if (key === 'c63267ed0b6f3ead3df845d30538006d9c6177004a3d72f75547f47972038c09') {
|
||||
pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js'));
|
||||
}
|
||||
if (key === '347c65b94723c2521c989ed39ca687ebbc3efd511a6dce5643806afc01a09b4d') {
|
||||
pending.push(import('./chunks/chunk-97f12a0b98e2cbece210aa25828a82e3ec679214726ee376aeb472c1884ffc4d.js'));
|
||||
}
|
||||
if (key === 'bd7d312f463946ac90c6b90b50d8ed934ef52f2f322b39de591e9a9bbfed23bb') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'e03d080ce3184deeab00169be431581d11f02d0e5aed273312580052625b6039') {
|
||||
pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js'));
|
||||
}
|
||||
if (key === 'a3b382177d66fb5a68982d662aedbee991fcf10b8b27dc3ec6b8d126249c0de0') {
|
||||
pending.push(import('./chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js'));
|
||||
}
|
||||
if (key === '424fae8676c2936d10aecdf4a2211bd4b9c0d7f45bbf4d0278cb45a4910a8335') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'c5a1f9fa497c9d3f8488a921fd4ee1d2cc0c7b92470eb414af17ae6ab1e86c8c') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'cd52f6b638c5b34e04e89d6d9e7336530164212a857009bfec5b896616ba9d41') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === 'c05cb991705ee2e170b759b885ac443cc83a9e007d675caa681d0eafd58757cb') {
|
||||
pending.push(import('./chunks/chunk-95542ade434d930d459b775493c37336f91ccd3ccd19c9e184c620a2a06d8517.js'));
|
||||
}
|
||||
if (key === '19423b899367fccfddaddcb5673dec3972d4a05047b84f07116e15f746718e2c') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '15e20ce4e95ded8f73b6c07558205c320e82ef36ac6fb0c8e70b4988565d7b6f') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '3da4680876a33e024b7dfb7ca24e355497e1bc913252c5c60463366a250b4990') {
|
||||
pending.push(import('./chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js'));
|
||||
}
|
||||
if (key === 'd1c0ee1031445d9f49238644266bbf182b15c2e971f3dbfa70c79d48c73bab8c') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '74cb640efacbc78ad0cb2c23d263126a4d6bed0102725673c72ba9b98f6e325b') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === 'b5d8cf1e1d8b41577fd6cc4842702cb1cdc8331a90a7f660debbaf630b1b64f6') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '252419c2d80b6b0ef2146c966be865d2c7d8af687517db47e29911536d8f8b67') {
|
||||
pending.push(import('./chunks/chunk-b916c73213516c68de0414cc97cd440995063e89edd3a41714d78d97e2177dec.js'));
|
||||
}
|
||||
if (key === 'eba77023f6ebb6a8e07872c859c84f4743e15aa1be9634ede6104f35f0fbbf4e') {
|
||||
pending.push(import('./chunks/chunk-7c196ddcbe551673c2245906a7473d7dac950fcaf241e1e921202d07bffd8ebf.js'));
|
||||
}
|
||||
if (key === '097cf7e1cd92ac0d2bb9167644ccb0ea371bbf9fd088e935c621ccc80e73466e') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
return Promise.all(pending);
|
||||
}
|
||||
|
||||
window.Vaadin = window.Vaadin || {};
|
||||
window.Vaadin.Flow = window.Vaadin.Flow || {};
|
||||
window.Vaadin.Flow.loadOnDemand = loadOnDemand;
|
||||
window.Vaadin.Flow.resetFocus = () => {
|
||||
let ae=document.activeElement;
|
||||
while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement;
|
||||
return !ae || ae.blur() || ae.focus() || true;
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
import { injectGlobalWebcomponentCss } from 'Frontend/generated/jar-resources/theme-util.js';
|
||||
|
||||
import '@vaadin/polymer-legacy-adapter/style-modules.js';
|
||||
import '@vaadin/login/src/vaadin-login-form.js';
|
||||
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
|
||||
import '@vaadin/common-frontend/ConnectionIndicator.js';
|
||||
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
||||
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
||||
import '@vaadin/vaadin-lumo-styles/style.js';
|
||||
import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js';
|
||||
|
||||
const loadOnDemand = (key) => {
|
||||
const pending = [];
|
||||
if (key === 'c328bf4e4c470cb597d58899026ba6b89a944dee8ffd3ea011e90ee9aeeee27c') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '9ce37be5a74bf0ff9346f2822bbac9270df4f953da21cb2d785e770ca5dd01d7') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === 'ccd55787f5a1e343f5dc1254ffc7fab91e1913779dc57cb415ad1300dea4cb1f') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '2cb1880b969b3fedc36eac80054c349df90ddf1cd80ee10b968c29f4eaa88a4e') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'a4c2b914cec6ef827916799d9f759a1f4f76d51ed83273926c90ec09aac6becf') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === 'db309c5c427d2bdf28b482ca33ed5b07959a29e078fbc382227064eb0bc47cd1') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'c52559b64d6adfff5f69234e7fdb496781e7381311f9f4b9ecfed53fffac5d57') {
|
||||
pending.push(import('./chunks/chunk-f6178cce1ebec61e59880c992fc82a6e72ccc813d60340c8f06ca55bd9d2ae6e.js'));
|
||||
}
|
||||
if (key === '5abe8617842b0f1f3f760c1f2646da92447ae772525c9f959dacb56bb6a53951') {
|
||||
pending.push(import('./chunks/chunk-d45507d93ce78f2bd5626318d615a77e981f3b67d14e311609fc7e6eb8b4a8dc.js'));
|
||||
}
|
||||
if (key === '92cc7bc27fb17a2ce7c5e6437206562e88af166d62d4201b3376c89096f2294b') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '8b1c3c53d0fee6dc15701341cd201cba5cf6001f63290b8400c27b705ddc6a69') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '33e92d55f9a1f8728d4b6a2b77866adf628cbcea2f314570ab749e7be65fd4f2') {
|
||||
pending.push(import('./chunks/chunk-7e3f67aa42739bbfd7719d491ec96f62aa601afc6ff4c5c137101462407daef7.js'));
|
||||
}
|
||||
if (key === 'a8644bbdac9f76a186dae33402283360b6298dc5256a9476710657c7a722c138') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '7d5a0beef4287b5aedb42549f517887177d18e56f5e9137696af8122d14267b9') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '4b1578b95f124f37ae3f8f70e0249e97a188ccc65fcdf8d499c46fe2bbb931e1') {
|
||||
pending.push(import('./chunks/chunk-1ae26979025aaa18725130a0056c321945542c581500949cd45dd11c177d56be.js'));
|
||||
}
|
||||
if (key === 'eef3df7f33228e76092b585d0b298b901795b89e5252d41bfd46b2d93ee54d98') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '1319ee36f1c03b61f0cf5b7db53752d14c1fdcd0ef44ad62d26de022421453d8') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '03224c2c38efec439bff4a3b5fd75c59eb7c7cbe602c4ab6204bf960f4cc8dd1') {
|
||||
pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js'));
|
||||
}
|
||||
if (key === 'c63267ed0b6f3ead3df845d30538006d9c6177004a3d72f75547f47972038c09') {
|
||||
pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js'));
|
||||
}
|
||||
if (key === '347c65b94723c2521c989ed39ca687ebbc3efd511a6dce5643806afc01a09b4d') {
|
||||
pending.push(import('./chunks/chunk-97f12a0b98e2cbece210aa25828a82e3ec679214726ee376aeb472c1884ffc4d.js'));
|
||||
}
|
||||
if (key === 'bd7d312f463946ac90c6b90b50d8ed934ef52f2f322b39de591e9a9bbfed23bb') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'e03d080ce3184deeab00169be431581d11f02d0e5aed273312580052625b6039') {
|
||||
pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js'));
|
||||
}
|
||||
if (key === 'a3b382177d66fb5a68982d662aedbee991fcf10b8b27dc3ec6b8d126249c0de0') {
|
||||
pending.push(import('./chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js'));
|
||||
}
|
||||
if (key === '424fae8676c2936d10aecdf4a2211bd4b9c0d7f45bbf4d0278cb45a4910a8335') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'c5a1f9fa497c9d3f8488a921fd4ee1d2cc0c7b92470eb414af17ae6ab1e86c8c') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === 'cd52f6b638c5b34e04e89d6d9e7336530164212a857009bfec5b896616ba9d41') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === 'c05cb991705ee2e170b759b885ac443cc83a9e007d675caa681d0eafd58757cb') {
|
||||
pending.push(import('./chunks/chunk-95542ade434d930d459b775493c37336f91ccd3ccd19c9e184c620a2a06d8517.js'));
|
||||
}
|
||||
if (key === '19423b899367fccfddaddcb5673dec3972d4a05047b84f07116e15f746718e2c') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '15e20ce4e95ded8f73b6c07558205c320e82ef36ac6fb0c8e70b4988565d7b6f') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '3da4680876a33e024b7dfb7ca24e355497e1bc913252c5c60463366a250b4990') {
|
||||
pending.push(import('./chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js'));
|
||||
}
|
||||
if (key === 'd1c0ee1031445d9f49238644266bbf182b15c2e971f3dbfa70c79d48c73bab8c') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
if (key === '74cb640efacbc78ad0cb2c23d263126a4d6bed0102725673c72ba9b98f6e325b') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === 'b5d8cf1e1d8b41577fd6cc4842702cb1cdc8331a90a7f660debbaf630b1b64f6') {
|
||||
pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js'));
|
||||
}
|
||||
if (key === '252419c2d80b6b0ef2146c966be865d2c7d8af687517db47e29911536d8f8b67') {
|
||||
pending.push(import('./chunks/chunk-b916c73213516c68de0414cc97cd440995063e89edd3a41714d78d97e2177dec.js'));
|
||||
}
|
||||
if (key === 'eba77023f6ebb6a8e07872c859c84f4743e15aa1be9634ede6104f35f0fbbf4e') {
|
||||
pending.push(import('./chunks/chunk-7c196ddcbe551673c2245906a7473d7dac950fcaf241e1e921202d07bffd8ebf.js'));
|
||||
}
|
||||
if (key === '097cf7e1cd92ac0d2bb9167644ccb0ea371bbf9fd088e935c621ccc80e73466e') {
|
||||
pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js'));
|
||||
}
|
||||
return Promise.all(pending);
|
||||
}
|
||||
|
||||
window.Vaadin = window.Vaadin || {};
|
||||
window.Vaadin.Flow = window.Vaadin.Flow || {};
|
||||
window.Vaadin.Flow.loadOnDemand = loadOnDemand;
|
||||
window.Vaadin.Flow.resetFocus = () => {
|
||||
let ae=document.activeElement;
|
||||
while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement;
|
||||
return !ae || ae.blur() || ae.focus() || true;
|
||||
}
|
||||
Reference in New Issue
Block a user