1 Commits

Author SHA1 Message Date
Thomas Peetz de2f2f34b2 setup multi-module project
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
2026-08-12 15:13:06 +02:00
569 changed files with 178860 additions and 138132 deletions
+73
View File
@@ -0,0 +1,73 @@
[versions]
gradle = "8.6"
args4j = "2.33"
commonscli = "1.5.0"
junit = "5.8.2"
logback = "1.1.2"
mockito = "1.9.5"
picoli = "4.7.0"
slf4j = "1.7.22"
hsqldb = "2.7.1"
sqlite = "3.25.2"
spotbugs = "6.0.7"
asciidoctor = "4.0.2"
rouge = "3.15.0"
#diagram = "2.2.2"
diagram = "2.3.1"
sonarqube = "3.3"
cimtConventions = "1.0.0-SNAPSHOT"
springboot = "3.2.5"
springdependencies = "1.1.4"
vaadin = "24.3.8"
camel = "4.10.6"
artemis = "2.41.0"
lombok = "8.6"
gson = "2.9.0"
jackson = "2.16.1"
json_simple = "1.1.1"
mail = "1.6.2"
hypersistence = "3.9.10"
[libraries]
args4j = { module = "args4j:args4j", version.ref = "args4j" }
commonscli = { module = "commons-cli:commons-cli", version.ref = "commonscli" }
junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
logbackCore = { module = "ch.qos.logback:logback-core", version.ref = "logback" }
logbackClassic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
mockito = { module = "org.mockito:mockito-all", version.ref = "mockito" }
picocli = { module = "info.picocli:picocli", version.ref = "picoli" }
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
hsqldb = { module = "org.hsqldb:hsqldb", version.ref = "hsqldb" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
jackson = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" }
json = { module = "com.googlecode.json-simple:json-simple", version.ref ="json_simple" }
mail = { module = "com.sun.mail:javax.mail", version.ref ="mail" }
sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version.ref = "sqlite" }
hypersistence = { module = "io.hypersistence:hypersistence-utils-hibernate-63", version.ref = "hypersistence" }
vaadin-bom = { module = "com.vaadin:vaadin-bom", version.ref = "vaadin" }
camel-bom = { module = "org.apache.camel.springboot:camel-spring-boot-bom", version.ref = "camel"}
spring-data = { module = "org.springframework.data:spring-data-jpa", version.ref = "springboot" }
artemis = { module = "org.apache.activemq:artemis-jms-server", version.ref = "artemis" }
asciidoctorGradleJvmGems = { module = "org.asciidoctor:asciidoctor-gradle-jvm-gems", version.ref= "asciidoctor" }
asciidoctorGradleJvm = { module = "org.asciidoctor:asciidoctor-gradle-jvm", version.ref= "asciidoctor" }
asciidoctorGradleJvmPdf = { module = "org.asciidoctor:asciidoctor-gradle-jvm-pdf", version.ref= "asciidoctor" }
rouge = { module = "rubygems:rouge", version.ref = "rouge" }
diagram = { module = "rubygems:asciidoctor-diagram", version.ref = "diagram" }
[bundles]
logback = ["logbackCore", "logbackClassic"]
[plugins]
spotbugs = { id = "com.github.spotbugs", version.ref = "spotbugs" }
sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" }
asciidoctorPdf = { id = "org.asciidoctor.jvm.pdf", version.ref = "asciidoctor" }
asciidoctorConvert = { id = "org.asciidoctor.jvm.convert", version.ref = "asciidoctor" }
asciidoctorGems = { id = "org.asciidoctor.jvm.gems", version.ref = "asciidoctor" }
javaConvention = { id = "de.cimt.java-conventions", version.ref = "cimtConventions" }
applicationConvention = { id = "de.cimt.application-conventions", version.ref = "cimtConventions" }
libraryConvention = { id = "de.cimt.library-conventions", version.ref = "cimtConventions" }
asciidoctorConvention = { id = "de.cimt.asciidoctor-conventions", version.ref = "cimtConventions" }
spring-boot = { id = "org.springframework.boot", version.ref = "springboot"}
spring-dependencies = { id = "io.spring.dependency-management", version.ref = "springdependencies" }
vaadin = { id = "com.vaadin", version.ref = "vaadin" }
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored Executable
+248
View File
@@ -0,0 +1,248 @@
#!/bin/sh
#
# Copyright © 2015 the original authors.
#
# 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
#
# https://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.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
Vendored Executable
+82
View File
@@ -0,0 +1,82 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables, and ensure extensions are enabled
setlocal EnableExtensions
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
"%COMSPEC%" /c exit 1
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
"%COMSPEC%" /c exit 1
:execute
@rem Setup the command line
@rem Execute Gradle
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
@rem which allows us to clear the local environment before executing the java command
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
:exitWithErrorLevel
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
"%COMSPEC%" /c exit %ERRORLEVEL%
+24
View File
@@ -0,0 +1,24 @@
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == 'org.springframework.boot') {
useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
}
if (requested.id.id == 'org.gradle.toolchains.foojay-resolver') {
useModule("org.gradle.toolchains.foojay-resolver-convention:0.4.0")
}
}
}
repositories {
gradlePluginPortal()
mavenCentral()
maven { setUrl("https://maven.vaadin.com/vaadin-prereleases") }
maven { setUrl("https://repo.spring.io/milestone") }
maven { url 'https://plugins.gradle.org/m2/' }
}
// plugins {
// id 'com.vaadin' version "${vaadinVersion}"
// }
}
rootProject.name = 'kontor-spring'
+9 -3
View File
@@ -1,3 +1,9 @@
/gradlew text eol=lf
*.bat text eol=crlf
*.jar binary
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf
# These are Windows script files and should use crlf
*.bat text eol=crlf
+27 -32
View File
@@ -1,38 +1,33 @@
node_modules
HELP.md
.gradle
.gradle/
.settings/
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
# Ignore Gradle GUI config
gradle-app.setting
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
### VS Code ###
.project
.classpath
.vscode/
.idea/
*.lock
logs/
frontend/generated
frontend/index.html
package*.json
tsconfig.json
types.d.ts
node_modules/
vite.*
kontor*Db
tags*
kontorHSQLDB*
.vs/
.winget
src/main/resources/application-local.properties
src/main/resources/application-prod.properties
src/main/resources/application-*.yml
/uploaded-files/
+2 -2
View File
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------- #
FROM docker.io/library/gradle:9.5-jdk AS builder
FROM docker.io/library/gradle:8.7-jdk AS builder
WORKDIR /
COPY ./src/main/ ./src/main/
COPY ./frontend/ ./frontend/
@@ -10,7 +10,7 @@ COPY ./gradle/libs.versions.toml ./gradle/
RUN gradle bootJar --no-daemon
# ----------------------------------------------------------------------- #
FROM docker.io/alpine/java:25-jdk AS run
FROM docker.io/alpine/java:21-jdk AS run
RUN mkdir -p /logs
+8
View File
@@ -0,0 +1,8 @@
.PYHONY: all
all:
./gradlew build
docker:
./gradlew dockerImage
+3
View File
@@ -0,0 +1,3 @@
# kontor-spring
Kontor Anwendung mit Spring Boot und Vaadin
+172
View File
@@ -0,0 +1,172 @@
plugins {
id 'application'
id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.0"
id 'jvm-test-suite'
id 'jacoco'
id 'test-report-aggregation'
id 'jacoco-report-aggregation'
alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.dependencies)
alias(libs.plugins.vaadin)
alias(libs.plugins.lombok)
}
dependencyManagement {
imports {
mavenBom libs.vaadin.bom.get().toString()
mavenBom libs.camel.bom.get().toString()
}
}
dependencies {
project(':persistence')
implementation 'com.vaadin:vaadin-core'
implementation 'com.vaadin:vaadin-spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-artemis'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.apache.camel.springboot:camel-spring-boot-starter'
implementation 'org.apache.camel.springboot:camel-jms-starter'
implementation 'org.apache.activemq:artemis-jakarta-client'
//implementation libs.artemis
implementation 'org.springframework.boot:spring-boot-starter-actuator'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.springframework.security:spring-security-oauth2-jose'
implementation 'org.springframework.security:spring-security-oauth2-resource-server'
implementation 'com.h2database:h2'
implementation libs.hsqldb
implementation 'org.postgresql:postgresql'
//runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
implementation libs.hypersistence
implementation libs.mail
implementation libs.jackson
implementation libs.gson
implementation libs.json
implementation 'org.hibernate.orm:hibernate-community-dialects'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'com.vaadin:vaadin-testbench-junit5'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.apache.camel:camel-test-spring-junit5'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
}
publishing {
publications {
bootJava(MavenPublication) {
artifact tasks.named("bootJar")
}
}
repositories {
maven {
url = version.endsWith('SNAPSHOT') ?
'https://nexus.thpeetz.de/repository/maven-snapshots' :
'https://nexus.thpeetz.de/repository/maven-releases'
credentials {
username = project.findProperty('nexusUser')
password = project.findProperty('nexusPassword')
}
}
}
}
application {
mainClass = 'de.thpeetz.kontor.Application'
}
bootRun {
args = ["--spring.profiles.active=${project.properties['profile'] ?: 'prod'}"]
}
vaadin {
productionMode = true
}
testing {
suites {
configureEach {
useJUnitJupiter()
dependencies {
implementation project()
implementation 'com.vaadin:vaadin-core'
implementation 'com.vaadin:vaadin-spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'com.h2database:h2'
implementation libs.hsqldb
implementation libs.sqlite.jdbc
//runtimeOnly 'com.mysql:mysql-connector-j'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
implementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
implementation 'org.springframework.security:spring-security-test'
implementation 'com.vaadin:vaadin-testbench-junit5'
implementation 'io.projectreactor:reactor-test'
runtimeOnly 'org.junit.platform:junit-platform-launcher'
}
}
test(JvmTestSuite) {
// testType = TestSuiteType.UNIT_TEST
targets {
all {
testTask.configure {
reports {
junitXml {
outputPerTestCase = true // defaults to false
mergeReruns = true // defaults to false
}
}
finalizedBy(jacocoTestReport)
}
}
}
}
integrationTest(JvmTestSuite) {
// testType = "view-test"
targets {
all {
testTask.configure {
shouldRunAfter(test)
finalizedBy(jacocoTestReport)
}
}
}
}
}
}
tasks.named('check') {
dependsOn(testing.suites.integrationTest)
dependsOn(testing.suites.test)
dependsOn tasks.named('testAggregateTestReport', TestReport)
dependsOn tasks.named('integrationTestAggregateTestReport', TestReport)
}
jacocoTestReport {
dependsOn test, integrationTest
reports {
xml.required = true
csv.required = false
}
}
reporting {
reports {
testAggregateTestReport(AggregateTestReport) {
// testType = TestSuiteType.UNIT_TEST
}
integrationTestAggregateTestReport(AggregateTestReport) {
// testType = "view-test"
}
integrationTestCodeCoverageReport(JacocoCoverageReport) {
// testType = "view-test"
}
}
}
@@ -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();
}
});
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2026 Vaadin Ltd.
* 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
@@ -13,21 +13,21 @@
* 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, type ReactNode, useEffect, useReducer } from 'react';
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: '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 { value } = action;
case "stateKeyChanged":
const {key, value} = action;
return {
...state,
key: value
@@ -37,7 +37,9 @@ function stateReducer<S extends Readonly<Record<string, unknown>>>(state: S, act
}
}
type DispatchEvent<T> = T extends undefined ? () => boolean : (value: T) => boolean;
type DispatchEvent<T> = T extends undefined
? () => boolean
: (value: T) => boolean;
const emptyAction: Dispatch<unknown> = () => {};
@@ -61,7 +63,7 @@ export type RenderHooks = {
* 2. The `set` function for changing the state and triggering render
* @protected
*/
readonly useState: ReactAdapterElement['useState'];
readonly useState: ReactAdapterElement["useState"]
/**
* A hook helper to simplify dispatching a `CustomEvent` on the Web
@@ -77,34 +79,9 @@ export type RenderHooks = {
* - For other types, has one parameter for the `event.detail` value of that type.
* @protected
*/
readonly useCustomEvent: ReactAdapterElement['useCustomEvent'];
/**
* A hook helper to generate the content element with name attribute to bind
* the server-side Flow element for this component.
*
* This is used together with {@link ReactAdapterComponent::getContentElement}
* to have server-side component attach to the correct client element.
*
* Usage as follows:
*
* const content = hooks.useContent('content');
* return <>
* {content}
* </>;
*
* Note! Not adding the 'content' element into the dom will have the
* server throw a IllegalStateException for element with tag name not found.
*
* @param name - The name attribute of the element
*/
readonly useContent: ReactAdapterElement['useContent'];
readonly useCustomEvent: ReactAdapterElement["useCustomEvent"]
};
interface ReadyCallbackFunction {
(): void;
}
/**
* A base class for Web Components that render using React. Enables creating
* adapters for integrating React components with Flow. Intended for use with
@@ -113,92 +90,40 @@ interface ReadyCallbackFunction {
export abstract class ReactAdapterElement extends HTMLElement {
#root: Root | undefined = undefined;
#rootRendered: boolean = false;
#rendering: ReactNode | undefined = undefined;
#state: Record<string, unknown> = Object.create(null);
#stateSetters = new Map<string, Dispatch<unknown>>();
#customEvents = new Map<string, DispatchEvent<unknown>>();
#dispatchFlowState: Dispatch<FlowStateReducerAction> = emptyAction;
#readyCallback = new Map<string, ReadyCallbackFunction>();
readonly #renderHooks: RenderHooks;
readonly #Wrapper: () => ReactElement | null;
#unmounting?: Promise<void>;
#unmountComplete = Promise.resolve();
constructor() {
super();
this.#renderHooks = {
useState: this.useState.bind(this),
useCustomEvent: this.useCustomEvent.bind(this),
useContent: this.useContent.bind(this)
useCustomEvent: this.useCustomEvent.bind(this)
};
this.#Wrapper = this.#renderWrapper.bind(this);
this.#markAsUsed();
}
public async connectedCallback() {
this.#rendering = createElement(this.#Wrapper);
const createNewRoot = this.dispatchEvent(
new CustomEvent('flow-portal-add', {
bubbles: true,
cancelable: true,
composed: true,
detail: {
children: this.#rendering,
domNode: this
}
})
);
if (!createNewRoot || this.#root) {
return;
}
await this.#unmounting;
await this.#unmountComplete;
this.#root = createRoot(this);
this.#maybeRenderRoot();
this.#root.render(this.#rendering);
}
/**
* Add a callback for specified element identifier to be called when
* react element is ready.
* <p>
* For internal use only. May be renamed or removed in a future release.
*
* @param id element identifier that callback is for
* @param readyCallback callback method to be informed on element ready state
* @internal
*/
public addReadyCallback(id: string, readyCallback: ReadyCallbackFunction) {
this.#readyCallback.set(id, readyCallback);
}
public async disconnectedCallback() {
if (!this.#root) {
this.dispatchEvent(
new CustomEvent('flow-portal-remove', {
bubbles: true,
cancelable: true,
composed: true,
detail: {
children: this.#rendering,
domNode: this
}
})
);
} else {
this.#unmounting = Promise.resolve();
await this.#unmounting;
this.#root.unmount();
this.#root = undefined;
}
this.#unmountComplete = Promise.resolve();
await this.#unmountComplete;
this.#root?.unmount();
this.#root = undefined;
this.#rootRendered = false;
this.#rendering = undefined;
}
/**
@@ -230,15 +155,15 @@ export abstract class ReactAdapterElement extends HTMLElement {
},
set(nextValue: T) {
this.#state[key] = nextValue;
this.#dispatchFlowState({ type: 'stateKeyChanged', key, value });
this.#dispatchFlowState({type: 'stateKeyChanged', key, value});
}
});
const dispatchChangedEvent = this.useCustomEvent<{ value: T }>(`${key}-changed`, { detail: { 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 });
dispatchChangedEvent({value});
this.#dispatchFlowState({type: 'stateKeyChanged', key, value});
};
this.#stateSetters.set(key, setValue as Dispatch<unknown>);
return [value, setValue];
@@ -261,13 +186,10 @@ export abstract class ReactAdapterElement extends HTMLElement {
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 eventInitDict = detail === undefined ? options : {
...options,
detail
};
const event = new CustomEvent(type, eventInitDict);
return this.dispatchEvent(event);
}) as DispatchEvent<T>;
@@ -285,19 +207,6 @@ export abstract class ReactAdapterElement extends HTMLElement {
*/
protected abstract render(hooks: RenderHooks): ReactElement | null;
/**
* Prepare content container for Flow to bind server Element to.
*
* @param name container name attribute matching server name attribute
* @protected
*/
protected useContent(name: string): ReactElement | null {
useEffect(() => {
this.#readyCallback.get(name)?.();
}, []);
return createElement('flow-content-container', { name, style: { display: 'contents' } });
}
#maybeRenderRoot() {
if (this.#rootRendered || !this.#root) {
return;
@@ -314,7 +223,7 @@ export abstract class ReactAdapterElement extends HTMLElement {
return this.render(this.#renderHooks);
}
#markAsUsed(): void {
#markAsUsed() : void {
// @ts-ignore
let vaadinObject = window.Vaadin || {};
// @ts-ignore
@@ -322,7 +231,7 @@ export abstract class ReactAdapterElement extends HTMLElement {
vaadinObject.registrations = vaadinObject.registrations || [];
vaadinObject.registrations.push({
is: 'ReactAdapterElement',
version: '25.2.6'
version: '24.4.17'
});
}
}
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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,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;
}
@@ -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;
}
@@ -12,7 +12,7 @@
import { createElement } from 'react';
import { createRoot } from 'react-dom/client';
import { RouterProvider } from 'react-router';
import { RouterProvider } from 'react-router-dom';
import { router } from 'Frontend/generated/routes.js';
function App() {
@@ -1,8 +1,3 @@
import './Clipboard';
import './Download';
import './ElementResize';
import './Geolocation';
import './WakeLock';
export interface FlowConfig {
imports?: () => Promise<any>;
}
@@ -30,7 +25,7 @@ interface FlowRoute {
}
export interface NavigationParameters {
pathname: string;
search?: string;
search: string;
}
export interface PreventCommands {
prevent: () => any;
@@ -71,11 +66,9 @@ export declare class Flow {
private getFlowRouteQuery;
private flowInit;
private loadScript;
private findNonce;
private injectAppIdScript;
private flowInitClient;
private flowInitUi;
private collectBrowserDetails;
private addConnectionIndicator;
private offlineStubAction;
private isFlowClientLoaded;
@@ -1,13 +1,4 @@
import { ConnectionIndicator, ConnectionState } from '@vaadin/common-frontend';
import './Clipboard';
import { currentFullscreenState } from './Fullscreen';
import './Download';
import './ElementResize';
import './Geolocation';
import { currentVisibility } from './PageVisibility';
import { currentScreenOrientationAngle, currentScreenOrientationType } from './ScreenOrientation';
import './WakeLock';
import { isShareSupported } from './WebShare';
class FlowUiInitializationError extends Error {
}
// flow uses body for keeping references
@@ -22,29 +13,17 @@ function getClients() {
function sendEvent(eventName, data) {
getClients().forEach((client) => client.sendEventMessage(ROOT_NODE_ID, eventName, data));
}
// In the future could be replaced with RegExp.escape()
function escapeRegExp(pattern) {
return pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
/**
* Client API for flow UI operations.
*/
export class Flow {
config;
response = undefined;
pathname = '';
container;
// flag used to inform Testbench whether a server route is in progress
isActive = false;
baseRegex = /^\//;
appShellTitle;
navigation = '';
constructor(config) {
// Set window.name early so @PreserveOnRefresh can use it to identify the browser tab
// Only set if not already set to preserve any existing value
if (!window.name) {
window.name = `v-${Math.random()}`;
}
this.response = undefined;
this.pathname = '';
// flag used to inform Testbench whether a server route is in progress
this.isActive = false;
this.baseRegex = /^\//;
this.navigation = '';
flowRoot.$ = flowRoot.$ || [];
this.config = config || {};
// TB checks for the existence of window.Vaadin.Flow in order
@@ -56,13 +35,11 @@ export class Flow {
isActive: () => this.isActive
}
};
// Set browser details collection function as global for use by refresh()
$wnd.Vaadin.Flow.getBrowserDetailsParameters = this.collectBrowserDetails.bind(this);
// Regular expression used to remove the app-context
const elm = document.head.querySelector('base');
this.baseRegex = new RegExp(`^${
// IE11 does not support document.baseURI
escapeRegExp((document.baseURI || (elm && elm.href) || '/').replace(/^https?:\/\/[^/]+/i, ''))}`);
(document.baseURI || (elm && elm.href) || '/').replace(/^https?:\/\/[^/]+/i, '')}`);
this.appShellTitle = document.title;
// Put a vaadin-connection-indicator in the dom
this.addConnectionIndicator();
@@ -103,8 +80,12 @@ export class Flow {
// Use capture phase to detect prevented / stopped events.
document.addEventListener('click', (_e) => {
if (_e.target) {
if (_e.composedPath().some((node) => node instanceof HTMLElement && node.hasAttribute('router-link'))) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (_e.target.hasAttribute('router-link')) {
this.navigation = 'link';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
}
else if (_e.composedPath().some((node) => node.nodeName === 'A')) {
this.navigation = 'client';
@@ -159,14 +140,15 @@ export class Flow {
this.loadingStarted();
// The callback to run from server side to cancel navigation
this.container.serverConnected = (cancel) => {
resolve(cmd && cancel ? cmd.prevent() : cmd?.continue?.());
var _a;
resolve(cmd && cancel ? cmd.prevent() : (_a = cmd === null || cmd === void 0 ? void 0 : cmd.continue) === null || _a === void 0 ? void 0 : _a.call(cmd));
this.loadingFinished();
};
// Call server side to check whether we can leave the view
sendEvent('ui-leave-navigation', { route: this.getFlowRoutePath(ctx), query: this.getFlowRouteQuery(ctx) });
});
}
// Send the remote call to `UI` to render the flow
// Send the remote call to `JavaScriptBootstrapUI` to render the flow
// route specified by the context
async flowNavigate(ctx, cmd) {
if (this.response) {
@@ -174,6 +156,7 @@ export class Flow {
this.loadingStarted();
// The callback to run from server side once the view is ready
this.container.serverConnected = (cancel, redirectContext) => {
var _a;
if (cmd && cancel) {
resolve(cmd.prevent());
}
@@ -181,7 +164,7 @@ export class Flow {
resolve(cmd.redirect(redirectContext.pathname));
}
else {
cmd?.continue?.();
(_a = cmd === null || cmd === void 0 ? void 0 : cmd.continue) === null || _a === void 0 ? void 0 : _a.call(cmd);
this.container.style.display = '';
resolve(this.container);
}
@@ -209,10 +192,7 @@ export class Flow {
}
}
getFlowRoutePath(context) {
// Don't decode the pathname here - let the server handle decoding
// individual path segments. This preserves the distinction between
// literal slashes (path separators) and encoded slashes (%2F, data).
return context.pathname.replace(this.baseRegex, '');
return decodeURIComponent(context.pathname).replace(this.baseRegex, '');
}
getFlowRouteQuery(context) {
return (context.search && context.search.substring(1)) || '';
@@ -221,7 +201,6 @@ export class Flow {
async flowInit() {
// Do not start flow twice
if (!this.isFlowClientLoaded()) {
$wnd.Vaadin.Flow.nonce = this.findNonce();
// show flow progress indicator
this.loadingStarted();
// Initialize server side UI
@@ -273,33 +252,14 @@ export class Flow {
script.onload = () => resolve();
script.onerror = reject;
script.src = url;
const { nonce } = $wnd.Vaadin.Flow;
if (nonce !== undefined) {
script.setAttribute('nonce', nonce);
}
document.body.appendChild(script);
});
}
findNonce() {
let nonce;
const scriptTags = document.head.getElementsByTagName('script');
for (const scriptTag of scriptTags) {
if (scriptTag.nonce) {
nonce = scriptTag.nonce;
break;
}
}
return nonce;
}
injectAppIdScript(appId) {
const appIdWithoutHashCode = appId.substring(0, appId.lastIndexOf('-'));
const scriptAppId = document.createElement('script');
scriptAppId.type = 'module';
scriptAppId.setAttribute('data-app-id', appIdWithoutHashCode);
const { nonce } = $wnd.Vaadin.Flow;
if (nonce !== undefined) {
scriptAppId.setAttribute('nonce', nonce);
}
document.body.append(scriptAppId);
}
// After the flow-client javascript module has been loaded, this initializes flow UI
@@ -326,23 +286,11 @@ export class Flow {
$wnd.Vaadin.TypeScript.initial = undefined;
return Promise.resolve(initial);
}
const browserDetails = await this.collectBrowserDetails();
// send a request to the `JavaScriptBootstrapHandler`
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
const httpRequest = xhr;
// Browser details are appended as individual query parameters rather
// than as a single JSON-encoded value. A JSON payload in the URL
// produces many percent-encoded escape sequences (%7B, %22, %3A, ...)
// that some firewalls/WAFs (e.g. Sophos) flag and block, which would
// fail the bootstrap on the very first page load. Plain key=value pairs
// avoid that pattern entirely.
const browserDetailsParams = browserDetails
? Object.entries(browserDetails)
.map(([key, value]) => `&${key}=${encodeURIComponent(value)}`)
.join('')
: '';
const requestPath = `?v-r=init&location=${encodeURIComponent(this.getFlowRoutePath(location))}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}${browserDetailsParams}`;
const requestPath = `?v-r=init&location=${encodeURIComponent(this.getFlowRoutePath(location))}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`;
httpRequest.open('GET', requestPath);
httpRequest.onerror = () => reject(new FlowUiInitializationError(`Invalid server response when initializing Flow UI.
${httpRequest.status}
@@ -359,118 +307,6 @@ export class Flow {
httpRequest.send();
});
}
// Collects browser details parameters
async collectBrowserDetails() {
const params = {};
/* Screen height and width */
params['v-sh'] = $wnd.screen.height;
params['v-sw'] = $wnd.screen.width;
/* Browser window dimensions */
params['v-wh'] = $wnd.innerHeight;
params['v-ww'] = $wnd.innerWidth;
/* Body element dimensions */
params['v-bh'] = $wnd.document.body.clientHeight;
params['v-bw'] = $wnd.document.body.clientWidth;
/* Current time */
const date = new Date();
params['v-curdate'] = date.getTime();
/* Current timezone offset (including DST shift) */
const tzo1 = date.getTimezoneOffset();
/* Compare the current tz offset with the first offset from the end
of the year that differs --- if less that, we are in DST, otherwise
we are in normal time */
let dstDiff = 0;
let rawTzo = tzo1;
for (let m = 12; m > 0; m -= 1) {
date.setUTCMonth(m);
const tzo2 = date.getTimezoneOffset();
if (tzo1 !== tzo2) {
dstDiff = tzo1 > tzo2 ? tzo1 - tzo2 : tzo2 - tzo1;
rawTzo = tzo1 > tzo2 ? tzo1 : tzo2;
break;
}
}
/* Time zone offset */
params['v-tzo'] = tzo1;
/* DST difference */
params['v-dstd'] = dstDiff;
/* Time zone offset without DST */
params['v-rtzo'] = rawTzo;
/* DST in effect? */
params['v-dston'] = tzo1 !== rawTzo;
/* Time zone id (if available) */
try {
params['v-tzid'] = Intl.DateTimeFormat().resolvedOptions().timeZone;
}
catch (err) {
params['v-tzid'] = '';
}
/* Window name */
if ($wnd.name) {
params['v-wn'] = $wnd.name;
}
/* Detect touch device support */
let supportsTouch = false;
try {
$wnd.document.createEvent('TouchEvent');
supportsTouch = true;
}
catch (e) {
/* Chrome and IE10 touch detection */
supportsTouch = 'ontouchstart' in $wnd || typeof $wnd.navigator.msMaxTouchPoints !== 'undefined';
}
params['v-td'] = supportsTouch;
/* Device Pixel Ratio */
params['v-pr'] = $wnd.devicePixelRatio;
if ($wnd.navigator.platform) {
params['v-np'] = $wnd.navigator.platform;
}
/* Color scheme from CSS color-scheme property */
const colorScheme = getComputedStyle(document.documentElement).colorScheme.trim();
// "normal" is the default value and means no color scheme is set
params['v-cs'] = colorScheme && colorScheme !== 'normal' ? colorScheme : '';
/* Page visibility — initial state of document.hidden / document.hasFocus() */
params['v-pv'] = currentVisibility();
/* Fullscreen state — initial state of document.fullscreenEnabled / .fullscreenElement */
params['v-fs'] = currentFullscreenState();
/* Screen orientation initial state of screen.orientation, empty
when the Screen Orientation API is unavailable. */
params['v-so'] = currentScreenOrientationType();
params['v-soa'] = currentScreenOrientationAngle();
/* Theme name - detect which theme is in use */
const computedStyle = getComputedStyle(document.documentElement);
let themeName = '';
if (computedStyle.getPropertyValue('--vaadin-lumo-theme').trim()) {
themeName = 'lumo';
}
else if (computedStyle.getPropertyValue('--vaadin-aura-theme').trim()) {
themeName = 'aura';
}
params['v-tn'] = themeName;
/* Geolocation availability guarded because tests may reset
window.Vaadin between runs, removing the namespace that
Geolocation.ts installs at import time. */
const geolocation = $wnd.Vaadin.Flow?.geolocation;
if (geolocation) {
params['v-ga'] = await geolocation.queryAvailability();
}
/* Wake-lock availability — same guard rationale as geolocation. */
const wakeLock = $wnd.Vaadin.Flow?.wakeLock;
if (wakeLock) {
params['v-wla'] = wakeLock.queryAvailability();
}
/* Web Share API support */
params['v-ws'] = isShareSupported();
/* Stringify each value (they are parsed on the server side) */
const stringParams = {};
Object.keys(params).forEach((key) => {
const value = params[key];
if (typeof value !== 'undefined') {
stringParams[key] = value.toString();
}
});
return stringParams;
}
// Create shared connection state store and connection indicator
addConnectionIndicator() {
// add connection indicator to DOM
File diff suppressed because one or more lines are too long
@@ -54,32 +54,7 @@ const init = function (appInitResponse) {
window.Vaadin = window.Vaadin || {};
window.Vaadin.Flow = window.Vaadin.Flow || {};
/**
* Triggers a CSS animation on an element by adding a class, then
* removes the class when the animation ends.
*/
window.Vaadin.Flow.flashClass = function (element, className) {
element.classList.remove(className);
void element.offsetWidth;
element.classList.add(className);
function onAnimationEnd(e) {
if (e.target === element) {
element.classList.remove(className);
element.removeEventListener('animationend', onAnimationEnd);
}
}
element.addEventListener('animationend', onAnimationEnd);
requestAnimationFrame(function () {
var style = getComputedStyle(element);
var animName = style.animationName;
if (!animName || animName === 'none') {
element.classList.remove(className);
element.removeEventListener('animationend', onAnimationEnd);
}
});
};
/**
/*
* Needed for wrapping custom javascript functionality in the components (i.e. connectors)
*/
window.Vaadin.Flow.tryCatchWrapper = function (originalFunction, component) {
@@ -101,10 +76,6 @@ Please submit an issue to https://github.com/vaadin/flow-components/issues/new/c
if (!window.Vaadin.Flow.initApplication) {
window.Vaadin.Flow.clients = window.Vaadin.Flow.clients || {};
/**
* Initializes a Flow application with the given ID and configuration,
* and triggers the widgetset callback to start the client engine.
*/
window.Vaadin.Flow.initApplication = function (appId, config) {
var testbenchId = appId.replace(/-\d+$/, '');
@@ -173,6 +144,10 @@ Please submit an issue to https://github.com/vaadin/flow-components/issues/new/c
};
apps[appId] = app;
if (!window.name) {
window.name = appId + '-' + Math.random();
}
var widgetset = 'client';
widgetsets[widgetset] = {
pendingApps: []
@@ -187,7 +162,6 @@ Please submit an issue to https://github.com/vaadin/flow-components/issues/new/c
return app;
};
/** Returns an array of all registered application IDs */
window.Vaadin.Flow.getAppIds = function () {
var ids = [];
for (var id in apps) {
@@ -197,14 +171,9 @@ Please submit an issue to https://github.com/vaadin/flow-components/issues/new/c
}
return ids;
};
/** Returns the application object for the given ID */
window.Vaadin.Flow.getApp = function (appId) {
return apps[appId];
};
/**
* Registers a widgetset callback and starts any applications
* that are waiting for it.
*/
window.Vaadin.Flow.registerWidgetset = function (widgetset, callback) {
log('Widgetset registered', widgetset);
var ws = widgetsets[widgetset];
@@ -218,6 +187,92 @@ Please submit an issue to https://github.com/vaadin/flow-components/issues/new/c
ws.pendingApps = null;
}
};
window.Vaadin.Flow.getBrowserDetailsParameters = function () {
var params = {};
/* Screen height and width */
params['v-sh'] = window.screen.height;
params['v-sw'] = window.screen.width;
/* Browser window dimensions */
params['v-wh'] = window.innerHeight;
params['v-ww'] = window.innerWidth;
/* Body element dimensions */
params['v-bh'] = document.body.clientHeight;
params['v-bw'] = document.body.clientWidth;
/* Current time */
var date = new Date();
params['v-curdate'] = date.getTime();
/* Current timezone offset (including DST shift) */
var tzo1 = date.getTimezoneOffset();
/* Compare the current tz offset with the first offset from the end
of the year that differs --- if less that, we are in DST, otherwise
we are in normal time */
var dstDiff = 0;
var rawTzo = tzo1;
for (var m = 12; m > 0; m--) {
date.setUTCMonth(m);
var tzo2 = date.getTimezoneOffset();
if (tzo1 != tzo2) {
dstDiff = tzo1 > tzo2 ? tzo1 - tzo2 : tzo2 - tzo1;
rawTzo = tzo1 > tzo2 ? tzo1 : tzo2;
break;
}
}
/* Time zone offset */
params['v-tzo'] = tzo1;
/* DST difference */
params['v-dstd'] = dstDiff;
/* Time zone offset without DST */
params['v-rtzo'] = rawTzo;
/* DST in effect? */
params['v-dston'] = tzo1 != rawTzo;
/* Time zone id (if available) */
try {
params['v-tzid'] = Intl.DateTimeFormat().resolvedOptions().timeZone;
} catch (err) {
params['v-tzid'] = '';
}
/* Window name */
if (window.name) {
params['v-wn'] = window.name;
}
/* Detect touch device support */
var supportsTouch = false;
try {
document.createEvent('TouchEvent');
supportsTouch = true;
} catch (e) {
/* Chrome and IE10 touch detection */
supportsTouch = 'ontouchstart' in window || typeof navigator.msMaxTouchPoints !== 'undefined';
}
params['v-td'] = supportsTouch;
/* Device Pixel Ratio */
params['v-pr'] = window.devicePixelRatio;
if (navigator.platform) {
params['v-np'] = navigator.platform;
}
/* Stringify each value (they are parsed on the server side) */
Object.keys(params).forEach(function (key) {
var value = params[key];
if (typeof value !== 'undefined') {
params[key] = value.toString();
}
});
return params;
};
}
log('Flow bootstrap loaded');
File diff suppressed because one or more lines are too long
@@ -0,0 +1,14 @@
function disableOnClickListener({currentTarget: button}) {
if (button.hasAttribute('disableOnClick')) {
button.disabled = true;
}
}
window.Vaadin.Flow.button = {
initDisableOnClick: (button) => {
if (!button.__hasDisableOnClickListener) {
button.addEventListener('click', disableOnClickListener);
button.__hasDisableOnClickListener = true;
}
}
}
@@ -0,0 +1,273 @@
import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js';
import { timeOut } from '@polymer/polymer/lib/utils/async.js';
import { ComboBoxPlaceholder } from '@vaadin/combo-box/src/vaadin-combo-box-placeholder.js';
window.Vaadin.Flow.comboBoxConnector = {}
window.Vaadin.Flow.comboBoxConnector.initLazy = (comboBox) => {
// Check whether the connector was already initialized for the ComboBox
if (comboBox.$connector) {
return;
}
comboBox.$connector = {};
// holds pageIndex -> callback pairs of subsequent indexes (current active range)
const pageCallbacks = {};
let cache = {};
let lastFilter = '';
const placeHolder = new window.Vaadin.ComboBoxPlaceholder();
const serverFacade = (() => {
// Private variables
let lastFilterSentToServer = '';
let dataCommunicatorResetNeeded = false;
// Public methods
const needsDataCommunicatorReset = () => (dataCommunicatorResetNeeded = true);
const getLastFilterSentToServer = () => lastFilterSentToServer;
const requestData = (startIndex, endIndex, params) => {
const count = endIndex - startIndex;
const filter = params.filter;
comboBox.$server.setRequestedRange(startIndex, count, filter);
lastFilterSentToServer = filter;
if (dataCommunicatorResetNeeded) {
comboBox.$server.resetDataCommunicator();
dataCommunicatorResetNeeded = false;
}
};
return {
needsDataCommunicatorReset,
getLastFilterSentToServer,
requestData
};
})();
const clearPageCallbacks = (pages = Object.keys(pageCallbacks)) => {
// Flush and empty the existing requests
pages.forEach((page) => {
pageCallbacks[page]([], comboBox.size);
delete pageCallbacks[page];
// Empty the comboBox's internal cache without invoking observers by filling
// the filteredItems array with placeholders (comboBox will request for data when it
// encounters a placeholder)
const pageStart = parseInt(page) * comboBox.pageSize;
const pageEnd = pageStart + comboBox.pageSize;
const end = Math.min(pageEnd, comboBox.filteredItems.length);
for (let i = pageStart; i < end; i++) {
comboBox.filteredItems[i] = placeHolder;
}
});
};
comboBox.dataProvider = function (params, callback) {
if (params.pageSize != comboBox.pageSize) {
throw 'Invalid pageSize';
}
if (comboBox._clientSideFilter) {
// For clientside filter we first make sure we have all data which we also
// filter based on comboBox.filter. While later we only filter clientside data.
if (cache[0]) {
performClientSideFilter(cache[0], params.filter, callback);
return;
} else {
// If client side filter is enabled then we need to first ask all data
// and filter it on client side, otherwise next time when user will
// input another filter, eg. continue to type, the local cache will be only
// what was received for the first filter, which may not be the whole
// data from server (keep in mind that client side filter is enabled only
// when the items count does not exceed one page).
params.filter = '';
}
}
const filterChanged = params.filter !== lastFilter;
if (filterChanged) {
cache = {};
lastFilter = params.filter;
this._filterDebouncer = Debouncer.debounce(this._filterDebouncer, timeOut.after(500), () => {
if (serverFacade.getLastFilterSentToServer() === params.filter) {
// Fixes the case when the filter changes
// to something else and back to the original value
// within debounce timeout, and the
// DataCommunicator thinks it doesn't need to send data
serverFacade.needsDataCommunicatorReset();
}
if (params.filter !== lastFilter) {
throw new Error("Expected params.filter to be '" + lastFilter + "' but was '" + params.filter + "'");
}
// Remove the debouncer before clearing page callbacks.
// This makes sure that they are executed.
this._filterDebouncer = undefined;
// Call the method again after debounce.
clearPageCallbacks();
comboBox.dataProvider(params, callback);
});
return;
}
// Postpone the execution of new callbacks if there is an active debouncer.
// They will be executed when the page callbacks are cleared within the debouncer.
if (this._filterDebouncer) {
pageCallbacks[params.page] = callback;
return;
}
if (cache[params.page]) {
// This may happen after skipping pages by scrolling fast
commitPage(params.page, callback);
} else {
pageCallbacks[params.page] = callback;
const maxRangeCount = Math.max(params.pageSize * 2, 500); // Max item count in active range
const activePages = Object.keys(pageCallbacks).map((page) => parseInt(page));
const rangeMin = Math.min(...activePages);
const rangeMax = Math.max(...activePages);
if (activePages.length * params.pageSize > maxRangeCount) {
if (params.page === rangeMin) {
clearPageCallbacks([String(rangeMax)]);
} else {
clearPageCallbacks([String(rangeMin)]);
}
comboBox.dataProvider(params, callback);
} else if (rangeMax - rangeMin + 1 !== activePages.length) {
// Wasn't a sequential page index, clear the cache so combo-box will request for new pages
clearPageCallbacks();
} else {
// The requested page was sequential, extend the requested range
const startIndex = params.pageSize * rangeMin;
const endIndex = params.pageSize * (rangeMax + 1);
serverFacade.requestData(startIndex, endIndex, params);
}
}
};
comboBox.$connector.clear = (start, length) => {
const firstPageToClear = Math.floor(start / comboBox.pageSize);
const numberOfPagesToClear = Math.ceil(length / comboBox.pageSize);
for (let i = firstPageToClear; i < firstPageToClear + numberOfPagesToClear; i++) {
delete cache[i];
}
};
comboBox.$connector.filter = (item, filter) => {
filter = filter ? filter.toString().toLowerCase() : '';
return comboBox._getItemLabel(item, comboBox.itemLabelPath).toString().toLowerCase().indexOf(filter) > -1;
};
comboBox.$connector.set = (index, items, filter) => {
if (filter != serverFacade.getLastFilterSentToServer()) {
return;
}
if (index % comboBox.pageSize != 0) {
throw 'Got new data to index ' + index + ' which is not aligned with the page size of ' + comboBox.pageSize;
}
if (index === 0 && items.length === 0 && pageCallbacks[0]) {
// Makes sure that the dataProvider callback is called even when server
// returns empty data set (no items match the filter).
cache[0] = [];
return;
}
const firstPageToSet = index / comboBox.pageSize;
const updatedPageCount = Math.ceil(items.length / comboBox.pageSize);
for (let i = 0; i < updatedPageCount; i++) {
let page = firstPageToSet + i;
let slice = items.slice(i * comboBox.pageSize, (i + 1) * comboBox.pageSize);
cache[page] = slice;
}
};
comboBox.$connector.updateData = (items) => {
const itemsMap = new Map(items.map((item) => [item.key, item]));
comboBox.filteredItems = comboBox.filteredItems.map((item) => {
return itemsMap.get(item.key) || item;
});
};
comboBox.$connector.updateSize = function (newSize) {
if (!comboBox._clientSideFilter) {
// FIXME: It may be that this size set is unnecessary, since when
// providing data to combobox via callback we may use data's size.
// However, if this size reflect the whole data size, including
// data not fetched yet into client side, and combobox expect it
// to be set as such, the at least, we don't need it in case the
// filter is clientSide only, since it'll increase the height of
// the popup at only at first user filter to this size, while the
// filtered items count are less.
comboBox.size = newSize;
}
};
comboBox.$connector.reset = function () {
clearPageCallbacks();
cache = {};
comboBox.clearCache();
};
comboBox.$connector.confirm = function (id, filter) {
if (filter != serverFacade.getLastFilterSentToServer()) {
return;
}
// We're done applying changes from this batch, resolve pending
// callbacks
let activePages = Object.getOwnPropertyNames(pageCallbacks);
for (let i = 0; i < activePages.length; i++) {
let page = activePages[i];
if (cache[page]) {
commitPage(page, pageCallbacks[page]);
}
}
// Let server know we're done
comboBox.$server.confirmUpdate(id);
};
const commitPage = function (page, callback) {
let data = cache[page];
if (comboBox._clientSideFilter) {
performClientSideFilter(data, comboBox.filter, callback);
} else {
// Remove the data if server-side filtering, but keep it for client-side
// filtering
delete cache[page];
// FIXME: It may be that we ought to provide data.length instead of
// comboBox.size and remove updateSize function.
callback(data, comboBox.size);
}
};
// Perform filter on client side (here) using the items from specified page
// and submitting the filtered items to specified callback.
// The filter used is the one from combobox, not the lastFilter stored since
// that may not reflect user's input.
const performClientSideFilter = function (page, filter, callback) {
let filteredItems = page;
if (filter) {
filteredItems = page.filter((item) => comboBox.$connector.filter(item, filter));
}
callback(filteredItems, filteredItems.length);
};
// Prevent setting the custom value as the 'value'-prop automatically
comboBox.addEventListener('custom-value-set', (e) => e.preventDefault());
}
window.Vaadin.ComboBoxPlaceholder = ComboBoxPlaceholder;
@@ -54,9 +54,7 @@ function generateItemsTree(appId, nodeId) {
checked: child._checked,
keepOpen: child._keepOpen,
className: child.className,
theme: child.__theme,
tooltip: child.tooltip,
tooltipPosition: child.tooltipPosition
theme: child.__theme
};
// Do not hardcode tag name to allow `vaadin-menu-bar-item`
if (child._hasVaadinItemMixin && child._containerNodeId) {
@@ -13,11 +13,6 @@ function init(target) {
}
e.preventDefault();
e.stopPropagation();
// The menu is opened later, after a server round-trip, when the event has
// finished dispatching and `composedPath()` returns an empty array. Capture
// the composed path now so the menu can resolve the target inside a shadow
// root (e.g. a grid cell) instead of the retargeted host.
e.__composedPath = e.composedPath();
this.$contextMenuTargetConnector.openEvent = e;
let detail = {};
if (target.getContextMenuBeforeOpenDetail) {
@@ -60,7 +55,7 @@ function init(target) {
removeConnector() {
this.removeListener();
target.$contextMenuTargetConnector = undefined;
}
},
};
}
@@ -0,0 +1,24 @@
import { M as t, b as n } from "./copilot-ppBO0zjz.js";
class o extends t {
constructor() {
super(...arguments), this.eventBusRemovers = [], this.messageHandlers = {};
}
createRenderRoot() {
return this;
}
onEventBus(e, s) {
this.eventBusRemovers.push(n.on(e, s));
}
disconnectedCallback() {
super.disconnectedCallback(), this.eventBusRemovers.forEach((e) => e());
}
onCommand(e, s) {
this.messageHandlers[e] = s;
}
handleMessage(e) {
return this.messageHandlers[e.command] ? (this.messageHandlers[e.command].call(this, e), !0) : !1;
}
}
export {
o as B
};
@@ -0,0 +1,71 @@
import { x as p, H as c, t as g } from "./copilot-ppBO0zjz.js";
import { r as f } from "./state-B-CMA1Q2.js";
import { B as u } from "./base-panel-vYmwbGFU.js";
import { showNotification as h } from "./copilot-notification-BorVW3EP.js";
import { i as m } from "./icons-BzskfjAz.js";
const v = "copilot-features-panel{padding:var(--space-100);font:var(--font-xsmall);display:grid;grid-template-columns:auto 1fr;gap:var(--space-50);height:auto}copilot-features-panel a{display:flex;align-items:center;gap:var(--space-50);white-space:nowrap}copilot-features-panel a svg{height:12px;width:12px;min-height:12px;min-width:12px}";
var b = Object.defineProperty, F = Object.getOwnPropertyDescriptor, d = (e, t, a, r) => {
for (var o = r > 1 ? void 0 : r ? F(t, a) : t, s = e.length - 1, l; s >= 0; s--)
(l = e[s]) && (o = (r ? l(t, a, o) : l(o)) || o);
return r && o && b(t, a, o), o;
};
const n = window.Vaadin.devTools;
let i = class extends u {
constructor() {
super(...arguments), this.features = [], this.handleFeatureFlags = (e) => {
this.features = e.data.features;
};
}
connectedCallback() {
super.connectedCallback(), this.onCommand("featureFlags", this.handleFeatureFlags);
}
render() {
return p` <style>
${v}
</style>
${this.features.map(
(e) => p`
<copilot-toggle-button
.title="${e.title}"
?checked=${e.enabled}
@on-change=${(t) => this.toggleFeatureFlag(t, e)}>
</copilot-toggle-button>
<a class="ahreflike" href="${e.moreInfoLink}" title="Learn more" target="_blank"
>learn more ${m.linkExternal}</a
>
`
)}`;
}
toggleFeatureFlag(e, t) {
const a = e.target.checked;
n.frontendConnection ? (n.frontendConnection.send("setFeature", { featureId: t.id, enabled: a }), h({
type: c.INFORMATION,
message: `${t.title}${a ? "enabled" : "disabled"}`,
details: t.requiresServerRestart ? "This feature requires a server restart" : void 0,
dismissId: `feature${t.id}${a ? "Enabled" : "Disabled"}`
})) : n.log("error", `Unable to toggle feature ${t.title}: No server connection available`);
}
};
d([
f()
], i.prototype, "features", 2);
i = d([
g("copilot-features-panel")
], i);
const w = {
header: "Features",
expanded: !0,
panelOrder: 20,
panel: "right",
floating: !1,
tag: "copilot-features-panel",
helpUrl: "https://vaadin.com/docs/latest/flow/configuration/feature-flags"
}, $ = {
init(e) {
e.addPanel(w);
}
};
window.Vaadin.copilot.plugins.push($);
export {
i as CopilotFeaturesPanel
};
@@ -0,0 +1,172 @@
import { x as d, b as c, l as h, s as f, P as v, t as b } from "./copilot-ppBO0zjz.js";
import { r as p } from "./state-B-CMA1Q2.js";
import { m, e as g } from "./overlay-monkeypatch-Bx2SPt1s.js";
import { B as y } from "./base-panel-vYmwbGFU.js";
import { i as k } from "./icons-BzskfjAz.js";
const x = "copilot-feedback-panel{display:flex;flex-direction:column;font:var(--font-xsmall);--vaadin-input-field-label-font-size: var(--font-size-1);padding:var(--space-200);gap:var(--space-200);justify-content:space-between}copilot-feedback-panel>p{margin:0}copilot-feedback-panel .dialog-footer{display:flex;gap:var(--space-100)}copilot-feedback-panel vaadin-select,copilot-feedback-panel vaadin-text-area,copilot-feedback-panel vaadin-text-field{padding-top:0;--lumo-text-field-size: 1.75rem;--vaadin-input-field-label-font-size: var(--font-size-2);--vaadin-input-field-background: none;--vaadin-input-field-border-color: transparent;--vaadin-input-field-border-width: 1px;--vaadin-input-field-border-color: var(--border-color-high-contrast);--vaadin-input-field-hover-highlight: var(--gray-100);--vaadin-input-field-hover-highlight-opacity: 1}copilot-feedback-panel vaadin-text-area>textarea{max-height:7em}copilot-feedback-panel vaadin-text-area>textarea{padding:var(--space-100) 0;font:var(--font-xsmall)}copilot-feedback-panel vaadin-text-area:hover::part(input-field){background-color:var(--gray-100)}copilot-feedback-panel vaadin-text-field>input{font:var(--font-xsmall)}copilot-feedback-panel vaadin-select::part(input-field){border-radius:var(--radius-1);flex:1;padding:0 var(--space-50)}vaadin-select-overlay[theme=feedback]::part(overlay){--color-high-contrast: var(--gray-500)}copilot-feedback-panel vaadin-select[focus-ring]::part(input-field){box-shadow:none;outline:2px solid var(--selection-color);outline-offset:-2px}copilot-feedback-panel vaadin-select-value-button{padding:0 var(--space-50)}copilot-feedback-panel vaadin-select-item{--_lumo-selected-item-height: 1.75rem;--_lumo-selected-item-padding: 0;font:var(--font-xsmall)}copilot-feedback-panel vaadin-select-item:hover{background:none}";
var w = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, o = (e, t, l, n) => {
for (var a = n > 1 ? void 0 : n ? $(t, l) : t, s = e.length - 1, r; s >= 0; s--)
(r = e[s]) && (a = (n ? r(t, l, a) : r(a)) || a);
return n && a && w(t, l, a), a;
};
const u = "https://github.com/vaadin/copilot/issues/new", A = "?template=feature_request.md&title=%5BFEATURE%5D", P = "A short, concise description of the bug and why you consider it a bug. Any details like exceptions and logs can be helpful as well.", T = "Please provide as many details as possible, this will help us deliver a fix as soon as possible.%0AThank you!%0A%0A%23%23%23 Description of the Bug%0A%0A{description}%0A%0A%23%23%23 Expected Behavior%0A%0AA description of what you would expect to happen. (Sometimes it is clear what the expected outcome is if something does not work, other times, it is not super clear.)%0A%0A%23%23%23 Minimal Reproducible Example%0A%0AWe would appreciate the minimum code with which we can reproduce the issue.%0A%0A%23%23%23 Versions%0A{versionsInfo}";
let i = class extends y {
constructor() {
super(), this.description = "", this.items = [
{
label: "Report a Bug",
value: "bug",
ghTitle: "[BUG]"
},
{
label: "Ask a Question",
value: "question",
ghTitle: "[QUESTION]"
},
{
label: "Share an Idea",
value: "idea",
ghTitle: "[FEATURE]"
}
];
}
render() {
return d`<style>
${x}</style
>${this.renderContent()}${this.renderFooter()}`;
}
firstUpdated() {
m(this);
}
renderContent() {
return this.message === void 0 ? d`
<p>
Your insights are incredibly valuable to us. Whether youve encountered a hiccup, have questions, or ideas
to make our platform better, we're all ears! If you wish, leave your email and well get back to you. You
can even share your code snippet with us for a clearer picture.
</p>
<vaadin-select
label="What's on your mind?"
theme="feedback"
.items="${this.items}"
.value="${this.items[0].value}"
@value-changed=${(e) => {
this.type = e.detail.value;
}}>
</vaadin-select>
<vaadin-text-area
.value="${this.description}"
@keydown=${this.keyDown}
@focus=${() => {
this.descriptionField.invalid = !1, this.descriptionField.placeholder = "";
}}
@value-changed=${(e) => {
this.description = e.detail.value;
}}
label="Tell Us More"
helper-text="Describe what you're experiencing, wondering about, or envisioning. The more you share, the better we can understand and act on your feedback"></vaadin-text-area>
<vaadin-text-field
@keydown=${this.keyDown}
@value-changed=${(e) => {
this.email = e.detail.value;
}}
id="email"
label="Your Email (Optional)"
helper-text="Leave your email if youd like us to follow up. Totally optional, but wed love to keep the conversation going."></vaadin-text-field>
` : d`<p>${this.message}</p>`;
}
renderFooter() {
return this.message === void 0 ? d`
<div class="dialog-footer">
<vaadin-button
theme="tertiary"
@click="${() => c.emit("system-info-with-callback", {
callback: (e) => this.openGithub(e, this),
notify: !1
})}">
<span style="display: flex" slot="prefix">${k.github}</span>
Create GitHub issue
</vaadin-button>
<div style="flex-grow: 1"></div>
<vaadin-button theme="tertiary" @click="${this.close}">Cancel</vaadin-button>
<vaadin-button theme="primary" @click="${this.submit}">Submit</vaadin-button>
</div>
` : d` <div class="footer">
<vaadin-button @click="${this.close}">Close</vaadin-button>
</div>`;
}
close() {
h.updatePanel("copilot-feedback-panel", {
floating: !1
});
}
submit() {
if (this.description.trim() === "") {
this.descriptionField.invalid = !0, this.descriptionField.placeholder = "Please tell us more before sending", this.descriptionField.value = "";
return;
}
const e = {
description: this.description,
email: this.email,
type: this.type
};
c.emit("system-info-with-callback", {
callback: (t) => f(`${v}feedback`, { ...e, versions: t }),
notify: !1
}), this.parentNode?.style.setProperty("--section-height", "150px"), this.message = "Thank you for sharing feedback.";
}
keyDown(e) {
(e.key === "Backspace" || e.key === "Delete") && e.stopPropagation();
}
openGithub(e, t) {
if (this.type === "idea") {
window.open(`${u}${A}`);
return;
}
const l = e.replace(/\n/g, "%0A"), n = `${t.items.find((r) => r.value === this.type)?.ghTitle}`, a = t.description !== "" ? t.description : P, s = T.replace("{description}", a).replace("{versionsInfo}", l);
window.open(`${u}?title=${n}&body=${s}`, "_blank")?.focus();
}
};
o([
p()
], i.prototype, "description", 2);
o([
p()
], i.prototype, "type", 2);
o([
p()
], i.prototype, "email", 2);
o([
p()
], i.prototype, "message", 2);
o([
p()
], i.prototype, "items", 2);
o([
g("vaadin-text-area")
], i.prototype, "descriptionField", 2);
i = o([
b("copilot-feedback-panel")
], i);
const F = {
header: "Help Us Improve!",
expanded: !0,
expandable: !1,
panelOrder: 0,
floating: !1,
tag: "copilot-feedback-panel",
width: 500,
height: 500,
floatingPosition: {
top: 50,
left: 50
}
}, D = {
init(e) {
e.addPanel(F);
}
};
window.Vaadin.copilot.plugins.push(D);
export {
i as CopilotFeedbackPanel
};
File diff suppressed because one or more lines are too long
@@ -0,0 +1,286 @@
import { a as D, N as $, e as d, x as s, H as A, T as u, M as E, b as H, t as C, Q as J, V as P, I as S } from "./copilot-ppBO0zjz.js";
import { r as I } from "./state-B-CMA1Q2.js";
import { B as R } from "./base-panel-vYmwbGFU.js";
import { showNotification as V } from "./copilot-notification-BorVW3EP.js";
import { i as _ } from "./icons-BzskfjAz.js";
const O = "copilot-info-panel{--dev-tools-red-color: red;--dev-tools-grey-color: gray;--dev-tools-green-color: green;position:relative}copilot-info-panel div.info-tray{display:flex;flex-direction:column;gap:10px}copilot-info-panel dl{display:grid;grid-template-columns:auto auto;gap:0;margin:var(--space-100) var(--space-50);font:var(--font-xsmall)}copilot-info-panel dl>dt,copilot-info-panel dl>dd{padding:3px 10px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}copilot-info-panel dd.live-reload-status>span{overflow:hidden;text-overflow:ellipsis;display:block;color:var(--status-color)}copilot-info-panel dd span.hidden{display:none}copilot-info-panel dd span.true{color:var(--dev-tools-green-color);font-size:large}copilot-info-panel dd span.false{color:var(--dev-tools-red-color);font-size:large}copilot-info-panel code{white-space:nowrap;-webkit-user-select:all;user-select:all}copilot-info-panel .checks{display:inline-grid;grid-template-columns:auto 1fr;gap:var(--space-50)}copilot-info-panel span.hint{font-size:var(--font-size-0);background:var(--gray-50);padding:var(--space-75);border-radius:var(--radius-2)}";
var j = function() {
var e = document.getSelection();
if (!e.rangeCount)
return function() {
};
for (var t = document.activeElement, a = [], l = 0; l < e.rangeCount; l++)
a.push(e.getRangeAt(l));
switch (t.tagName.toUpperCase()) {
case "INPUT":
case "TEXTAREA":
t.blur();
break;
default:
t = null;
break;
}
return e.removeAllRanges(), function() {
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || a.forEach(function(i) {
e.addRange(i);
}), t && t.focus();
};
}, U = j, v = {
"text/plain": "Text",
"text/html": "Url",
default: "Text"
}, T = "Copy to clipboard: #{key}, Enter";
function L(e) {
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
return e.replace(/#{\s*key\s*}/g, t);
}
function N(e, t) {
var a, l, i, o, r, n, h = !1;
t || (t = {}), a = t.debug || !1;
try {
i = U(), o = document.createRange(), r = document.getSelection(), n = document.createElement("span"), n.textContent = e, n.ariaHidden = "true", n.style.all = "unset", n.style.position = "fixed", n.style.top = 0, n.style.clip = "rect(0, 0, 0, 0)", n.style.whiteSpace = "pre", n.style.webkitUserSelect = "text", n.style.MozUserSelect = "text", n.style.msUserSelect = "text", n.style.userSelect = "text", n.addEventListener("copy", function(c) {
if (c.stopPropagation(), t.format)
if (c.preventDefault(), typeof c.clipboardData > "u") {
a && console.warn("unable to use e.clipboardData"), a && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
var m = v[t.format] || v.default;
window.clipboardData.setData(m, e);
} else
c.clipboardData.clearData(), c.clipboardData.setData(t.format, e);
t.onCopy && (c.preventDefault(), t.onCopy(c.clipboardData));
}), document.body.appendChild(n), o.selectNodeContents(n), r.addRange(o);
var x = document.execCommand("copy");
if (!x)
throw new Error("copy command was unsuccessful");
h = !0;
} catch (c) {
a && console.error("unable to copy using execCommand: ", c), a && console.warn("trying IE specific stuff");
try {
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), h = !0;
} catch (m) {
a && console.error("unable to copy using clipboardData: ", m), a && console.error("falling back to prompt"), l = L("message" in t ? t.message : T), window.prompt(l, e);
}
} finally {
r && (typeof r.removeRange == "function" ? r.removeRange(o) : r.removeAllRanges()), n && document.body.removeChild(n), i();
}
return h;
}
var B = N;
const M = /* @__PURE__ */ D(B);
var F = Object.defineProperty, W = Object.getOwnPropertyDescriptor, g = (e, t, a, l) => {
for (var i = l > 1 ? void 0 : l ? W(t, a) : t, o = e.length - 1, r; o >= 0; o--)
(r = e[o]) && (i = (l ? r(t, a, i) : r(i)) || i);
return l && i && F(t, a, i), i;
};
const w = s`<a
href="${J}"
target="_blank"
@click="${() => k("idea")}"
title="Get IntelliJ plugin"
>Get IntelliJ plugin</a
>`, b = s`<a
href="${P}"
target="_blank"
@click="${() => k("vscode")}"
title="Get VS Code plugin"
>Get VS Code plugin</a
>`;
function k(e) {
return S("get-plugin", e), !1;
}
let f = class extends R {
constructor() {
super(...arguments), this.serverInfo = [], this.clientInfo = [{ name: "Browser", version: navigator.userAgent }], this.handleServerInfoEvent = (e) => {
const t = JSON.parse(e.data.info);
this.serverInfo = t.versions, this.updateJdkInfo(t.jdkInfo), this.updateIdePluginInfo(), $().then((a) => {
a && (this.clientInfo.unshift({ name: "Vaadin Employee", version: "true", more: void 0 }), this.requestUpdate("clientInfo"));
});
};
}
connectedCallback() {
super.connectedCallback(), this.onCommand("copilot-info", this.handleServerInfoEvent), this.onEventBus("system-info-with-callback", (e) => {
e.detail.callback(this.getInfoForClipboard(e.detail.notify));
}), this.reaction(
() => d.idePluginState,
() => {
this.updateIdePluginInfo(), this.requestUpdate("serverInfo");
}
);
}
updateJdkInfo(e) {
const t = e.extendedClassDefCapable && e.runningWithExtendClassDef && e.hotswapAgentFound && e.runningWitHotswap && e.hotswapVersionOk, a = e.jrebel;
d.jdkInfo = {
...e,
activeHotswap: a ? "jrebel" : t ? "hotswapagent" : void 0
};
}
updateIdePluginInfo() {
const e = this.getIndex("Copilot IDE Plugin");
let t = "false", a;
d.idePluginState?.active ? t = `${d.idePluginState.version}-${d.idePluginState.ide}` : d.idePluginState?.ide === "vscode" ? a = b : d.idePluginState?.ide === "idea" ? a = w : a = s`${w} or ${b}`, this.serverInfo[e].version = t, this.serverInfo[e].more = a;
}
getIndex(e) {
return this.serverInfo.findIndex((t) => t.name === e);
}
render() {
return s`<style>
${O}
</style>
<div class="info-tray">
<dl>
${[...this.serverInfo, ...this.clientInfo].map(
(e) => s`
<dt>${e.name}</dt>
<dd title="${e.version}" style="${e.name === "Java Hotswap" ? "white-space: normal" : ""}">
${this.renderVersion(e)} ${e.more}
</dd>
`
)}
</dl>
</div>`;
}
renderVersion(e) {
return e.name === "Java Hotswap" ? this.renderJavaHotswap() : this.renderValue(e.version);
}
renderValue(e) {
return e === "false" ? p(!1) : e === "true" ? p(!0) : e;
}
getInfoForClipboard(e) {
const t = this.renderRoot.querySelectorAll(".info-tray dt"), i = Array.from(t).map((o) => ({
key: o.textContent.trim(),
value: o.nextElementSibling.textContent.trim()
})).filter((o) => o.key !== "Live reload").filter((o) => !o.key.startsWith("Vaadin Emplo")).map((o) => {
const { key: r } = o;
let { value: n } = o;
return r === "Copilot IDE Plugin" && !d.idePluginState?.active ? n = "false" : r === "Java Hotswap" && (n = String(n.includes("JRebel is in use") || n.includes("HotswapAgent is in use"))), `${r}: ${n}`;
}).join(`
`);
return e && V({
type: A.INFORMATION,
message: "Environment information copied to clipboard",
dismissId: "versionInfoCopied"
}), i.trim();
}
renderJavaHotswap() {
const e = d.jdkInfo;
if (!e)
return u;
const t = e.activeHotswap === "jrebel";
return !e.extendedClassDefCapable && !t ? s`<details>
<summary>${p(!1)} No Hotswap solution in use</summary>
<p>To enable hotswap for Java, you can either use HotswapAgent or JRebel.</p>
<p>HotswapAgent is an open source project that utilizes the JetBrains Runtime (JDK).</p>
<div class="checks">
<span class="hint"
>If you are running IntelliJ, edit the launch configuration to use the bundled JDK.<br />
Otherwise, download it from
<a target="_blank" href="https://github.com/JetBrains/JetBrainsRuntime/releases"
>the JetBrains release page</a
>
to get started.
</span>
</div>
<p>
JRebel is a commercial solution available from
<a target="_blank" href="https://www.jrebel.com/">jrebel.com</a>
</p>
</details>` : t ? s`<div class="checks">
${p(!0)}
<span>JRebel is in use</span>
</div>` : e.activeHotswap === "hotswapagent" ? s`<div class="checks">${p(!0)}<span>HotswapAgent is in use</span></div>` : s`<details>
<summary><div class="checks">${p(!1)} HotswapAgent is partially enabled</div></summary>
<div class="checks">
${p(e.extendedClassDefCapable)}
<span>JDK supports hotswapping</span>
${p(e.runningWithExtendClassDef)}
<span>JDK hotswapping enabled</span>
${e.runningWithExtendClassDef ? u : s`<span></span
><span class="hint"
>Add the <code>-XX:+AllowEnhancedClassRedefinition</code> JVM argument when launching the
application</span
>`}
${p(e.hotswapAgentFound)}
<span>HotswapAgent installed</span>
${e.hotswapAgentFound ? u : s`<span></span
><span class="hint"
><a target="_blank" href="https://github.com/HotswapProjects/HotswapAgent/releases"
>Download the latest HotswapAgent</a
>
and place it in <code>${e.hotswapAgentLocation}</code></span
>`}
${p(e.hotswapVersionOk)}
<span>HotswapAgent is version 1.4.2 or newer</span>
${e.hotswapVersionOk ? u : s`<span></span
><span class="hint"
>HotswapAgent version ${e.hotswapVersion} is in use<br />
<a target="_blank" href="https://github.com/HotswapProjects/HotswapAgent/releases"
>Download the latest HotswapAgent</a
>
and place it in <code>${e.hotswapAgentLocation}</code></span
>`}
${p(e.runningWitHotswap)}
<span>HotswapAgent configured</span>
${e.runningWitHotswap ? u : s`<span></span
><span class="hint"
>Add the <code>-XX:HotswapAgent=fatjar</code> JVM argument when launching the application</span
>`}
${p(e.runningInJavaDebugMode)}
<span>Application running in Java debug mode</span>
${e.runningInJavaDebugMode ? u : s`<span></span><span class="hint">Start the application in debug mode in the IDE</span>`}
<a href="https://vaadin.com/docs/latest/flow/configuration/live-reload/hotswap-agent" target="_blank" style="grid-column: 1 / -1">Read more about Hot Deploy & Live Reload</a>
</details> `;
}
};
g([
I()
], f.prototype, "serverInfo", 2);
g([
I()
], f.prototype, "clientInfo", 2);
f = g([
C("copilot-info-panel")
], f);
let y = class extends E {
createRenderRoot() {
return this;
}
connectedCallback() {
super.connectedCallback(), this.style.display = "flex";
}
render() {
return s`<button title="Copy to clipboard" aria-label="Copy to clipboard" theme="icon tertiary">
<span
@click=${() => {
H.emit("system-info-with-callback", {
callback: M,
notify: !0
});
}}
>${_.copy}</span
>
</button>`;
}
};
y = g([
C("copilot-info-actions")
], y);
const z = {
header: "Info",
expanded: !0,
panelOrder: 15,
panel: "right",
floating: !1,
tag: "copilot-info-panel",
actionsTag: "copilot-info-actions"
}, G = {
init(e) {
e.addPanel(z);
}
};
window.Vaadin.copilot.plugins.push(G);
function p(e) {
return e ? s`<span class="true">☑</span>` : s`<span class="false">☒</span>`;
}
export {
y as Actions,
f as CopilotInfoPanel
};
@@ -0,0 +1,202 @@
import { G as c, l as k, H as d, x as l, J as M, K as R, M as D, b as T, L as C, t as x } from "./copilot-ppBO0zjz.js";
import { r as v } from "./state-B-CMA1Q2.js";
import { B as L } from "./base-panel-vYmwbGFU.js";
import { i as n } from "./icons-BzskfjAz.js";
const S = "copilot-log-panel{padding:var(--space-100);font:var(--font-xsmall);display:flex;flex-direction:column;gap:var(--space-50);overflow-y:auto}copilot-log-panel .row{display:flex;align-items:flex-start;padding:var(--space-50) var(--space-100);border-radius:var(--radius-2);gap:var(--space-100)}copilot-log-panel .row.information{background-color:var(--blue-50)}copilot-log-panel .row.warning{background-color:var(--yellow-50)}copilot-log-panel .row.error{background-color:var(--red-50)}copilot-log-panel .type{margin-top:var(--space-25)}copilot-log-panel .type.error{color:var(--red)}copilot-log-panel .type.warning{color:var(--yellow)}copilot-log-panel .type.info{color:var(--color)}copilot-log-panel .message{display:flex;flex-direction:column;flex-grow:1;gap:var(--space-25);overflow:hidden}copilot-log-panel .message>*{white-space:nowrap}copilot-log-panel .firstrow{display:flex;align-items:baseline;gap:.5em;flex-direction:column}copilot-log-panel .firstrowmessage{width:100%}copilot-log-panel button{padding:0;border:0;background:transparent}copilot-log-panel svg{height:12px;width:12px}copilot-log-panel .secondrow,copilot-log-panel .timestamp{font-size:var(--font-size-0);line-height:var(--line-height-1)}copilot-log-panel .expand span{height:12px;width:12px}";
var I = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, h = (e, t, a, o) => {
for (var s = o > 1 ? void 0 : o ? _(t, a) : t, p = e.length - 1, i; p >= 0; p--)
(i = e[p]) && (s = (o ? i(t, a, s) : i(s)) || s);
return o && s && I(t, a, s), s;
};
class b {
constructor() {
this.showTimestamps = !1, C(this);
}
toggleShowTimestamps() {
this.showTimestamps = !this.showTimestamps;
}
}
const g = new b();
let r = class extends L {
constructor() {
super(), this.unreadErrors = !1, this.messages = [], this.nextMessageId = 1, this.transitionDuration = 0, this.catchErrors();
}
connectedCallback() {
super.connectedCallback(), this.onCommand("log", (e) => {
this.handleLogEventData({ type: e.data.type, message: e.data.message });
}), this.onEventBus("log", (e) => this.handleLogEvent(e)), this.onEventBus("update-log", (e) => this.updateLog(e.detail)), this.onEventBus("notification-shown", (e) => this.handleNotification(e)), this.onEventBus("clear-log", () => this.clear()), this.transitionDuration = parseInt(
window.getComputedStyle(this).getPropertyValue("--dev-tools-transition-duration"),
10
);
}
clear() {
this.messages = [];
}
handleNotification(e) {
this.log(e.detail.type, e.detail.message, !0, e.detail.details, e.detail.link, void 0);
}
handleLogEvent(e) {
this.handleLogEventData(e.detail);
}
handleLogEventData(e) {
this.log(
e.type,
e.message,
!!e.internal,
e.details,
e.link,
c(e.expandedMessage),
c(e.expandedDetails),
e.id
);
}
activate() {
this.unreadErrors = !1, this.updateComplete.then(() => {
const e = this.renderRoot.querySelector(".message:last-child");
e && e.scrollIntoView();
});
}
format(e) {
return e.message ? e.message.toString() : e.toString();
}
catchErrors() {
const e = window.Vaadin.ConsoleErrors;
window.Vaadin.ConsoleErrors = {
push: (t) => {
k.attentionRequiredPanelTag = y.tag, t[0].type !== void 0 && t[0].message !== void 0 ? this.log(t[0].type, t[0].message, !!t[0].internal, t[0].details, t[0].link) : this.log(d.ERROR, t.map((a) => this.format(a)).join(" "), !1), e.push(t);
}
};
}
render() {
return l`<style>
${S}
</style>
${this.messages.map((e) => this.renderMessage(e))} `;
}
renderMessage(e) {
let t, a, o;
return e.type === d.ERROR ? (t = "error", o = n.exclamationMark, a = "Error") : e.type === d.WARNING ? (t = "warning", o = n.warning, a = "Warning") : (t = "info", o = n.info, a = "Info"), e.internal && (t += " internal"), l`
<div class="row ${e.type} ${e.details || e.link ? "has-details" : ""}">
<span class="type ${t}" title="${a}">${o}</span>
<div class="message" @click=${() => this.toggleExpanded(e)}>
<span class="firstrow">
<span class="timestamp" ?hidden=${!g.showTimestamps}>${q(e.timestamp)}</span>
<span class="firstrowmessage"
>${e.expanded && e.expandedMessage ? e.expandedMessage : e.message}
</span>
</span>
${e.expanded ? l` <span class="secondrow">${e.expandedDetails}</span>` : l`<span class="secondrow" ?hidden="${!e.details && !e.link}"
>${c(e.details)}
${e.link ? l`<a class="ahreflike" href="${e.link}" target="_blank">Learn more</a>` : ""}</span
>`}
</div>
<button
aria-label="Expand details"
theme="icon tertiary"
class="expand"
@click=${() => this.toggleExpanded(e)}
?hidden=${!e.expandedDetails}>
<span>${e.expanded ? n.chevronDown : n.chevronRight}</span>
</button>
</div>
`;
}
log(e, t, a, o, s, p, i, $) {
const E = this.nextMessageId;
this.nextMessageId += 1;
const u = M(t, 200);
u !== t && !i && (i = t);
const m = {
id: E,
type: e,
message: u,
details: o,
link: s,
dontShowAgain: !1,
deleted: !1,
expanded: !1,
expandedMessage: p,
expandedDetails: i,
timestamp: /* @__PURE__ */ new Date(),
internal: a,
userId: $
};
for (this.messages.push(m); this.messages.length > r.MAX_LOG_ROWS; )
this.messages.shift();
return this.requestUpdate(), this.updateComplete.then(() => {
const f = this.renderRoot.querySelector(".message:last-child");
f ? (setTimeout(() => f.scrollIntoView({ behavior: "smooth" }), this.transitionDuration), this.unreadErrors = !1) : e === d.ERROR && (this.unreadErrors = !0);
}), m;
}
updateLog(e) {
let t = this.messages.find((a) => a.userId === e.id);
t || (t = this.log(d.INFORMATION, "<Log message to update was not found>", !1)), Object.assign(t, e), R(t.expandedDetails) && (t.expandedDetails = c(t.expandedDetails)), this.requestUpdate();
}
toggleExpanded(e) {
e.expandedDetails && (e.expanded = !e.expanded, this.requestUpdate());
}
};
r.MAX_LOG_ROWS = 1e3;
h([
v()
], r.prototype, "unreadErrors", 2);
h([
v()
], r.prototype, "messages", 2);
r = h([
x("copilot-log-panel")
], r);
let w = class extends D {
createRenderRoot() {
return this;
}
connectedCallback() {
super.connectedCallback(), this.style.display = "flex";
}
render() {
return l`
<button title="Clear log" aria-label="Clear log" theme="icon tertiary">
<span
@click=${() => {
T.emit("clear-log", {});
}}
>${n.trash}</span
>
</button>
<button title="Toggle timestamps" aria-label="Toggle timestamps" theme="icon tertiary">
<span
class="${g.showTimestamps ? "on" : "off"}"
@click=${() => {
g.toggleShowTimestamps();
}}
>${n.clock}</span
>
</button>
`;
}
};
w = h([
x("copilot-log-panel-actions")
], w);
const y = {
header: "Log",
expanded: !0,
panelOrder: 0,
panel: "bottom",
floating: !1,
tag: "copilot-log-panel",
actionsTag: "copilot-log-panel-actions"
}, P = {
init(e) {
e.addPanel(y);
}
};
window.Vaadin.copilot.plugins.push(P);
const B = { hour: "numeric", minute: "numeric", second: "numeric", fractionalSecondDigits: 3 }, A = new Intl.DateTimeFormat(navigator.language, B);
function q(e) {
return A.format(e);
}
export {
w as Actions,
r as CopilotLogPanel
};
@@ -0,0 +1,30 @@
import { e as i, b as n, o as d } from "./copilot-ppBO0zjz.js";
const a = 5e3;
let o = 1;
function m(s) {
i.notifications.includes(s) && (s.dontShowAgain && s.dismissId && r(s.dismissId), i.removeNotification(s), n.emit("notification-dismissed", s));
}
function f(s) {
return d.getDismissedNotifications().includes(s);
}
function r(s) {
f(s) || d.addDismissedNotification(s);
}
function u(s) {
return !(s.dismissId && (f(s.dismissId) || i.notifications.find((t) => t.dismissId === s.dismissId)));
}
function N(s) {
u(s) && c(s);
}
function c(s) {
const t = o;
o += 1;
const e = { ...s, id: t, dontShowAgain: !1, animatingOut: !1 };
i.setNotifications([...i.notifications, e]), !s.link && !s.dismissId && setTimeout(() => {
m(e);
}, s.delay ?? a), n.emit("notification-shown", s);
}
export {
m as dismissNotification,
N as showNotification
};
File diff suppressed because one or more lines are too long
@@ -0,0 +1,59 @@
import { t as u, x as d, D as g, u as e } from "./copilot-ppBO0zjz.js";
import { B as h } from "./base-panel-vYmwbGFU.js";
import { i as l } from "./icons-BzskfjAz.js";
const f = "copilot-shortcuts-panel{font:var(--font-xsmall);padding:var(--space-200);display:flex;flex-direction:column;gap:var(--space-50)}copilot-shortcuts-panel h3{font:var(--font-xsmall-strong);margin:0;padding:0}copilot-shortcuts-panel h3:not(:first-of-type){margin-top:var(--space-200)}copilot-shortcuts-panel ul{list-style:none;margin:0;padding:0 var(--space-50);display:flex;flex-direction:column}copilot-shortcuts-panel ul li{display:flex;align-items:center;gap:var(--space-150);padding:var(--space-75) 0}copilot-shortcuts-panel ul li:not(:last-of-type){border-bottom:1px dashed var(--border-color)}copilot-shortcuts-panel ul li svg{height:16px;width:16px}copilot-shortcuts-panel ul li .kbds{flex:1;text-align:right}copilot-shortcuts-panel kbd{display:inline-block;border-radius:var(--radius-1);border:1px solid var(--border-color);min-width:1em;min-height:1em;text-align:center;margin:0 .1em;padding:.25em;box-sizing:border-box;font-size:var(--font-size-1);font-family:var(--font-family);line-height:1}";
var m = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, b = (i, a, n, s) => {
for (var o = s > 1 ? void 0 : s ? $(a, n) : a, r = i.length - 1, p; r >= 0; r--)
(p = i[r]) && (o = (s ? p(a, n, o) : p(o)) || o);
return s && o && m(a, n, o), o;
};
let c = class extends h {
render() {
return d`<style>
${f}
</style>
<h3>Global</h3>
<ul>
<li>${l.vaadinLogo} Copilot ${t(e.toggleCopilot)}</li>
<li>${l.terminal} Command window ${t(e.toggleCommandWindow)}</li>
<li>${l.undo} Undo ${t(e.undo)}</li>
<li>${l.redo} Redo ${t(e.redo)}</li>
</ul>
<h3>Selected component</h3>
<ul>
<li>${l.code} Go to source ${t(e.goToSource)}</li>
<li>${l.copy} Copy ${t(e.copy)}</li>
<li>${l.paste} Paste ${t(e.paste)}</li>
<li>${l.duplicate} Duplicate ${t(e.duplicate)}</li>
<li>${l.userUp} Select parent ${t(e.selectParent)}</li>
<li>${l.userLeft} Select previous sibling ${t(e.selectPreviousSibling)}</li>
<li>${l.userRight} Select first child / next sibling ${t(e.selectNextSibling)}</li>
<li>${l.trash} Delete ${t(e.delete)}</li>
</ul>`;
}
};
c = b([
u("copilot-shortcuts-panel")
], c);
function t(i) {
return d`<span class="kbds">${g(i)}</span>`;
}
const v = {
header: "Keyboard Shortcuts",
expanded: !0,
expandable: !1,
panelOrder: 0,
floating: !1,
tag: "copilot-shortcuts-panel",
width: 400,
height: 475,
floatingPosition: {
top: 50,
left: 50
}
}, x = {
init(i) {
i.addPanel(v);
}
};
window.Vaadin.copilot.plugins.push(x);
@@ -0,0 +1 @@
import "./copilot-ppBO0zjz.js";
@@ -0,0 +1,368 @@
import { U as o } from "./copilot-ppBO0zjz.js";
const r = {
popup: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M14 6.00001V2.00001M14 2.00001H10M14 2.00001L8 8M6.66667 2H5.2C4.07989 2 3.51984 2 3.09202 2.21799C2.71569 2.40973 2.40973 2.71569 2.21799 3.09202C2 3.51984 2 4.07989 2 5.2V10.8C2 11.9201 2 12.4801 2.21799 12.908C2.40973 13.2843 2.71569 13.5903 3.09202 13.782C3.51984 14 4.07989 14 5.2 14H10.8C11.9201 14 12.4801 14 12.908 13.782C13.2843 13.5903 13.5903 13.2843 13.782 12.908C14 12.4801 14 11.9201 14 10.8V9.33333"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round" />
</svg>
`,
dock: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 12L10 8L6 4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
</svg>
`,
close: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17 7L7 17M7 7L17 17" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
minus: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.33333 8H12.6667" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
</svg>
`,
plus: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M7.99999 3.33334V12.6667M3.33333 8.00001H12.6667"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round" />
</svg>
`,
arrowLeft: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M13.3333 8H2.66667M2.66667 8L6.66667 12M2.66667 8L6.66667 4"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round" />
</svg>
`,
chevronLeft: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 12L6 8L10 4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
</svg>
`,
chevronRight: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 12L10 8L6 4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
</svg>
`,
chevronDown: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 6L8 10L12 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
chevronUp: o`
<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 15L12 9L6 15" stroke="currentColor" stroke-width="1" stroke-linecap="round"
stroke-linejoin="round"/>
</svg>
`,
edit: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M12.0001 6.66667L9.33344 4.00001M1.66675 14.3333L3.92299 14.0827C4.19865 14.052 4.33648 14.0367 4.46531 13.995C4.57961 13.958 4.68838 13.9057 4.78867 13.8396C4.90171 13.765 4.99977 13.667 5.1959 13.4709L14.0001 4.66667C14.7365 3.93029 14.7365 2.73639 14.0001 2.00001C13.2637 1.26363 12.0698 1.26363 11.3334 2.00001L2.52923 10.8042C2.33311 11.0003 2.23505 11.0983 2.16051 11.2114C2.09437 11.3117 2.04209 11.4205 2.00509 11.5348C1.96339 11.6636 1.94807 11.8014 1.91744 12.0771L1.66675 14.3333Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round" />
</svg>
`,
editAlt: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_171_17)">
<path
d="M7.33325 2.66665H4.53325C3.41315 2.66665 2.85309 2.66665 2.42527 2.88464C2.04895 3.07639 1.74299 3.38235 1.55124 3.75867C1.33325 4.1865 1.33325 4.74655 1.33325 5.86665V11.4667C1.33325 12.5867 1.33325 13.1468 1.55124 13.5747C1.74299 13.9509 2.04895 14.2569 2.42527 14.4487C2.85309 14.6667 3.41315 14.6667 4.53325 14.6667H10.1333C11.2534 14.6667 11.8134 14.6667 12.2413 14.4487C12.6176 14.2569 12.9235 13.9509 13.1153 13.5747C13.3333 13.1468 13.3333 12.5867 13.3333 11.4667V8.66667M5.33323 10.6667H6.4496C6.77572 10.6667 6.93879 10.6667 7.09225 10.6298C7.22825 10.5971 7.35832 10.5433 7.47765 10.4702C7.61219 10.3877 7.72752 10.2724 7.95812 10.0418L14.3333 3.66665C14.8855 3.11437 14.8855 2.21894 14.3333 1.66665C13.781 1.11437 12.8855 1.11437 12.3333 1.66665L5.95807 8.0418C5.72747 8.2724 5.61217 8.38773 5.52971 8.52227C5.45661 8.6416 5.40274 8.7716 5.37007 8.90767C5.33323 9.06113 5.33323 9.2242 5.33323 9.55033V10.6667Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round" />
</g>
<defs>
<clipPath id="clip0_171_17">
<rect width="16" height="16" fill="white" />
</clipPath>
</defs>
</svg>
`,
code: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 2.26953V6.40007C14 6.96012 14 7.24015 14.109 7.45406C14.2049 7.64222 14.3578 7.7952 14.546 7.89108C14.7599 8.00007 15.0399 8.00007 15.6 8.00007H19.7305M14 17.5L16.5 15L14 12.5M10 12.5L7.5 15L10 17.5M20 9.98822V17.2C20 18.8802 20 19.7202 19.673 20.362C19.3854 20.9265 18.9265 21.3854 18.362 21.673C17.7202 22 16.8802 22 15.2 22H8.8C7.11984 22 6.27976 22 5.63803 21.673C5.07354 21.3854 4.6146 20.9265 4.32698 20.362C4 19.7202 4 18.8802 4 17.2V6.8C4 5.11984 4 4.27976 4.32698 3.63803C4.6146 3.07354 5.07354 2.6146 5.63803 2.32698C6.27976 2 7.11984 2 8.8 2H12.0118C12.7455 2 13.1124 2 13.4577 2.08289C13.7638 2.15638 14.0564 2.27759 14.3249 2.44208C14.6276 2.6276 14.887 2.88703 15.4059 3.40589L18.5941 6.59411C19.113 7.11297 19.3724 7.3724 19.5579 7.67515C19.7224 7.94356 19.8436 8.2362 19.9171 8.5423C20 8.88757 20 9.25445 20 9.98822Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
codeAlt: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M3.33341 12.3333C3.33341 12.6429 3.33341 12.7977 3.35053 12.9277C3.46868 13.8252 4.17489 14.5314 5.07236 14.6495C5.20233 14.6666 5.35713 14.6666 5.66675 14.6666H10.8001C11.9202 14.6666 12.4802 14.6666 12.9081 14.4486C13.2844 14.2569 13.5903 13.951 13.7821 13.5746C14.0001 13.1468 14.0001 12.5868 14.0001 11.4666V6.65879C14.0001 6.16961 14.0001 5.92503 13.9448 5.69485C13.8958 5.49078 13.815 5.29569 13.7053 5.11675C13.5817 4.91491 13.4087 4.74195 13.0628 4.39605L10.9373 2.27057C10.5914 1.92467 10.4185 1.75171 10.2167 1.62803C10.0377 1.51837 9.84261 1.43757 9.63855 1.38857C9.40835 1.33331 9.16375 1.33331 8.67461 1.33331H5.66675C5.35713 1.33331 5.20233 1.33331 5.07236 1.35043C4.17489 1.46858 3.46868 2.17479 3.35053 3.07226C3.33341 3.20223 3.33341 3.35703 3.33341 3.66665M6.00008 9.66665L7.66675 7.99998L6.00008 6.33331M3.33341 6.33331L1.66675 7.99998L3.33341 9.66665"
stroke="currentColor"
stroke-width="1"
stroke-linecap="round"
stroke-linejoin="round" />
</svg>
`,
trash: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
clock: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 6V12L16 14M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
exclamationMark: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 8V12M12 16H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
warning: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9998 8.99999V13M11.9998 17H12.0098M10.6151 3.89171L2.39019 18.0983C1.93398 18.8863 1.70588 19.2803 1.73959 19.6037C1.769 19.8857 1.91677 20.142 2.14613 20.3088C2.40908 20.5 2.86435 20.5 3.77487 20.5H20.2246C21.1352 20.5 21.5904 20.5 21.8534 20.3088C22.0827 20.142 22.2305 19.8857 22.2599 19.6037C22.2936 19.2803 22.0655 18.8863 21.6093 18.0983L13.3844 3.89171C12.9299 3.10654 12.7026 2.71396 12.4061 2.58211C12.1474 2.4671 11.8521 2.4671 11.5935 2.58211C11.2969 2.71396 11.0696 3.10655 10.6151 3.89171Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
refresh: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.6667 6.66667C14.6667 6.66667 13.33 4.84548 12.2441 3.75883C11.1582 2.67218 9.6576 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C10.7354 14 13.0433 12.1695 13.7655 9.66667M14.6667 6.66667V2.66667M14.6667 6.66667H10.6667" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
save: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.66667 2V4.26667C4.66667 4.64003 4.66667 4.82672 4.73933 4.96933C4.80325 5.09477 4.90523 5.19675 5.03067 5.26067C5.17328 5.33333 5.35997 5.33333 5.73333 5.33333H10.2667C10.6401 5.33333 10.8267 5.33333 10.9693 5.26067C11.0948 5.19675 11.1967 5.09477 11.2607 4.96933C11.3333 4.82672 11.3333 4.64003 11.3333 4.26667V2.66667M11.3333 14V9.73333C11.3333 9.35993 11.3333 9.17327 11.2607 9.03067C11.1967 8.9052 11.0948 8.80327 10.9693 8.73933C10.8267 8.66667 10.6401 8.66667 10.2667 8.66667H5.73333C5.35997 8.66667 5.17328 8.66667 5.03067 8.73933C4.90523 8.80327 4.80325 8.9052 4.73933 9.03067C4.66667 9.17327 4.66667 9.35993 4.66667 9.73333V14M14 6.21699V10.8C14 11.9201 14 12.4801 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.4801 14 11.9201 14 10.8 14H5.2C4.07989 14 3.51984 14 3.09202 13.782C2.71569 13.5903 2.40973 13.2843 2.21799 12.908C2 12.4801 2 11.9201 2 10.8V5.2C2 4.07989 2 3.51984 2.21799 3.09202C2.40973 2.71569 2.71569 2.40973 3.09202 2.21799C3.51984 2 4.07989 2 5.2 2H9.783C10.1091 2 10.2722 2 10.4257 2.03684C10.5617 2.0695 10.6917 2.12337 10.8111 2.19648C10.9456 2.27893 11.0609 2.39423 11.2915 2.62484L13.3751 4.70849C13.6057 4.9391 13.7211 5.0544 13.8035 5.18895C13.8766 5.30825 13.9305 5.43831 13.9631 5.57436C14 5.72781 14 5.89087 14 6.21699Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
info: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 16V12M12 8H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
github: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_202_25)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97616 0C3.56555 0 0 3.59184 0 8.03543C0 11.5874 2.28457 14.5941 5.45388 15.6583C5.85012 15.7383 5.99527 15.4854 5.99527 15.2727C5.99527 15.0864 5.9822 14.4478 5.9822 13.7825C3.76343 14.2616 3.30139 12.8247 3.30139 12.8247C2.94482 11.8934 2.41649 11.654 2.41649 11.654C1.69029 11.1618 2.46939 11.1618 2.46939 11.1618C3.27494 11.215 3.69763 11.9866 3.69763 11.9866C4.41061 13.2104 5.55951 12.8647 6.02171 12.6518C6.08767 12.1329 6.2991 11.7737 6.52359 11.5742C4.75396 11.3879 2.89208 10.6962 2.89208 7.60963C2.89208 6.73159 3.20882 6.01322 3.71069 5.45453C3.63151 5.25502 3.35412 4.43004 3.79004 3.32588C3.79004 3.32588 4.46351 3.11298 5.98204 4.15069C6.63218 3.9748 7.30265 3.88532 7.97616 3.88457C8.64963 3.88457 9.33616 3.9778 9.97012 4.15069C11.4888 3.11298 12.1623 3.32588 12.1623 3.32588C12.5982 4.43004 12.3207 5.25502 12.2415 5.45453C12.7566 6.01322 13.0602 6.73159 13.0602 7.60963C13.0602 10.6962 11.1984 11.3745 9.41551 11.5742C9.70612 11.8269 9.9569 12.3058 9.9569 13.0642C9.9569 14.1417 9.94384 15.0065 9.94384 15.2725C9.94384 15.4854 10.0891 15.7383 10.4852 15.6584C13.6545 14.594 15.9391 11.5874 15.9391 8.03543C15.9522 3.59184 12.3736 0 7.97616 0Z" fill="currentColor" />
</g>
<defs>
<clipPath id="clip0_202_25">
<rect width="16" height="15.6735" fill="white" />
</clipPath>
</defs>
</svg>
`,
play: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.33334 3.32634C3.33334 2.6789 3.33334 2.35518 3.46833 2.17674C3.58593 2.02128 3.76568 1.92508 3.96027 1.91346C4.18363 1.90012 4.45298 2.07969 4.99168 2.43882L12.0021 7.1124C12.4472 7.40914 12.6697 7.55754 12.7473 7.74454C12.8151 7.90807 12.8151 8.0918 12.7473 8.25534C12.6697 8.44234 12.4472 8.59067 12.0021 8.88747L4.99168 13.561C4.45298 13.9201 4.18363 14.0997 3.96027 14.0864C3.76568 14.0748 3.58593 13.9786 3.46833 13.8231C3.33334 13.6447 3.33334 13.3209 3.33334 12.6735V3.32634Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
loading: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8 1.5V3.16667M8 12V14.6667M3.83333 8H1.5M14.1667 8H13.1667M12.3047 12.3047L11.8333 11.8333M12.4428 3.61053L11.5 4.55333M3.28105 12.7189L5.16667 10.8333M3.41912 3.47245L4.83333 4.88667" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
error: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_216_291)">
<path d="M8 5.33334V8.00001M14.6667 8.00001C14.6667 11.6819 11.6819 14.6667 8 14.6667C4.31809 14.6667 1.33333 11.6819 1.33333 8.00001C1.33333 4.31811 4.31809 1.33334 8 1.33334C11.6819 1.33334 14.6667 4.31811 14.6667 8.00001Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<circle cx="8" cy="10.67" r="0.5" fill="currentColor"/>
</g>
<defs>
<clipPath id="clip0_216_291">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>
`,
help: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_226_27)">
<path d="M6.06 6.00001C6.21673 5.55446 6.52609 5.17875 6.93333 4.93943C7.34053 4.70012 7.81926 4.61264 8.2848 4.69248C8.75033 4.77234 9.17253 5.01436 9.47673 5.3757C9.78086 5.73703 9.9474 6.19436 9.94666 6.66668C9.94666 8.00001 7.94666 8.66668 7.94666 8.66668M14.6667 8.00001C14.6667 11.6819 11.6819 14.6667 8 14.6667C4.31809 14.6667 1.33333 11.6819 1.33333 8.00001C1.33333 4.31811 4.31809 1.33334 8 1.33334C11.6819 1.33334 14.6667 4.31811 14.6667 8.00001Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<circle cx="8" cy="11.33" r="0.5" fill="currentColor"/>
</g>
<defs>
<clipPath id="clip0_226_27">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>
`,
copy: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.5 2.0028C9.82495 2.01194 9.4197 2.05103 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8.05103 3.4197 8.01194 3.82495 8.0028 4.5M19.5 2.0028C20.1751 2.01194 20.5803 2.05103 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C21.949 3.4197 21.9881 3.82494 21.9972 4.49999M21.9972 13.5C21.9881 14.175 21.949 14.5803 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.5803 15.949 20.1751 15.9881 19.5 15.9972M22 7.99999V9.99999M14.0001 2H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
paste: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 4C16.93 4 17.395 4 17.7765 4.10222C18.8117 4.37962 19.6204 5.18827 19.8978 6.22354C20 6.60504 20 7.07003 20 8V17.2C20 18.8802 20 19.7202 19.673 20.362C19.3854 20.9265 18.9265 21.3854 18.362 21.673C17.7202 22 16.8802 22 15.2 22H8.8C7.11984 22 6.27976 22 5.63803 21.673C5.07354 21.3854 4.6146 20.9265 4.32698 20.362C4 19.7202 4 18.8802 4 17.2V8C4 7.07003 4 6.60504 4.10222 6.22354C4.37962 5.18827 5.18827 4.37962 6.22354 4.10222C6.60504 4 7.07003 4 8 4M9.6 6H14.4C14.9601 6 15.2401 6 15.454 5.89101C15.6422 5.79513 15.7951 5.64215 15.891 5.45399C16 5.24008 16 4.96005 16 4.4V3.6C16 3.03995 16 2.75992 15.891 2.54601C15.7951 2.35785 15.6422 2.20487 15.454 2.10899C15.2401 2 14.9601 2 14.4 2H9.6C9.03995 2 8.75992 2 8.54601 2.10899C8.35785 2.20487 8.20487 2.35785 8.10899 2.54601C8 2.75992 8 3.03995 8 3.6V4.4C8 4.96005 8 5.24008 8.10899 5.45399C8.20487 5.64215 8.35785 5.79513 8.54601 5.89101C8.75992 6 9.03995 6 9.6 6Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
duplicate: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
overlay: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_211_179)">
<path d="M1.33325 3.46665C1.33325 2.71991 1.33325 2.34654 1.47858 2.06133C1.60641 1.81044 1.81038 1.60647 2.06127 1.47864C2.34648 1.33331 2.71985 1.33331 3.46659 1.33331H8.53325C9.27998 1.33331 9.65338 1.33331 9.93858 1.47864C10.1895 1.60647 10.3935 1.81044 10.5213 2.06133C10.6666 2.34654 10.6666 2.71991 10.6666 3.46665V8.53331C10.6666 9.28005 10.6666 9.65345 10.5213 9.93865C10.3935 10.1895 10.1895 10.3935 9.93858 10.5213C9.65338 10.6666 9.27998 10.6666 8.53325 10.6666H3.46659C2.71985 10.6666 2.34648 10.6666 2.06127 10.5213C1.81038 10.3935 1.60641 10.1895 1.47858 9.93865C1.33325 9.65345 1.33325 9.28005 1.33325 8.53331V3.46665Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
<path d="M5.33325 7.46665C5.33325 6.71991 5.33325 6.34654 5.47858 6.06133C5.60641 5.81044 5.81038 5.60647 6.06127 5.47864C6.34648 5.33331 6.71985 5.33331 7.46659 5.33331H12.5333C13.28 5.33331 13.6534 5.33331 13.9386 5.47864C14.1895 5.60647 14.3935 5.81044 14.5213 6.06133C14.6666 6.34654 14.6666 6.71991 14.6666 7.46665V12.5333C14.6666 13.28 14.6666 13.6534 14.5213 13.9386C14.3935 14.1895 14.1895 14.3935 13.9386 14.5213C13.6534 14.6666 13.28 14.6666 12.5333 14.6666H7.46659C6.71985 14.6666 6.34648 14.6666 6.06127 14.5213C5.81038 14.3935 5.60641 14.1895 5.47858 13.9386C5.33325 13.6534 5.33325 13.28 5.33325 12.5333V7.46665Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
</g>
<defs>
<clipPath id="clip0_211_179">
<rect width="16" height="16" fill="white" />
</clipPath>
</defs>
</svg>
`,
linkExternal: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21 9L21 3M21 3H15M21 3L13 11M10 5H7.8C6.11984 5 5.27976 5 4.63803 5.32698C4.07354 5.6146 3.6146 6.07354 3.32698 6.63803C3 7.27976 3 8.11984 3 9.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21H14.2C15.8802 21 16.7202 21 17.362 20.673C17.9265 20.3854 18.3854 19.9265 18.673 19.362C19 18.7202 19 17.8802 19 16.2V14" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
locked: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.3333 7.33333V5.33333C11.3333 3.49239 9.84093 2 8 2C6.15905 2 4.66667 3.49239 4.66667 5.33333C4.66667 5.33333 4.66667 6.55228 4.66667 7.33333" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
<path d="M5.86667 14H10.1333C11.2535 14 11.8135 14 12.2413 13.782C12.6177 13.5903 12.9236 13.2843 13.1153 12.908C13.3333 12.4801 13.3333 11.9201 13.3333 10.8V10.5333C13.3333 9.41321 13.3333 8.85321 13.1153 8.42534C12.9236 8.04901 12.6177 7.74308 12.2413 7.55134C11.8135 7.33334 11.2535 7.33334 10.1333 7.33334H5.86667C4.74656 7.33334 4.18651 7.33334 3.75869 7.55134C3.38236 7.74308 3.0764 8.04901 2.88465 8.42534C2.66667 8.85321 2.66667 9.41321 2.66667 10.5333V10.8C2.66667 11.9201 2.66667 12.4801 2.88465 12.908C3.0764 13.2843 3.38236 13.5903 3.75869 13.782C4.18651 14 4.74656 14 5.86667 14Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
</svg>`,
unlocked: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.66666 7.33333V5.33333C4.66666 3.49239 6.15905 2 8 2C9.61266 2 10.9578 3.14517 11.2667 4.66667M5.86666 14H10.1333C11.2535 14 11.8135 14 12.2413 13.782C12.6177 13.5903 12.9236 13.2843 13.1153 12.908C13.3333 12.4801 13.3333 11.9201 13.3333 10.8V10.5333C13.3333 9.4132 13.3333 8.8532 13.1153 8.42533C12.9236 8.049 12.6177 7.74307 12.2413 7.55133C11.8135 7.33333 11.2535 7.33333 10.1333 7.33333H5.86666C4.74656 7.33333 4.1865 7.33333 3.75868 7.55133C3.38236 7.74307 3.0764 8.049 2.88465 8.42533C2.66666 8.8532 2.66666 9.4132 2.66666 10.5333V10.8C2.66666 11.9201 2.66666 12.4801 2.88465 12.908C3.0764 13.2843 3.38236 13.5903 3.75868 13.782C4.1865 14 4.74656 14 5.86666 14Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
</svg>`,
rhombus: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.88562 9.88559C2.22559 9.22556 1.89557 8.89554 1.77193 8.515C1.66316 8.18026 1.66316 7.81968 1.77193 7.48494C1.89557 7.1044 2.22559 6.77438 2.88562 6.11435L6.18545 2.81452C6.8455 2.15447 7.17548 1.82449 7.55605 1.70082C7.89079 1.59205 8.25136 1.59207 8.58609 1.70084C8.96664 1.82448 9.29666 2.15449 9.95669 2.81452L13.2565 6.11435C13.9166 6.7744 14.2465 7.10438 14.3702 7.48496C14.479 7.8197 14.479 8.18024 14.3702 8.51498C14.2465 8.89556 13.9166 9.22554 13.2565 9.88559L9.95669 13.1854C9.29666 13.8454 8.96664 14.1755 8.58609 14.2991C8.25136 14.4079 7.89079 14.4079 7.55605 14.2991C7.17548 14.1754 6.8455 13.8455 6.18545 13.1854L2.88562 9.88559Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
atom: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9995 12.0001H12.0095M15.535 15.5357C10.8488 20.222 5.46685 22.438 3.51423 20.4854C1.56161 18.5328 3.77769 13.1509 8.46398 8.46461C13.1503 3.77832 18.5322 1.56224 20.4848 3.51486C22.4374 5.46748 20.2213 10.8494 15.535 15.5357ZM15.535 8.46443C20.2213 13.1507 22.4374 18.5326 20.4848 20.4852C18.5321 22.4379 13.1502 20.2218 8.46394 15.5355C3.77765 10.8492 1.56157 5.4673 3.51419 3.51468C5.46681 1.56206 10.8487 3.77814 15.535 8.46443ZM12.4995 12.0001C12.4995 12.2763 12.2757 12.5001 11.9995 12.5001C11.7234 12.5001 11.4995 12.2763 11.4995 12.0001C11.4995 11.724 11.7234 11.5001 11.9995 11.5001C12.2757 11.5001 12.4995 11.724 12.4995 12.0001Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
codeSnippet: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.6667 12L14.6667 8L10.6667 4M5.33333 4L1.33333 8L5.33333 12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
thumbsUp: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.66667 14.6667V7.33334M1.33334 8.66668V13.3333C1.33334 14.0697 1.93029 14.6667 2.66667 14.6667H11.6175C12.6047 14.6667 13.4441 13.9465 13.5943 12.9708L14.3122 8.30414C14.4986 7.09261 13.5612 6.00001 12.3355 6.00001H10C9.6318 6.00001 9.33334 5.70153 9.33334 5.33334V2.97724C9.33334 2.06934 8.59734 1.33334 7.68947 1.33334C7.47287 1.33334 7.27667 1.46088 7.18874 1.65876L4.84263 6.93741C4.73563 7.17821 4.49688 7.33334 4.23342 7.33334H2.66667C1.93029 7.33334 1.33334 7.93028 1.33334 8.66668Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
thumbsUpFilled: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.66666 14.6667V7.33334ZM1.33333 8.66668V13.3333C1.33333 14.0697 1.93028 14.6667 2.66666 14.6667H11.6175C12.6047 14.6667 13.4441 13.9465 13.5943 12.9708L14.3122 8.30414C14.4986 7.09261 13.5612 6.00001 12.3355 6.00001H10C9.6318 6.00001 9.33333 5.70153 9.33333 5.33334V2.97724C9.33333 2.06934 8.59733 1.33334 7.68946 1.33334C7.47286 1.33334 7.27666 1.46088 7.18873 1.65876L4.84262 6.93741C4.73562 7.17821 4.49688 7.33334 4.23342 7.33334H2.66666C1.93028 7.33334 1.33333 7.93028 1.33333 8.66668Z" fill="currentColor"/>
<path d="M4.66666 14.6667V7.33334M1.33333 8.66668V13.3333C1.33333 14.0697 1.93028 14.6667 2.66666 14.6667H11.6175C12.6047 14.6667 13.4441 13.9465 13.5943 12.9708L14.3122 8.30414C14.4986 7.09261 13.5612 6.00001 12.3355 6.00001H10C9.6318 6.00001 9.33333 5.70153 9.33333 5.33334V2.97724C9.33333 2.06934 8.59733 1.33334 7.68946 1.33334C7.47286 1.33334 7.27666 1.46088 7.18873 1.65876L4.84262 6.93741C4.73562 7.17821 4.49688 7.33334 4.23342 7.33334H2.66666C1.93028 7.33334 1.33333 7.93028 1.33333 8.66668Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
thumbsDown: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.3334 1.33334V8.66668M14.6667 6.53334V3.46668C14.6667 2.71994 14.6667 2.34657 14.5214 2.06136C14.3935 1.81047 14.1896 1.6065 13.9387 1.47867C13.6535 1.33334 13.2801 1.33334 12.5334 1.33334H5.41204C4.43772 1.33334 3.95056 1.33334 3.55709 1.51163C3.2103 1.66877 2.91557 1.92162 2.70753 2.24049C2.47148 2.60227 2.39741 3.08377 2.24926 4.04676L1.90054 6.31342C1.70514 7.58354 1.60743 8.21861 1.79591 8.71274C1.96133 9.14648 2.27247 9.50914 2.67599 9.73861C3.13572 10 3.77826 10 5.06333 10H5.60004C5.97341 10 6.16009 10 6.3027 10.0727C6.42814 10.1366 6.53013 10.2385 6.59404 10.364C6.66674 10.5066 6.66674 10.6933 6.66674 11.0667V13.0228C6.66674 13.9307 7.40267 14.6667 8.3106 14.6667C8.52714 14.6667 8.7234 14.5391 8.81134 14.3413L11.0519 9.30014C11.1537 9.07081 11.2047 8.95621 11.2852 8.87214C11.3564 8.79781 11.4439 8.74101 11.5407 8.70614C11.6502 8.66668 11.7757 8.66668 12.0265 8.66668H12.5334C13.2801 8.66668 13.6535 8.66668 13.9387 8.52134C14.1896 8.39354 14.3935 8.18954 14.5214 7.93868C14.6667 7.65348 14.6667 7.28008 14.6667 6.53334Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
thumbsDownFilled: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.3334 1.33334V8.66668ZM14.6667 6.53334V3.46668C14.6667 2.71994 14.6667 2.34657 14.5214 2.06136C14.3935 1.81047 14.1896 1.6065 13.9387 1.47867C13.6535 1.33334 13.2801 1.33334 12.5334 1.33334H5.41204C4.43772 1.33334 3.95056 1.33334 3.55708 1.51163C3.2103 1.66877 2.91556 1.92162 2.70752 2.24049C2.47148 2.60227 2.3974 3.08377 2.24925 4.04676L1.90053 6.31342C1.70513 7.58354 1.60742 8.21861 1.7959 8.71274C1.96132 9.14648 2.27246 9.50914 2.67598 9.73861C3.13572 10 3.77826 10 5.06332 10H5.60003C5.9734 10 6.16008 10 6.30269 10.0727C6.42814 10.1366 6.53012 10.2385 6.59404 10.364C6.66673 10.5066 6.66673 10.6933 6.66673 11.0667V13.0228C6.66673 13.9307 7.40266 14.6667 8.3106 14.6667C8.52713 14.6667 8.7234 14.5391 8.81133 14.3413L11.0519 9.30014C11.1537 9.07081 11.2047 8.95621 11.2852 8.87214C11.3564 8.79781 11.4439 8.74101 11.5407 8.70614C11.6502 8.66668 11.7757 8.66668 12.0265 8.66668H12.5334C13.2801 8.66668 13.6535 8.66668 13.9387 8.52134C14.1896 8.39354 14.3935 8.18954 14.5214 7.93868C14.6667 7.65348 14.6667 7.28008 14.6667 6.53334Z" fill="currentColor"/>
<path d="M11.3334 1.33334V8.66668M14.6667 6.53334V3.46668C14.6667 2.71994 14.6667 2.34657 14.5214 2.06136C14.3935 1.81047 14.1896 1.6065 13.9387 1.47867C13.6535 1.33334 13.2801 1.33334 12.5334 1.33334H5.41204C4.43772 1.33334 3.95056 1.33334 3.55708 1.51163C3.2103 1.66877 2.91556 1.92162 2.70752 2.24049C2.47148 2.60227 2.3974 3.08377 2.24925 4.04676L1.90053 6.31342C1.70513 7.58354 1.60742 8.21861 1.7959 8.71274C1.96132 9.14648 2.27246 9.50914 2.67598 9.73861C3.13572 10 3.77826 10 5.06332 10H5.60003C5.9734 10 6.16008 10 6.30269 10.0727C6.42814 10.1366 6.53012 10.2385 6.59404 10.364C6.66673 10.5066 6.66673 10.6933 6.66673 11.0667V13.0228C6.66673 13.9307 7.40266 14.6667 8.3106 14.6667C8.52713 14.6667 8.7234 14.5391 8.81133 14.3413L11.0519 9.30014C11.1537 9.07081 11.2047 8.95621 11.2852 8.87214C11.3564 8.79781 11.4439 8.74101 11.5407 8.70614C11.6502 8.66668 11.7757 8.66668 12.0265 8.66668H12.5334C13.2801 8.66668 13.6535 8.66668 13.9387 8.52134C14.1896 8.39354 14.3935 8.18954 14.5214 7.93868C14.6667 7.65348 14.6667 7.28008 14.6667 6.53334Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
check: o`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
vaadinLogo: o`
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 3C2.55 3 2.25 3.3 2.25 3.75V5.625C2.25 7.05 3.45 8.25 4.875 8.25H10.1997C10.7997 8.25 11.25 8.70029 11.25 9.30029V9.75C11.25 10.2 11.55 10.5 12 10.5C12.45 10.5 12.75 10.2 12.75 9.75V9.30029C12.75 8.70029 13.2003 8.25 13.8003 8.25H19.125C20.55 8.25 21.75 7.05 21.75 5.625V3.75C21.75 3.3 21.45 3 21 3C20.55 3 20.25 3.3 20.25 3.75V4.19971C20.25 4.79971 19.7997 5.25 19.1997 5.25H14.25C12.975 5.25 12 6.225 12 7.5C12 6.225 11.025 5.25 9.75 5.25H4.80029C4.20029 5.25 3.75 4.79971 3.75 4.19971V3.75C3.75 3.3 3.45 3 3 3ZM7.76367 11.2705C7.62187 11.2834 7.48184 11.3244 7.35059 11.3994C6.82559 11.6994 6.59941 12.3744 6.89941 12.8994L11.0244 20.3994C11.1744 20.7744 11.625 21 12 21C12.375 21 12.8256 20.7744 12.9756 20.3994L17.1006 12.8994C17.4006 12.3744 17.1744 11.6994 16.6494 11.3994C16.1244 11.0994 15.4494 11.3256 15.1494 11.8506L12 17.5503L8.85059 11.8506C8.62559 11.4568 8.18906 11.2318 7.76367 11.2705Z" fill="currentColor"/>
</svg>
`,
cancel: o`
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8 9.6C8 9.03995 8 8.75992 8.10899 8.54601C8.20487 8.35785 8.35785 8.20487 8.54601 8.10899C8.75992 8 9.03995 8 9.6 8H14.4C14.9601 8 15.2401 8 15.454 8.10899C15.6422 8.20487 15.7951 8.35785 15.891 8.54601C16 8.75992 16 9.03995 16 9.6V14.4C16 14.9601 16 15.2401 15.891 15.454C15.7951 15.6422 15.6422 15.7951 15.454 15.891C15.2401 16 14.9601 16 14.4 16H9.6C9.03995 16 8.75992 16 8.54601 15.891C8.35785 15.7951 8.20487 15.6422 8.10899 15.454C8 15.2401 8 14.9601 8 14.4V9.6Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
x: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.3333 4.66666L4.66667 11.3333M4.66667 4.66666L11.3333 11.3333" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
rotatingSpinner: o`
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25" fill="currentColor"/>
<path fill="currentColor" d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z">
<animateTransform attributeName="transform" type="rotate" dur="0.75s" values="0 12 12;360 12 12" repeatCount="indefinite"/>
</path>
</svg>
`,
dockLeft: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 2V14M5.2 2H10.8C11.9201 2 12.4801 2 12.908 2.21799C13.2843 2.40973 13.5903 2.71569 13.782 3.09202C14 3.51984 14 4.07989 14 5.2V10.8C14 11.9201 14 12.4801 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.4801 14 11.9201 14 10.8 14H5.2C4.07989 14 3.51984 14 3.09202 13.782C2.71569 13.5903 2.40973 13.2843 2.21799 12.908C2 12.4801 2 11.9201 2 10.8V5.2C2 4.07989 2 3.51984 2.21799 3.09202C2.40973 2.71569 2.71569 2.40973 3.09202 2.21799C3.51984 2 4.07989 2 5.2 2Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
dockBottom: o`
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 15H21M7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
dockRight: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 2V14M5.2 2H10.8C11.9201 2 12.4801 2 12.908 2.21799C13.2843 2.40973 13.5903 2.71569 13.782 3.09202C14 3.51984 14 4.07989 14 5.2V10.8C14 11.9201 14 12.4801 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.4801 14 11.9201 14 10.8 14H5.2C4.07989 14 3.51984 14 3.09202 13.782C2.71569 13.5903 2.40973 13.2843 2.21799 12.908C2 12.4801 2 11.9201 2 10.8V5.2C2 4.07989 2 3.51984 2.21799 3.09202C2.40973 2.71569 2.71569 2.40973 3.09202 2.21799C3.51984 2 4.07989 2 5.2 2Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
tabOrder: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 14V2M2 8H11.3333M11.3333 8L6.66667 3.33333M11.3333 8L6.66667 12.6667" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
terminal: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 17L10 11L4 5M12 19H20" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
undo: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 6.00001H11C12.6569 6.00001 14 7.34314 14 9.00001C14 10.6569 12.6569 12 11 12H8M2 6.00001L4.66667 3.33334M2 6.00001L4.66667 8.66668" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
redo: o`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 6.00001H5C3.34315 6.00001 2 7.34314 2 9.00001C2 10.6569 3.34315 12 5 12H8M14 6.00001L11.3333 3.33334M14 6.00001L11.3333 8.66668" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
userUp: o`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 18L19 15M19 15L22 18M19 15V21M12 15.5H7.5C6.10444 15.5 5.40665 15.5 4.83886 15.6722C3.56045 16.06 2.56004 17.0605 2.17224 18.3389C2 18.9067 2 19.6044 2 21M14.5 7.5C14.5 9.98528 12.4853 12 10 12C7.51472 12 5.5 9.98528 5.5 7.5C5.5 5.01472 7.51472 3 10 3C12.4853 3 14.5 5.01472 14.5 7.5Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
userLeft: o`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 21L16 18M16 18L19 15M16 18H22M12 15.5H7.5C6.10444 15.5 5.40665 15.5 4.83886 15.6722C3.56045 16.06 2.56004 17.0605 2.17224 18.3389C2 18.9067 2 19.6044 2 21M14.5 7.5C14.5 9.98528 12.4853 12 10 12C7.51472 12 5.5 9.98528 5.5 7.5C5.5 5.01472 7.51472 3 10 3C12.4853 3 14.5 5.01472 14.5 7.5Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
userRight: o`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 21L22 18M22 18L19 15M22 18H16M12 15.5H7.5C6.10444 15.5 5.40665 15.5 4.83886 15.6722C3.56045 16.06 2.56004 17.0605 2.17224 18.3389C2 18.9067 2 19.6044 2 21M14.5 7.5C14.5 9.98528 12.4853 12 10 12C7.51472 12 5.5 9.98528 5.5 7.5C5.5 5.01472 7.51472 3 10 3C12.4853 3 14.5 5.01472 14.5 7.5Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
padding: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2H4M12 14H4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="5.5" y="5.5" width="5" height="5" rx="1.5" stroke="currentColor"/>
<path d="M14 12V4M2 12V4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
paddingTop: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2H4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="5.5" y="5.5" width="5" height="5" rx="1.5" stroke="currentColor"/>
</svg>
`,
paddingRight: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="5.5" y="5.5" width="5" height="5" rx="1.5" stroke="currentColor"/>
<path d="M14 12V4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
paddingBottom: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 14H4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="5.5" y="5.5" width="5" height="5" rx="1.5" stroke="currentColor"/>
</svg>
`,
paddingLeft: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="5.5" y="5.5" width="5" height="5" rx="1.5" stroke="currentColor"/>
<path d="M2 12V4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
paddingVertical: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2H4M12 14H4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="5.5" y="5.5" width="5" height="5" rx="1.5" stroke="currentColor"/>
</svg>
`,
paddingHorizontal: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="5.5" y="5.5" width="5" height="5" rx="1.5" stroke="currentColor"/>
<path d="M14 12V4M2 12V4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
maximize: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.33333 2H5.2C4.07989 2 3.51984 2 3.09202 2.21799C2.71569 2.40973 2.40973 2.71569 2.21799 3.09202C2 3.51984 2 4.07989 2 5.2V5.33333M5.33333 14H5.2C4.07989 14 3.51984 14 3.09202 13.782C2.71569 13.5903 2.40973 13.2843 2.21799 12.908C2 12.4801 2 11.9201 2 10.8V10.6667M14 5.33333V5.2C14 4.07989 14 3.51984 13.782 3.09202C13.5903 2.71569 13.2843 2.40973 12.908 2.21799C12.4801 2 11.9201 2 10.8 2H10.6667M14 10.6667V10.8C14 11.9201 14 12.4801 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.4801 14 11.9201 14 10.8 14H10.6667" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
gapHorizontal: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 14V2M2 14V2M6 5.33333V10.6667C6 11.2879 6 11.5985 6.10149 11.8436C6.23682 12.1703 6.49639 12.4299 6.82307 12.5652C7.06813 12.6667 7.37873 12.6667 8 12.6667C8.62127 12.6667 8.93187 12.6667 9.17693 12.5652C9.5036 12.4299 9.7632 12.1703 9.89853 11.8436C10 11.5985 10 11.2879 10 10.6667V5.33333C10 4.71208 10 4.40145 9.89853 4.15642C9.7632 3.82972 9.5036 3.57015 9.17693 3.43483C8.93187 3.33333 8.62127 3.33333 8 3.33333C7.37873 3.33333 7.06813 3.33333 6.82307 3.43483C6.49639 3.57015 6.23682 3.82972 6.10149 4.15642C6 4.40145 6 4.71208 6 5.33333Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
gapVertical: o`
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 2H2M14 14H2M3.33333 8C3.33333 7.37873 3.33333 7.06813 3.43483 6.82307C3.57015 6.49639 3.82972 6.23682 4.15642 6.10149C4.40145 6 4.71208 6 5.33333 6H10.6667C11.2879 6 11.5985 6 11.8436 6.10149C12.1703 6.23682 12.4299 6.49639 12.5652 6.82307C12.6667 7.06813 12.6667 7.37873 12.6667 8C12.6667 8.62127 12.6667 8.93187 12.5652 9.17693C12.4299 9.5036 12.1703 9.7632 11.8436 9.89853C11.5985 10 11.2879 10 10.6667 10H5.33333C4.71208 10 4.40145 10 4.15642 9.89853C3.82972 9.7632 3.57015 9.5036 3.43483 9.17693C3.33333 8.93187 3.33333 8.62127 3.33333 8Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`,
select: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21 9.5V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21H9.5M17.3862 17.7113L15.6879 20.8653C15.4103 21.3808 15.2715 21.6386 15.1023 21.7059C14.9555 21.7643 14.7896 21.7498 14.6551 21.6668C14.5001 21.5712 14.4081 21.2933 14.2241 20.7375L11.5004 12.5113C11.3392 12.0245 11.2586 11.7812 11.3166 11.6191C11.367 11.478 11.478 11.367 11.6191 11.3166C11.7812 11.2586 12.0245 11.3392 12.5113 11.5004L20.7374 14.2241C21.2933 14.4082 21.5712 14.5002 21.6668 14.6551C21.7498 14.7897 21.7642 14.9555 21.7058 15.1024C21.6386 15.2715 21.3808 15.4103 20.8652 15.6879L17.7113 17.3862C17.6328 17.4285 17.5935 17.4497 17.5591 17.4768C17.5286 17.501 17.501 17.5286 17.4768 17.5591C17.4497 17.5935 17.4285 17.6328 17.3862 17.7113Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
click: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9 3.5V2M5.06066 5.06066L4 4M5.06066 13L4 14.0607M13 5.06066L14.0607 4M3.5 9H2M15.8645 16.1896L13.3727 20.817C13.0881 21.3457 12.9457 21.61 12.7745 21.6769C12.6259 21.7349 12.4585 21.7185 12.324 21.6328C12.1689 21.534 12.0806 21.2471 11.9038 20.6733L8.44519 9.44525C8.3008 8.97651 8.2286 8.74213 8.28669 8.58383C8.33729 8.44595 8.44595 8.33729 8.58383 8.2867C8.74213 8.22861 8.9765 8.3008 9.44525 8.44519L20.6732 11.9038C21.247 12.0806 21.5339 12.169 21.6327 12.324C21.7185 12.4586 21.7348 12.6259 21.6768 12.7745C21.61 12.9458 21.3456 13.0881 20.817 13.3728L16.1896 15.8645C16.111 15.9068 16.0717 15.9279 16.0374 15.9551C16.0068 15.9792 15.9792 16.0068 15.9551 16.0374C15.9279 16.0717 15.9068 16.111 15.8645 16.1896Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
wrap: o`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21 9.25H15M21 4H3M21 14.75H15M21 20H3M4.6 16H9.4C9.96005 16 10.2401 16 10.454 15.891C10.6422 15.7951 10.7951 15.6422 10.891 15.454C11 15.2401 11 14.9601 11 14.4V9.6C11 9.03995 11 8.75992 10.891 8.54601C10.7951 8.35785 10.6422 8.20487 10.454 8.10899C10.2401 8 9.96005 8 9.4 8H4.6C4.03995 8 3.75992 8 3.54601 8.10899C3.35785 8.20487 3.20487 8.35785 3.10899 8.54601C3 8.75992 3 9.03995 3 9.6V14.4C3 14.9601 3 15.2401 3.10899 15.454C3.20487 15.6422 3.35785 15.7951 3.54601 15.891C3.75992 16 4.03995 16 4.6 16Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`,
link: o`
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`
};
export {
r as i
};
@@ -0,0 +1,62 @@
import { P as h } from "./copilot-ppBO0zjz.js";
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const i = (t, e, a) => (a.configurable = !0, a.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, a), a);
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function p(t, e) {
return (a, r, d) => {
const l = (o) => o.renderRoot?.querySelector(t) ?? null;
if (e) {
const { get: o, set: s } = typeof r == "object" ? a : d ?? (() => {
const n = Symbol();
return { get() {
return this[n];
}, set(m) {
this[n] = m;
} };
})();
return i(a, r, { get() {
let n = o.call(this);
return n === void 0 && (n = l(this), (n !== null || this.hasUpdated) && s.call(this, n)), n;
} });
}
return i(a, r, { get() {
return l(this);
} });
};
}
function b(t) {
t.querySelectorAll(
"vaadin-context-menu, vaadin-menu-bar, vaadin-menu-bar-submenu, vaadin-select, vaadin-combo-box, vaadin-tooltip, vaadin-dialog, vaadin-multi-select-combo-box"
).forEach((e) => {
e?.$?.comboBox && (e = e.$.comboBox);
let a = e.shadowRoot?.querySelector(
`${e.localName}-overlay, ${e.localName}-submenu, vaadin-menu-bar-overlay`
);
a?.localName === "vaadin-menu-bar-submenu" && (a = a.shadowRoot.querySelector("vaadin-menu-bar-overlay")), a ? a._attachOverlay = c.bind(a) : e.$?.overlay && (e.$.overlay._attachOverlay = c.bind(e.$.overlay));
});
}
function u() {
return document.querySelector(`${h}main`).shadowRoot;
}
const v = () => Array.from(u().children).filter((e) => e._hasOverlayStackMixin && !e.hasAttribute("closing")).sort((e, a) => e.__zIndex - a.__zIndex || 0), y = (t) => t === v().pop();
function c() {
const t = this;
t._placeholder = document.createComment("vaadin-overlay-placeholder"), t.parentNode.insertBefore(t._placeholder, t), u().appendChild(t), t.hasOwnProperty("_last") || Object.defineProperty(t, "_last", {
// Only returns odd die sides
get() {
return y(this);
}
}), t.bringToFront(), requestAnimationFrame(() => b(t));
}
export {
p as e,
b as m
};
@@ -0,0 +1,205 @@
function K(e) {
return e === void 0 ? !1 : e.nodeId >= 0;
}
function L(e) {
if (e.javaClass)
return e.javaClass.substring(e.javaClass.lastIndexOf(".") + 1);
}
function k(e) {
const t = window.Vaadin;
if (t && t.Flow) {
const { clients: n } = t.Flow, r = Object.keys(n);
for (const o of r) {
const a = n[o];
if (a.getNodeId) {
const u = a.getNodeId(e);
if (u >= 0) {
const l = a.getNodeInfo(u);
return { nodeId: u, uiId: a.getUIId(), element: e, javaClass: l.javaClass, styles: l.styles };
}
}
}
}
}
function V() {
const e = window.Vaadin;
let t;
if (e && e.Flow) {
const { clients: n } = e.Flow, r = Object.keys(n);
for (const o of r) {
const a = n[o];
a.getUIId && (t = a.getUIId());
}
}
return t;
}
function W(e) {
return {
uiId: e.uiId,
nodeId: e.nodeId
};
}
function q(e) {
return e ? e.type?.type === "FlowContainer" : !1;
}
const _ = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), C = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), R = Symbol.for("react.lazy");
function P(e, t, n) {
const r = e.displayName;
if (r)
return r;
const o = t.displayName || t.name || "";
return o !== "" ? `${n}(${o})` : n;
}
function f(e) {
return e.displayName || "Context";
}
function i(e) {
if (e == null)
return null;
if (typeof e == "function")
return e.displayName || e.name || null;
if (typeof e == "string")
return e;
switch (e) {
case g:
return "Fragment";
case _:
return "Portal";
case I:
return "Profiler";
case S:
return "StrictMode";
case T:
return "Suspense";
case N:
return "SuspenseList";
}
if (typeof e == "object")
switch (e.$$typeof) {
case C:
return `${f(e)}.Consumer`;
case E:
return `${f(e._context)}.Provider`;
case d:
return P(e, e.render, "ForwardRef");
case F:
const t = e.displayName || null;
return t !== null ? t : i(e.type) || "Memo";
case R: {
const n = e, r = n._payload, o = n._init;
try {
return i(o(r));
} catch {
return null;
}
}
}
return null;
}
let s;
function z() {
const e = /* @__PURE__ */ new Set();
return Array.from(document.body.querySelectorAll("*")).flatMap(A).filter(h).filter((n) => !n.fileName.endsWith("frontend/generated/flow/Flow.tsx")).forEach((n) => e.add(n.fileName)), Array.from(e);
}
function h(e) {
return !!e && e.fileName;
}
function v(e) {
return e?._debugSource || void 0;
}
function w(e) {
if (e && e.type?.__debugSourceDefine)
return e.type.__debugSourceDefine;
}
function A(e) {
return v(p(e));
}
function b() {
return `__reactFiber$${m()}`;
}
function O() {
return `__reactContainer$${m()}`;
}
function m() {
if (!(!s && (s = Array.from(document.querySelectorAll("*")).flatMap((e) => Object.keys(e)).filter((e) => e.startsWith("__reactFiber$")).map((e) => e.replace("__reactFiber$", "")).find((e) => e), !s)))
return s;
}
function $(e) {
const t = e.type;
return t?.$$typeof === d && !t.displayName && e.child ? $(e.child) : i(e.type) ?? i(e.elementType) ?? "???";
}
function G() {
const e = Array.from(document.querySelectorAll("body > *")).flatMap((n) => n[O()]).find((n) => n), t = c(e);
return c(t?.child);
}
function Y(e) {
const t = [];
let n = c(e.child);
for (; n; )
t.push(n), n = c(n.sibling);
return t;
}
const j = (e) => {
const t = Y(e);
if (t.length === 0)
return [];
const n = t.filter((r) => D(r) || U(r));
return n.length === t.length ? t : t.flatMap((r) => n.includes(r) ? r : j(r));
};
function M(e) {
return e.hasOwnProperty("entanglements") && e.hasOwnProperty("containerInfo");
}
function x(e) {
return e.hasOwnProperty("stateNode") && e.hasOwnProperty("pendingProps");
}
function c(e) {
const t = e?.stateNode;
if (t?.current && (M(t) || x(t)))
return t?.current;
if (!e)
return;
if (!e.alternate)
return e;
const n = e.alternate, r = e?.actualStartTime, o = n?.actualStartTime;
return o !== r && o > r ? n : e;
}
function p(e) {
const t = b(), n = c(e[t]);
if (n?._debugSource)
return n;
let r = n?.return || void 0;
for (; r && !r._debugSource; )
r = r.return || void 0;
return r;
}
function y(e) {
if (e.stateNode?.isConnected === !0)
return e.stateNode;
if (e.child)
return y(e.child);
}
function D(e) {
const t = y(e);
return t && c(p(t)) === e;
}
function U(e) {
return typeof e.type != "function" ? !1 : !!(e._debugSource || w(e));
}
export {
w as a,
W as b,
q as c,
y as d,
D as e,
j as f,
v as g,
$ as h,
K as i,
k as j,
L as k,
G as l,
c as m,
p as n,
z as o,
V as p
};
@@ -0,0 +1,45 @@
import { R as p, S as u } from "./copilot-ppBO0zjz.js";
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const l = { attribute: !0, type: String, converter: p, reflect: !1, hasChanged: u }, d = (t = l, o, e) => {
const { kind: s, metadata: a } = e;
let n = globalThis.litPropertyMetadata.get(a);
if (n === void 0 && globalThis.litPropertyMetadata.set(a, n = /* @__PURE__ */ new Map()), n.set(e.name, t), s === "accessor") {
const { name: r } = e;
return { set(i) {
const c = o.get.call(this);
o.set.call(this, i), this.requestUpdate(r, c, t);
}, init(i) {
return i !== void 0 && this.P(r, void 0, t), i;
} };
}
if (s === "setter") {
const { name: r } = e;
return function(i) {
const c = this[r];
o.call(this, i), this.requestUpdate(r, c, t);
};
}
throw Error("Unsupported decorator location: " + s);
};
function h(t) {
return (o, e) => typeof e == "object" ? d(t, o, e) : ((s, a, n) => {
const r = a.hasOwnProperty(n);
return a.constructor.createProperty(n, r ? { ...s, wrapped: !0 } : s), r ? Object.getOwnPropertyDescriptor(a, n) : void 0;
})(t, o, e);
}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function g(t) {
return h({ ...t, state: !0, attribute: !1 });
}
export {
h as n,
g as r
};
@@ -171,9 +171,9 @@ window.Vaadin.Flow.datepickerConnector.initLazy = (datepicker) => {
const usedFormats = hasCustomFormats ? i18n.dateFormats : [createLocaleBasedDateFormat(locale)];
const formatterAndParser = createFormatterAndParser(usedFormats);
// Merge new I18N settings with formatting and parsing functions
datepicker.i18n = Object.assign({}, i18n, formatterAndParser);
// Merge current web component I18N settings with new I18N settings and the formatting and parsing functions
datepicker.i18n = Object.assign({}, datepicker.i18n, i18n, formatterAndParser);
};
datepicker.addEventListener('opened-changed', () => (datepicker.$connector._lastParseStatus = undefined));
};
}
@@ -92,25 +92,10 @@ window.Vaadin.Flow.dndConnector = {
}
event.currentTarget.classList.add('v-dragged');
}
if (event.currentTarget.__dragImage) {
if (event.currentTarget.__dragImage.style.display === 'none') {
event.currentTarget.__dragImage.style.display = 'block';
event.currentTarget.classList.add('shown');
}
event.dataTransfer.setDragImage(
event.currentTarget.__dragImage,
event.currentTarget.__dragImageOffsetX,
event.currentTarget.__dragImageOffsetY
);
}
},
__dragendListener: function (event) {
event.currentTarget.classList.remove('v-dragged');
if (event.currentTarget.classList.contains('shown')) {
event.currentTarget.classList.remove('shown');
event.currentTarget.__dragImage.style.display = 'none';
}
},
updateDragSource: function (element) {
@@ -121,11 +106,5 @@ window.Vaadin.Flow.dndConnector = {
element.removeEventListener('dragstart', this.__dragstartListener, false);
element.removeEventListener('dragend', this.__dragendListener, false);
}
},
setDragImage: function (dragImage, offsetX, offsetY, dragSource) {
dragSource.__dragImage = dragImage;
dragSource.__dragImageOffsetX = offsetX;
dragSource.__dragImageOffsetY = offsetY;
}
};
@@ -0,0 +1,208 @@
import '@polymer/polymer/lib/elements/dom-if.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js';
import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js';
import { idlePeriod } from '@polymer/polymer/lib/utils/async.js';
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
import { flowComponentDirective } from './flow-component-directive.js';
import { render, html as litHtml } from 'lit';
/**
* Returns the requested node in a form suitable for Lit template interpolation.
* @param {string} appid
* @param {number} nodeid
* @returns {any} a Lit directive
*/
function getNode(appid, nodeid) {
return flowComponentDirective(appid, nodeid);
}
/**
* Sets the nodes defined by the given node ids as the child nodes of the
* given root element.
* @param {string} appid
* @param {number[]} nodeIds
* @param {Element} root
*/
function setChildNodes(appid, nodeIds, root) {
render(litHtml`${nodeIds.map(id => flowComponentDirective(appid, id))}`, root);
}
/**
* SimpleElementBindingStrategy::addChildren uses insertBefore to add child
* elements to the container. When the children are manually placed under
* another element, the call to insertBefore can occasionally fail due to
* an invalid reference node.
*
* This is a temporary workaround which patches the container's native API
* to not fail when called with invalid arguments.
*/
function patchVirtualContainer(container) {
const originalInsertBefore = container.insertBefore;
container.insertBefore = function (newNode, referenceNode) {
if (referenceNode && referenceNode.parentNode === this) {
return originalInsertBefore.call(this, newNode, referenceNode);
} else {
return originalInsertBefore.call(this, newNode, null);
}
};
}
window.Vaadin ||= {};
window.Vaadin.FlowComponentHost ||= { patchVirtualContainer, getNode, setChildNodes };
class FlowComponentRenderer extends PolymerElement {
static get template() {
return html`
<style>
:host {
animation: 1ms flow-component-renderer-appear;
}
@keyframes flow-component-renderer-appear {
to {
opacity: 1;
}
}
</style>
<slot></slot>
`;
}
static get is() {
return 'flow-component-renderer';
}
static get properties() {
return {
nodeid: Number,
appid: String,
};
}
static get observers() {
return ['_attachRenderedComponentIfAble(appid, nodeid)'];
}
ready() {
super.ready();
this.addEventListener('click', function (event) {
if (
this.firstChild &&
typeof this.firstChild.click === 'function' &&
event.target === this
) {
event.stopPropagation();
this.firstChild.click();
}
});
this.addEventListener('animationend', this._onAnimationEnd);
}
_asyncAttachRenderedComponentIfAble() {
this._debouncer = Debouncer.debounce(this._debouncer, idlePeriod, () =>
this._attachRenderedComponentIfAble()
);
}
_attachRenderedComponentIfAble() {
if (this.appid == null) {
return;
}
if (this.nodeid == null) {
if (this.firstChild) {
this.removeChild(this.firstChild);
}
return;
}
const renderedComponent = this._getRenderedComponent();
if (this.firstChild) {
if (!renderedComponent) {
this._asyncAttachRenderedComponentIfAble();
} else if (this.firstChild !== renderedComponent) {
this.replaceChild(renderedComponent, this.firstChild);
this._defineFocusTarget();
this.onComponentRendered();
} else {
this._defineFocusTarget();
this.onComponentRendered();
}
} else {
if (renderedComponent) {
this.appendChild(renderedComponent);
this._defineFocusTarget();
this.onComponentRendered();
} else {
this._asyncAttachRenderedComponentIfAble();
}
}
}
_getRenderedComponent() {
try {
return window.Vaadin.Flow.clients[this.appid].getByNodeId(this.nodeid);
} catch (error) {
console.error(
'Could not get node %s from app %s',
this.nodeid,
this.appid
);
console.error(error);
}
return null;
}
onComponentRendered() {
// subclasses can override this method to execute custom logic on resize
}
/* Setting the `focus-target` attribute to the first focusable descendant
starting from the firstChild necessary for the focus to be delegated
within the flow-component-renderer when used inside a vaadin-grid cell */
_defineFocusTarget() {
var focusable = this._getFirstFocusableDescendant(this.firstChild);
if (focusable !== null) {
focusable.setAttribute('focus-target', 'true');
}
}
_getFirstFocusableDescendant(node) {
if (this._isFocusable(node)) {
return node;
}
if (node.hasAttribute && (node.hasAttribute('disabled') || node.hasAttribute('hidden'))) {
return null;
}
if (!node.children) {
return null;
}
for (var i = 0; i < node.children.length; i++) {
var focusable = this._getFirstFocusableDescendant(node.children[i]);
if (focusable !== null) {
return focusable;
}
}
return null;
}
_isFocusable(node) {
if (
node.hasAttribute &&
typeof node.hasAttribute === 'function' &&
(node.hasAttribute('disabled') || node.hasAttribute('hidden'))
) {
return false;
}
return node.tabIndex === 0;
}
_onAnimationEnd(e) {
// ShadyCSS applies scoping suffixes to animation names
// To ensure that child is attached once element is unhidden
// for when it was filtered out from, eg, ComboBox
// https://github.com/vaadin/vaadin-flow-components/issues/437
if (e.animationName.indexOf('flow-component-renderer-appear') === 0) {
this._attachRenderedComponentIfAble();
}
}
}
window.customElements.define(FlowComponentRenderer.is, FlowComponentRenderer);
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
export * from './Flow';
@@ -36,30 +36,30 @@ _window.Vaadin.setLitRenderer = (
propertyNamespace: string,
appId: string
) => {
const callablesCreator = (itemKey: string) => {
return clientCallables.map((clientCallable) => (...args: any[]) => {
if (itemKey !== undefined) {
returnChannel(clientCallable, itemKey, args[0] instanceof Event ? [] : [...args]);
}
});
};
const fnArgs = [
'html',
'root',
'live',
'appId',
'itemKey',
'model',
'item',
'index',
...clientCallables,
`return html\`${templateExpression}\``
];
const htmlGenerator = new Function(...fnArgs);
const renderFunction = (root: RenderRoot, model: ItemModel, itemKey: string) => {
const { item, index } = model;
render(htmlGenerator(html, root, live, appId, itemKey, model, item, index, ...callablesCreator(itemKey)), root);
};
// Dynamically created function that renders the templateExpression
// inside the given root element using Lit
const renderFunction = Function(`
"use strict";
const [render, html, live, appId, returnChannel] = arguments;
return (root, model, itemKey) => {
const { item, index } = model;
${clientCallables
.map((clientCallable) => {
// Map all the client-callables as inline functions so they can be accessed from the template literal
return `
const ${clientCallable} = (...args) => {
if (itemKey !== undefined) {
returnChannel('${clientCallable}', itemKey, args[0] instanceof Event ? [] : [...args]);
}
}`;
})
.join('')}
render(html\`${templateExpression}\`, root)
}
`)(render, html, live, appId, returnChannel);
const renderer: Renderer = (root, _, model) => {
const { item } = model;
@@ -0,0 +1,122 @@
/*
* 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 './contextMenuConnector.js';
/**
* Initializes the connector for a menu bar element.
*
* @param {HTMLElement} menubar
* @param {string} appId
*/
function initLazy(menubar, appId) {
if (menubar.$connector) {
return;
}
const observer = new MutationObserver((records) => {
const hasChangedAttributes = records.some((entry) => {
const oldValue = entry.oldValue;
const newValue = entry.target.getAttribute(entry.attributeName);
return oldValue !== newValue;
});
if (hasChangedAttributes) {
menubar.$connector.generateItems();
}
});
menubar.$connector = {
/**
* Generates and assigns the items to the menu bar.
*
* When the method is called without providing a node id,
* the previously generated items tree will be used.
* That can be useful if you only want to sync the disabled and hidden properties of root items.
*
* @param {number | undefined} nodeId
*/
generateItems(nodeId) {
if (!menubar.shadowRoot) {
// workaround for https://github.com/vaadin/flow/issues/5722
setTimeout(() => menubar.$connector.generateItems(nodeId));
return;
}
if (!menubar._container) {
// Menu-bar defers first buttons render to avoid re-layout
// See https://github.com/vaadin/web-components/issues/7271
queueMicrotask(() => menubar.$connector.generateItems(nodeId));
return;
}
if (nodeId) {
menubar.__generatedItems = window.Vaadin.Flow.contextMenuConnector.generateItemsTree(appId, nodeId);
}
let items = menubar.__generatedItems || [];
items.forEach((item) => {
// Propagate disabled state from items to parent buttons
item.disabled = item.component.disabled;
// Saving item to component because `_item` can be reassigned to a new value
// when the component goes to the overflow menu
item.component._rootItem = item;
});
// Observe for hidden and disabled attributes in case they are changed by Flow.
// When a change occurs, the observer will re-generate items on top of the existing tree
// to sync the new attribute values with the corresponding properties in the items array.
items.forEach((item) => {
observer.observe(item.component, {
attributeFilter: ['hidden', 'disabled'],
attributeOldValue: true
});
});
// Remove hidden items entirely from the array. Just hiding them
// could cause the overflow button to be rendered without items.
//
// The items-prop needs to be set even when all items are visible
// to update the disabled state and re-render buttons.
items = items.filter((item) => !item.component.hidden);
menubar.items = items;
// Propagate click events from the menu buttons to the item components
menubar._buttons.forEach((button) => {
if (button.item && button.item.component) {
button.addEventListener('click', (e) => {
if (e.composedPath().indexOf(button.item.component) === -1) {
button.item.component.click();
e.stopPropagation();
}
});
}
});
}
};
}
function setClassName(component) {
const item = component._rootItem || component._item;
if (item) {
item.className = component.className;
}
}
window.Vaadin.Flow.menubarConnector = { initLazy, setClassName };
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2026 Vaadin Ltd.
* 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
@@ -13,12 +13,21 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* Returns whether the current browser exposes the Web Share API
* (`navigator.share`). Used by the bootstrap path to seed the server-side
* support signal without waiting for a DOM event.
*/
export function isShareSupported() {
return typeof navigator.share === 'function';
}
//# sourceMappingURL=WebShare.js.map
window.Vaadin.Flow.messageListConnector = {
setItems(list, items, locale) {
const formatter = new Intl.DateTimeFormat(locale, {
year: 'numeric',
month: 'short',
day: 'numeric',
hour: 'numeric',
minute: 'numeric'
});
list.items = items.map((item) =>
item.time
? Object.assign(item, {
time: formatter.format(new Date(item.time))
})
: item
);
}
};
@@ -1,4 +1,4 @@
window.Vaadin.Flow.selectConnector = {};
window.Vaadin.Flow.selectConnector = {}
window.Vaadin.Flow.selectConnector.initLazy = (select) => {
// do not init this connector twice for the given select
if (select.$connector) {
@@ -16,4 +16,4 @@ window.Vaadin.Flow.selectConnector.initLazy = (select) => {
root.appendChild(listBox);
}
};
};
}
@@ -31,7 +31,7 @@ const createLinkReferences = (css, target) => {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = match[2] || match[4];
const media = (match[1] || match[5] || '').trim();
const media = match[1] || match[5];
if (media) {
link.media = media;
}
@@ -79,8 +79,8 @@ const addStyleTag = (cssText, referenceComment) => {
let beforeThis = undefined;
if (referenceComment) {
const comments = Array.from(document.head.childNodes).filter((elem) => elem.nodeType === Node.COMMENT_NODE);
const container = comments.find((comment) => comment.data.trim() === referenceComment);
const comments = Array.from(document.head.childNodes).filter(elem => elem.nodeType === Node.COMMENT_NODE);
const container = comments.find(comment => comment.data.trim() === referenceComment);
if (container) {
beforeThis = container;
}
@@ -121,7 +121,7 @@ const webcomponentGlobalCss = {
export const injectGlobalWebcomponentCss = (css) => {
webcomponentGlobalCss.css.push(css);
webcomponentGlobalCss.importers.forEach((registrar) => {
webcomponentGlobalCss.importers.forEach(registrar => {
registrar(css);
});
};
@@ -0,0 +1,71 @@
/*
* 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.
*/
(function () {
let memoizedTemplate;
customElements.whenDefined('vaadin-text-field').then(() => {
class BigDecimalFieldElement extends customElements.get('vaadin-text-field') {
static get template() {
if (!memoizedTemplate) {
memoizedTemplate = super.template.cloneNode(true);
memoizedTemplate.innerHTML += `<style>
:host {
width: 8em;
}
:host([dir="rtl"]) [part="input-field"] {
direction: ltr;
}
:host([dir="rtl"]) [part="input-field"] ::slotted(input) {
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em) !important;
}
</style>`;
}
return memoizedTemplate;
}
static get is() {
return 'vaadin-big-decimal-field';
}
static get properties() {
return {
_decimalSeparator: {
type: String,
value: '.',
observer: '__decimalSeparatorChanged'
}
};
}
ready() {
super.ready();
this.inputElement.setAttribute('inputmode', 'decimal');
}
__decimalSeparatorChanged(separator, oldSeparator) {
this.allowedCharPattern = '[-+\\d' + separator + ']';
if (this.value && oldSeparator) {
this.value = this.value.split(oldSeparator).join(separator);
}
}
}
customElements.define(BigDecimalFieldElement.is, BigDecimalFieldElement);
});
})();
@@ -0,0 +1,16 @@
import { ServerMessage } from "./vaadin-dev-tools";
export interface Product {
name: string;
version: string;
}
export interface ProductAndMessage {
message: string;
messageHtml?: string;
product: Product;
}
export declare const findAll: (element: Element | ShadowRoot | Document, tags: string[]) => Element[];
export declare const licenseCheckOk: (data: Product) => void;
export declare const licenseCheckFailed: (data: ProductAndMessage) => void;
export declare const licenseCheckNoKey: (data: ProductAndMessage) => void;
export declare const handleLicenseMessage: (message: ServerMessage) => boolean;
export declare const licenseInit: () => void;
@@ -2,7 +2,7 @@ import { Connection } from './connection.js';
export declare class LiveReloadConnection extends Connection {
webSocket?: WebSocket;
constructor(url: string);
onReload(_strategy: string): void;
onReload(): void;
handleMessage(msg: any): void;
handleError(msg: any): void;
}
@@ -1,5 +1,5 @@
import { LitElement } from 'lit';
import { DownloadLicenseOptions, Product } from './License';
import { Product } from './License';
import { ConnectionStatus } from './connection';
/**
* Plugin API for the dev tools window.
@@ -52,19 +52,27 @@ export declare enum MessageType {
WARNING = "warning",
ERROR = "error"
}
interface Message {
id: number;
type: MessageType;
message: string;
details?: string;
link?: string;
persistentId?: string;
dontShowAgain: boolean;
dontShowAgainMessage?: string;
deleted: boolean;
}
type DevToolsConf = {
enable: boolean;
url: string;
contextRelativePath: string;
backend?: string;
liveReloadPort?: number;
liveReloadPort: number;
token?: string;
usageStatisticsEnabled?: boolean;
};
export declare class VaadinDevTools extends LitElement {
unhandledMessages: ServerMessage[];
conf: DevToolsConf;
bodyShadowRoot: ShadowRoot | null;
static get styles(): import("lit").CSSResult[];
static DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE: string;
static ACTIVE_KEY_IN_SESSION_STORAGE: string;
@@ -76,26 +84,37 @@ export declare class VaadinDevTools extends LitElement {
static SPRING_BOOT_DEVTOOLS: string;
static BACKEND_DISPLAY_NAME: Record<string, string>;
static get isActive(): boolean;
static notificationDismissed(persistentId: string): boolean;
splashMessage?: string;
notifications: Message[];
frontendStatus: ConnectionStatus;
javaStatus: ConnectionStatus;
private root;
componentPickActive: boolean;
private javaConnection?;
private frontendConnection?;
private nextMessageId;
private disableEventListener?;
private transitionDuration;
elementTelemetry(): void;
openWebSocketConnection(): void;
removeOldLinks(path: string): void;
tabHandleMessage(tabElement: HTMLElement, message: ServerMessage): boolean;
handleFrontendMessage(message: ServerMessage): void;
handleHmrMessage(message: ServerMessage): boolean;
getDedicatedWebSocketUrl(): string | undefined;
getSpringBootWebSocketUrl(location: any): string;
connectedCallback(): void;
initPlugin(plugin: DevToolsPlugin): Promise<void>;
format(o: any): string;
disconnectedCallback(): void;
showSplashMessage(msg: string | undefined): void;
demoteSplashMessage(): void;
checkLicense(productInfo: Product): void;
startPreTrial(): void;
downloadLicense(productInfo: Product, options?: DownloadLicenseOptions): void;
showNotification(type: MessageType, message: string, details?: string, link?: string, persistentId?: string, dontShowAgainMessage?: string): void;
dismissNotification(id: number): void;
findNotificationIndex(id: number): number;
toggleDontShowAgain(id: number): void;
setActive(yes: boolean): void;
renderMessage(messageObject: Message): import("lit-html").TemplateResult<1>;
render(): import("lit-html").TemplateResult<1>;
setJavaLiveReloadActive(active: boolean): void;
}
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@ export declare class WebSocketConnection extends Connection {
socket?: any;
canSend: boolean;
constructor(url: string);
onReload(_strategy: string): void;
onReload(): void;
onUpdate(_path: string, _content: string): void;
onMessage(_message: any): void;
handleMessage(msg: any): void;
@@ -1,9 +1,9 @@
import '@vaadin/checkbox/src/vaadin-checkbox.js';
import '@vaadin/grid/src/vaadin-grid-column.js';
import '@vaadin/grid/vaadin-grid-column.js';
import { GridColumn } from '@vaadin/grid/src/vaadin-grid-column.js';
import { GridSelectionColumnBaseMixin } from '@vaadin/grid/src/vaadin-grid-selection-column-base-mixin.js';
export class GridFlowSelectionColumn extends GridSelectionColumnBaseMixin(GridColumn) {
static get is() {
return 'vaadin-grid-flow-selection-column';
}
@@ -42,6 +42,7 @@ export class GridFlowSelectionColumn extends GridSelectionColumnBaseMixin(GridCo
}
}
/**
* Override a method from `GridSelectionColumnBaseMixin` to handle the user
* selecting all items.
@@ -75,7 +76,6 @@ export class GridFlowSelectionColumn extends GridSelectionColumnBaseMixin(GridCo
* @override
*/
_selectItem(item) {
this.$server.setShiftKeyDown(this._shiftKeyDown);
this._grid.$connector.doSelection([item], true);
}
@@ -88,7 +88,6 @@ export class GridFlowSelectionColumn extends GridSelectionColumnBaseMixin(GridCo
* @override
*/
_deselectItem(item) {
this.$server.setShiftKeyDown(this._shiftKeyDown);
this._grid.$connector.doDeselection([item], true);
// Optimistically update select all state
this.selectAll = false;
@@ -8,31 +8,31 @@ import {
getSeparator,
searchAmOrPmToken
} from './helpers.js';
import { parseISOTime } from '@vaadin/time-picker/src/vaadin-time-picker-helper.js';
import { TimePicker } from '@vaadin/time-picker/src/vaadin-time-picker.js';
// Execute callback when predicate returns true.
// Try again later if predicate returns false.
function when(predicate, callback, timeout = 0) {
if (predicate()) {
callback();
} else {
setTimeout(() => when(predicate, callback, 200), timeout);
// Execute callback when predicate returns true.
// Try again later if predicate returns false.
function when(predicate, callback, timeout = 0) {
if (predicate()) {
callback();
} else {
setTimeout(() => when(predicate, callback, 200), timeout);
}
}
}
function parseISO(text) {
// The default i18n parser of the web component is ISO 8601 compliant.
const timeObject = parseISOTime(text);
function parseISO(text) {
// The default i18n parser of the web component is ISO 8601 compliant.
const timeObject = TimePicker.properties.i18n.value().parseTime(text);
// The web component returns an object with string values
// while the connector expects number values.
return {
hours: parseInt(timeObject.hours || 0),
minutes: parseInt(timeObject.minutes || 0),
seconds: parseInt(timeObject.seconds || 0),
milliseconds: parseInt(timeObject.milliseconds || 0)
// The web component returns an object with string values
// while the connector expects number values.
return {
hours: parseInt(timeObject.hours || 0),
minutes: parseInt(timeObject.minutes || 0),
seconds: parseInt(timeObject.seconds || 0),
milliseconds: parseInt(timeObject.milliseconds || 0)
}
};
}
window.Vaadin.Flow.timepickerConnector = {};
window.Vaadin.Flow.timepickerConnector.initLazy = (timepicker) => {
@@ -57,7 +57,9 @@ window.Vaadin.Flow.timepickerConnector.initLazy = (timepicker) => {
locale = 'en-US';
// FIXME should do a callback for server to throw an exception ?
throw new Error(
'vaadin-time-picker: The locale ' + locale + ' is not supported, falling back to default locale setting(en-US).'
'vaadin-time-picker: The locale ' +
locale +
' is not supported, falling back to default locale setting(en-US).'
);
}
@@ -156,7 +158,9 @@ window.Vaadin.Flow.timepickerConnector.initLazy = (timepicker) => {
minutes: minutes ? parseDigitsIntoInteger(minutes[0].replace(separator, '')) : 0,
seconds: seconds ? parseDigitsIntoInteger(seconds[0].replace(separator, '')) : 0,
milliseconds:
minutes && seconds && milliseconds ? parseMillisecondsIntoInteger(milliseconds[0].replace('.', '')) : 0
minutes && seconds && milliseconds
? parseMillisecondsIntoInteger(milliseconds[0].replace('.', ''))
: 0
};
cachedTimeString = timeString;
return cachedTimeObject;
@@ -172,10 +176,10 @@ window.Vaadin.Flow.timepickerConnector.initLazy = (timepicker) => {
// FIXME works but uses private API, needs fixes in web component
if (timepicker.inputElement.value !== newValue) {
timepicker.inputElement.value = newValue;
timepicker.value = newValue;
timepicker.$.comboBox.value = newValue;
}
}
);
}
};
};
}
@@ -1,5 +1,5 @@
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
import { timeOut } from '@vaadin/component-base/src/async.js';
import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js';
import { timeOut } from '@polymer/polymer/lib/utils/async.js';
window.Vaadin.Flow.virtualListConnector = {
initLazy: function (list) {
@@ -15,8 +15,6 @@ window.Vaadin.Flow.virtualListConnector = {
list.$connector = {};
list.$connector.placeholderItem = { __placeholder: true };
list.itemAccessibleNameGenerator = (item) => item && item.accessibleName;
const updateRequestedItem = function () {
/*
* TODO virtual list seems to do a small index adjustment after scrolling
@@ -37,7 +35,7 @@ window.Vaadin.Flow.virtualListConnector = {
if (lastRequestedRange[0] != first || lastRequestedRange[1] != last) {
lastRequestedRange = [first, last];
const count = 1 + last - first;
list.$server.setViewportRange(first, count);
list.$server.setRequestedRange(first, count);
}
};
@@ -6,7 +6,7 @@
* `src/main/frontend/views/` directory, this route configuration is
* re-generated automatically by Vaadin.
******************************************************************************/
import { createBrowserRouter, RouteObject } from 'react-router';
import { createBrowserRouter, RouteObject } from 'react-router-dom';
import { serverSideRoutes } from 'Frontend/generated/flow/Flow';
function build() {
@@ -0,0 +1 @@
export declare const applyTheme: (target: Node) => void;
@@ -0,0 +1,2 @@
import {applyTheme as _applyTheme} from './theme-kontor.generated.js';
export const applyTheme = _applyTheme;
@@ -0,0 +1,12 @@
// @ts-nocheck
window.Vaadin = window.Vaadin || {};
window.Vaadin.featureFlags = window.Vaadin.featureFlags || {};
window.Vaadin.featureFlags.exampleFeatureFlag = false;
window.Vaadin.featureFlags.collaborationEngineBackend = false;
window.Vaadin.featureFlags.webPush = false;
window.Vaadin.featureFlags.formFillerAddon = false;
window.Vaadin.featureFlags.hillaI18n = false;
window.Vaadin.featureFlags.copilotFlow = false;
window.Vaadin.featureFlags.copilotI18n = false;
window.Vaadin.featureFlags.copilotExperimentalFeatures = false;
export {};
@@ -0,0 +1,4 @@
import { routes } from "Frontend/generated/routes.js";
(window as any).Vaadin ??= {};
(window as any).Vaadin.routesConfig = routes;
@@ -0,0 +1,8 @@
import './vaadin-featureflags.js';
import './index';
import './vaadin-react.js';
import './theme-kontor.global.generated.js';
import { applyTheme } from './theme.js';
applyTheme(document);
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<!--
This file is auto-generated by Vaadin.
-->
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body, #outlet {
height: 100vh;
width: 100%;
margin: 0;
}
</style>
<!-- index.ts is included here automatically (either by the dev server or during the build) -->
</head>
<body>
<!-- This outlet div is where the views are rendered -->
<div id="outlet"></div>
</body>
</html>
@@ -0,0 +1,3 @@
{
"lumoImports" : [ "typography", "color", "spacing", "badge", "utility" ]
}
@@ -0,0 +1,41 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.*;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.Artist;
@SpringBootTest
class ArtistViewTest {
@Autowired
private ArtistView artistView;
@Test
void formShownWhenArtistSelected() {
Grid<Artist> grid = artistView.getGrid();
Artist firstArtist = getFirstItem(grid);
ArtistForm form = artistView.getForm();
assertFalse(form.isVisible());
grid.asSingleSelect().setValue(firstArtist);
assertTrue(form.isVisible());
assertEquals(firstArtist.getName(), form.name.getValue());
}
private Artist getFirstItem(Grid<Artist> grid) {
int count = grid.getListDataView().getItemCount();
List<Artist> artists = grid.getListDataView().getItems().collect(Collectors.toList());
assertEquals(5, count);
return artists.get(0);
}
}
@@ -0,0 +1,63 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.*;
import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import de.thpeetz.kontor.comics.data.Artist;
@SpringBootTest
class ArtistformTest {
private Artist artist1;
private static final String ARTISTNAME= "Lee, Stan";
@BeforeEach
void setupData() {
artist1 = new Artist();
artist1.setName(ARTISTNAME);
}
@Test
void formFieldsPopulated() {
ArtistForm form = new ArtistForm();
form.setArtist(artist1);
assertEquals(ARTISTNAME, form.name.getValue());
}
@Test
void saveEventHasCorrectValues() {
ArtistForm form = new ArtistForm();
Artist artist = new Artist();
form.setArtist(artist);
form.name.setValue(ARTISTNAME);
AtomicReference<Artist> savedArtistReference = new AtomicReference<>(null);
form.addSaveListener(e -> {
savedArtistReference.set(e.getArtist());
});
form.save.click();
Artist savedArtist = savedArtistReference.get();
assertEquals(ARTISTNAME, savedArtist.getName());
}
@Test
void deleteEventHasCorrectValues() {
ArtistForm form = new ArtistForm();
Artist artist = new Artist();
form.setArtist(artist);
form.name.setValue(ARTISTNAME);
AtomicReference<Artist> deletedArtistReference = new AtomicReference<>(null);
form.addDeleteListener(e -> {
deletedArtistReference.set(e.getArtist());
});
form.delete.click();
Artist deletedArtist = deletedArtistReference.get();
assertEquals(ARTISTNAME, deletedArtist.getName());
}
}
@@ -0,0 +1,43 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.Comic;
@SpringBootTest
public class ComicViewTest {
@Autowired
private ComicView comicView;
@Test
void formShownWhenComicSelected() {
Grid<Comic> grid = comicView.getGrid();
Comic firstComic = getFirstItem(grid);
ComicForm form = comicView.getForm();
assertFalse(form.isVisible());
grid.asSingleSelect().setValue(firstComic);
assertTrue(form.isVisible());
assertEquals(firstComic.getTitle(), form.title.getValue());
}
private Comic getFirstItem(Grid<Comic> grid) {
int count = grid.getListDataView().getItemCount();
List<Comic> comics = grid.getListDataView().getItems().collect(Collectors.toList());
assertEquals(169, count);
return comics.get(0);
}
}
@@ -0,0 +1,43 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.ComicWork;
@SpringBootTest
class ComicWorkViewTest {
@Autowired
private ComicWorkView comicWorkView;
@Test
void formShownWhenComicSelected() {
Grid<ComicWork> grid = comicWorkView.getGrid();
ComicWork firstComicWork = getFirstItem(grid);
ComicWorkForm form = comicWorkView.getForm();
assertFalse(form.isVisible());
grid.asSingleSelect().setValue(firstComicWork);
assertTrue(form.isVisible());
assertEquals(firstComicWork.getComic(), form.comic.getValue());
}
private ComicWork getFirstItem(Grid<ComicWork> grid) {
int count = grid.getListDataView().getItemCount();
List<ComicWork> comicWorks = grid.getListDataView().getItems().collect(Collectors.toList());
assertEquals(18, count);
return comicWorks.get(0);
}
}
@@ -0,0 +1,43 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.Issue;
@SpringBootTest
public class IssueViewTest {
@Autowired
private IssueView issueView;
@Test
void formShownWhenIssueSelected() {
Grid<Issue> grid = issueView.getGrid();
Issue firstIssue = getFirstItem(grid);
IssueForm form = issueView.getForm();
assertFalse(form.isVisible());
grid.asSingleSelect().setValue(firstIssue);
assertTrue(form.isVisible());
assertEquals(firstIssue.getIssueNumber(), form.issueNumber.getValue());
}
private Issue getFirstItem(Grid<Issue> grid) {
int count = grid.getListDataView().getItemCount();
List<Issue> issues = grid.getListDataView().getItems().collect(Collectors.toList());
assertEquals(750, count);
return issues.get(0);
}
}
@@ -0,0 +1,41 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.*;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.Publisher;
@SpringBootTest
class PublisherViewTest {
@Autowired
private PublisherView publisherView;
@Test
void formShownWhenPublisherSelected() {
Grid<Publisher> grid = publisherView.getGrid();
Publisher firstPublisher = getFirstItem(grid);
PublisherForm form = publisherView.getForm();
assertFalse(form.isVisible());
grid.asSingleSelect().setValue(firstPublisher);
assertTrue(form.isVisible());
assertEquals(firstPublisher.getName(), form.name.getValue());
}
private Publisher getFirstItem(Grid<Publisher> grid) {
int count = grid.getListDataView().getItemCount();
List<Publisher> publishers = grid.getListDataView().getItems().collect(Collectors.toList());
assertEquals(18, count);
return publishers.get(0);
}
}
@@ -0,0 +1,43 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.StoryArc;
@SpringBootTest
class StoryArcViewTest {
@Autowired
private StoryArcView storyArcView;
@Test
void formShownWhenStoryArcSelected() {
Grid<StoryArc> grid = storyArcView.getGrid();
StoryArc firstStoryArc = getFirstItem(grid);
StoryArcForm form = storyArcView.getForm();
assertFalse(form.isVisible());
grid.asSingleSelect().setValue(firstStoryArc);
assertTrue(form.isVisible());
assertEquals(firstStoryArc.getName(), form.name.getValue());
}
private StoryArc getFirstItem(Grid<StoryArc> grid) {
int count = grid.getListDataView().getItemCount();
List<StoryArc> storyArcs = grid.getListDataView().getItems().collect(Collectors.toList());
assertEquals(3, count);
return storyArcs.get(0);
}
}
@@ -0,0 +1,46 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.TradePaperback;
@SpringBootTest
class TradePaperbackViewTest {
@Autowired
private TradePaperbackView tradePaperbackView;
@Test
void formShownWhenVolumeSelected() {
Grid<TradePaperback> grid = tradePaperbackView.getGrid();
TradePaperback firstTradePaperback = getFirstItem(grid);
TradePaperBackForm form = tradePaperbackView.getForm();
assertFalse(form.isVisible());
if (firstTradePaperback != null) {
grid.asSingleSelect().setValue(firstTradePaperback);
assertTrue(form.isVisible());
assertEquals(firstTradePaperback.getName(), form.name.getValue());
}
}
private TradePaperback getFirstItem(Grid<TradePaperback> grid) {
int count = grid.getListDataView().getItemCount();
List<TradePaperback> tradePaperbacks = grid.getListDataView().getItems().collect(Collectors.toList());
assertEquals(40, count);
return tradePaperbacks.get(0);
}
}
@@ -0,0 +1,50 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.Volume;
@SpringBootTest
class VolumeViewTest {
@Autowired
private VolumeView volumeView;
@Test
void formShownWhenVolumeSelected() {
Grid<Volume> grid = volumeView.getGrid();
Volume firstVolume = getFirstItem(grid);
VolumeForm form = volumeView.getForm();
assertFalse(form.isVisible());
if (firstVolume != null) {
grid.asSingleSelect().setValue(firstVolume);
assertTrue(form.isVisible());
assertEquals(firstVolume.getName(), form.name.getValue());
}
}
private Volume getFirstItem(Grid<Volume> grid) {
int count = grid.getListDataView().getItemCount();
List<Volume> volumes = grid.getListDataView().getItems().collect(Collectors.toList());
assertEquals(0, count);
if (count > 0) {
return volumes.get(0);
} else {
return null;
}
}
}
@@ -0,0 +1,49 @@
package de.thpeetz.kontor.comics.views;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.vaadin.flow.component.grid.Grid;
import de.thpeetz.kontor.comics.data.Worktype;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@SpringBootTest
class WorktypeViewTest {
@Autowired
private WorktypeView worktypeView;
@Test
void formShownWhenWorktypeSelected() {
Grid<Worktype> grid = worktypeView.getGrid();
Worktype firstWorktype = getFirstItem(grid);
WorktypeForm form = worktypeView.getForm();
assertFalse(form.isVisible());
if (firstWorktype != null) {
grid.asSingleSelect().setValue(firstWorktype);
assertTrue(form.isVisible());
assertEquals(firstWorktype.getName(), form.name.getValue());
}
}
private Worktype getFirstItem(Grid<Worktype> grid) {
int count = grid.getListDataView().getItemCount();
List<Worktype> worktypes = grid.getListDataView().getItems().collect(Collectors.toList());
log.info("found worktypes: {}", worktypes);
assertEquals(3, count);
return worktypes.get(0);
}
}

Some files were not shown because too many files have changed in this diff Show More