├── .github └── workflows │ └── build-native-image.yml ├── .gitignore ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── README.md ├── frontend ├── generated │ ├── flow │ │ ├── generated-flow-imports.d.ts │ │ └── generated-flow-imports.js │ ├── index.ts │ ├── jar-resources │ │ ├── Flow.d.ts │ │ ├── Flow.js │ │ ├── Flow.js.map │ │ ├── FlowBootstrap.d.ts │ │ ├── FlowBootstrap.js │ │ ├── FlowClient.d.ts │ │ ├── FlowClient.js │ │ ├── buttonFunctions.js │ │ ├── comboBoxConnector.js │ │ ├── contextMenuConnector.js │ │ ├── contextMenuTargetConnector.js │ │ ├── datepickerConnector.js │ │ ├── dndConnector.js │ │ ├── flow-component-directive.js │ │ ├── flow-component-renderer.js │ │ ├── gridConnector.ts │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.map │ │ ├── lit-renderer.ts │ │ ├── menubarConnector.js │ │ ├── messageListConnector.js │ │ ├── selectConnector.js │ │ ├── theme-util.js │ │ ├── tooltip.ts │ │ ├── vaadin-big-decimal-field.js │ │ ├── vaadin-dev-tools │ │ │ ├── License.d.ts │ │ │ ├── assets │ │ │ │ ├── vaadin-accordion-eed3b794.js │ │ │ │ ├── vaadin-accordion-heading-c0acdd6d.js │ │ │ │ ├── vaadin-accordion-panel-616e55d6.js │ │ │ │ ├── vaadin-app-layout-e56de2e9.js │ │ │ │ ├── vaadin-avatar-7599297d.js │ │ │ │ ├── vaadin-big-decimal-field-e51def24.js │ │ │ │ ├── vaadin-board-828ebdea.js │ │ │ │ ├── vaadin-board-row-c70d0c55.js │ │ │ │ ├── vaadin-button-2511ad84.js │ │ │ │ ├── vaadin-chart-5192dc15.js │ │ │ │ ├── vaadin-checkbox-4e68df64.js │ │ │ │ ├── vaadin-checkbox-group-a7c65bf2.js │ │ │ │ ├── vaadin-combo-box-96451ddd.js │ │ │ │ ├── vaadin-confirm-dialog-4d718829.js │ │ │ │ ├── vaadin-cookie-consent-46c09f8b.js │ │ │ │ ├── vaadin-crud-8d161a22.js │ │ │ │ ├── vaadin-custom-field-42c85b9e.js │ │ │ │ ├── vaadin-date-picker-f2001167.js │ │ │ │ ├── vaadin-date-time-picker-c8c047a7.js │ │ │ │ ├── vaadin-details-bf336660.js │ │ │ │ ├── vaadin-details-summary-351a1448.js │ │ │ │ ├── vaadin-dialog-53253a08.js │ │ │ │ ├── vaadin-email-field-d7a35f04.js │ │ │ │ ├── vaadin-form-layout-47744b1d.js │ │ │ │ ├── vaadin-grid-0a4791c2.js │ │ │ │ ├── vaadin-grid-pro-ff415555.js │ │ │ │ ├── vaadin-horizontal-layout-3193943f.js │ │ │ │ ├── vaadin-icon-601f36ed.js │ │ │ │ ├── vaadin-integer-field-85078932.js │ │ │ │ ├── vaadin-list-box-d7a8433b.js │ │ │ │ ├── vaadin-login-form-638996c6.js │ │ │ │ ├── vaadin-login-overlay-f8a5db8a.js │ │ │ │ ├── vaadin-map-d40a0116.js │ │ │ │ ├── vaadin-menu-bar-3f5ab096.js │ │ │ │ ├── vaadin-message-input-996ac37c.js │ │ │ │ ├── vaadin-message-list-70a435ba.js │ │ │ │ ├── vaadin-multi-select-combo-box-a3373557.js │ │ │ │ ├── vaadin-notification-bd6eb776.js │ │ │ │ ├── vaadin-number-field-cb3ee8b2.js │ │ │ │ ├── vaadin-password-field-d289cb18.js │ │ │ │ ├── vaadin-progress-bar-309ecf1f.js │ │ │ │ ├── vaadin-radio-group-88b5afd8.js │ │ │ │ ├── vaadin-rich-text-editor-8cd892f2.js │ │ │ │ ├── vaadin-scroller-35e68818.js │ │ │ │ ├── vaadin-select-df6e9947.js │ │ │ │ ├── vaadin-side-nav-ba80d91d.js │ │ │ │ ├── vaadin-side-nav-item-34918f92.js │ │ │ │ ├── vaadin-split-layout-80c92131.js │ │ │ │ ├── vaadin-spreadsheet-59d8c5ef.js │ │ │ │ ├── vaadin-tab-aaf32809.js │ │ │ │ ├── vaadin-tabs-d9a5e24e.js │ │ │ │ ├── vaadin-tabsheet-dd99ed9a.js │ │ │ │ ├── vaadin-text-area-83627ebc.js │ │ │ │ ├── vaadin-text-field-0b3db014.js │ │ │ │ ├── vaadin-time-picker-715ec415.js │ │ │ │ ├── vaadin-upload-d3c162ed.js │ │ │ │ ├── vaadin-vertical-layout-ad4174c4.js │ │ │ │ └── vaadin-virtual-list-96896203.js │ │ │ ├── component-picker.d.ts │ │ │ ├── component-util.d.ts │ │ │ ├── connection.d.ts │ │ │ ├── live-reload-connection.d.ts │ │ │ ├── shim.d.ts │ │ │ ├── styles.d.ts │ │ │ ├── theme-editor │ │ │ │ ├── api.d.ts │ │ │ │ ├── components │ │ │ │ │ ├── class-name-editor.d.ts │ │ │ │ │ ├── component-overlay-manager.d.ts │ │ │ │ │ ├── component-resolver.d.ts │ │ │ │ │ ├── editors │ │ │ │ │ │ ├── base-property-editor.d.ts │ │ │ │ │ │ ├── checkbox-property-editor.d.ts │ │ │ │ │ │ ├── color-picker.d.ts │ │ │ │ │ │ ├── color-property-editor.d.ts │ │ │ │ │ │ ├── range-property-editor.d.ts │ │ │ │ │ │ └── text-property-editor.d.ts │ │ │ │ │ ├── property-list.d.ts │ │ │ │ │ └── scope-selector.d.ts │ │ │ │ ├── detector.d.ts │ │ │ │ ├── editor.d.ts │ │ │ │ ├── history.d.ts │ │ │ │ ├── icons.d.ts │ │ │ │ ├── metadata │ │ │ │ │ ├── components │ │ │ │ │ │ ├── defaults.d.ts │ │ │ │ │ │ ├── generic.d.ts │ │ │ │ │ │ └── presets.d.ts │ │ │ │ │ ├── model.d.ts │ │ │ │ │ └── registry.d.ts │ │ │ │ ├── model.d.ts │ │ │ │ ├── preview.d.ts │ │ │ │ └── styles.d.ts │ │ │ ├── vaadin-dev-tools-info.d.ts │ │ │ ├── vaadin-dev-tools-log.d.ts │ │ │ ├── vaadin-dev-tools.d.ts │ │ │ ├── vaadin-dev-tools.js │ │ │ ├── vaadin-dev-tools.test.d.ts │ │ │ └── websocket-connection.d.ts │ │ ├── vaadin-grid-flow-selection-column.js │ │ ├── vaadin-time-picker │ │ │ ├── helpers.js │ │ │ └── timepickerConnector.js │ │ └── virtualListConnector.js │ ├── vaadin-featureflags.js │ └── vaadin.ts └── index.html ├── mvnw ├── mvnw.cmd ├── pom.xml └── src ├── main ├── java │ └── org │ │ └── vaadin │ │ └── marcus │ │ └── vaadinai │ │ └── VaadinAiApplication.java └── resources │ └── application.properties └── test └── java └── org └── vaadin └── marcus └── vaadinai └── VaadinAiApplicationTests.java /.github/workflows/build-native-image.yml: -------------------------------------------------------------------------------- 1 | name: Build Native Image 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@v4 12 | 13 | - name: Cache Maven dependencies 14 | uses: actions/cache@v2 15 | with: 16 | path: ~/.m2/repository 17 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} 18 | restore-keys: | 19 | ${{ runner.os }}-maven- 20 | 21 | - name: Setup GraalVM 22 | uses: graalvm/setup-graalvm@v1 23 | with: 24 | java-version: '21.0.2' 25 | distribution: 'graalvm' 26 | github-token: ${{ secrets.GITHUB_TOKEN }} 27 | 28 | - name: Build Native Image 29 | run: | 30 | ./mvnw package -Pnative -Pproduction native:compile 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | HELP.md 3 | target/ 4 | !.mvn/wrapper/maven-wrapper.jar 5 | !**/src/main/**/target/ 6 | !**/src/test/**/target/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | 17 | ### IntelliJ IDEA ### 18 | .idea 19 | *.iws 20 | *.iml 21 | *.ipr 22 | 23 | ### NetBeans ### 24 | /nbproject/private/ 25 | /nbbuild/ 26 | /dist/ 27 | /nbdist/ 28 | /.nb-gradle/ 29 | build/ 30 | !**/src/main/**/build/ 31 | !**/src/test/**/build/ 32 | 33 | ### VS Code ### 34 | .vscode/ 35 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcushellberg/spring-ai-web/bbc0f27bcacecfca34efd12eaca2704bf52cac0e/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Spring AI demo with a Vaadin UI 2 | 3 | This is a minimal example of using Vaadin to create a UI for Spring AI. 4 | 5 | Check out the [streaming branch](https://github.com/marcushellberg/spring-ai-web/tree/streaming) for a version that uses the OpenAI streaming API. 6 | 7 | ## Requirements 8 | - OpenAI API key saved as an environment variable `OPENAI_API_KEY` 9 | - Java 21 (or beyond), e.g., by [SDKman](https://sdkman.io) (`sdk u java 21.0.2-tem`) 10 | 11 | ## Running the app 12 | Run the project using `./mvnw spring-boot:run` and open [http://localhost:8080](http://localhost:8080) in your browser. 13 | 14 | You can also create a GraalVM native image using `./mvnw package -Pnative -Pproduction native:compile` and run the resulting native image. 15 | Note that you must use a Graal JDK in this case (`sdk u java 21.0.2-graal`). 16 | -------------------------------------------------------------------------------- /frontend/generated/flow/generated-flow-imports.d.ts: -------------------------------------------------------------------------------- 1 | export {} -------------------------------------------------------------------------------- /frontend/generated/flow/generated-flow-imports.js: -------------------------------------------------------------------------------- 1 | import '@vaadin/tooltip/src/vaadin-tooltip.js'; 2 | import '@vaadin/polymer-legacy-adapter/style-modules.js'; 3 | import '@vaadin/message-input/src/vaadin-message-input.js'; 4 | import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; 5 | import '@vaadin/common-frontend/ConnectionIndicator.js'; 6 | import '@vaadin/vaadin-lumo-styles/color-global.js'; 7 | import '@vaadin/vaadin-lumo-styles/typography-global.js'; 8 | import '@vaadin/vaadin-lumo-styles/sizing.js'; 9 | import '@vaadin/vaadin-lumo-styles/spacing.js'; 10 | import '@vaadin/vaadin-lumo-styles/style.js'; 11 | import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js'; 12 | const loadOnDemand = (key) => { return Promise.resolve(0); } 13 | window.Vaadin = window.Vaadin || {}; 14 | window.Vaadin.Flow = window.Vaadin.Flow || {}; 15 | window.Vaadin.Flow.loadOnDemand = loadOnDemand; 16 | window.Vaadin.Flow.resetFocus = () => { 17 | let ae=document.activeElement; 18 | while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement; 19 | return !ae || ae.blur() || ae.focus() || true; 20 | } -------------------------------------------------------------------------------- /frontend/generated/index.ts: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * This file is auto-generated by Vaadin. 3 | * If you want to customize the entry point, you can copy this file or create 4 | * your own `index.ts` in your frontend directory. 5 | * By default, the `index.ts` file should be in `./frontend/` folder. 6 | * 7 | * NOTE: 8 | * - You need to restart the dev-server after adding the new `index.ts` file. 9 | * After that, all modifications to `index.ts` are recompiled automatically. 10 | * - `index.js` is also supported if you don't want to use TypeScript. 11 | ******************************************************************************/ 12 | 13 | // import Vaadin client-router to handle client-side and server-side navigation 14 | import { Router } from '@vaadin/router'; 15 | 16 | // import Flow module to enable navigation to Vaadin server-side views 17 | import { Flow } from 'Frontend/generated/jar-resources/Flow.js'; 18 | 19 | const { serverSideRoutes } = new Flow({ 20 | imports: () => import('Frontend/generated/flow/generated-flow-imports.js') 21 | }); 22 | 23 | const routes = [ 24 | // for client-side, place routes below (more info https://hilla.dev/docs/lit/guides/routing#initializing-the-router) 25 | 26 | // for server-side, the next magic line sends all unmatched routes: 27 | ...serverSideRoutes // IMPORTANT: this must be the last entry in the array 28 | ]; 29 | 30 | // Vaadin router needs an outlet in the index.html page to display views 31 | const router = new Router(document.querySelector('#outlet')); 32 | router.setRoutes(routes); 33 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/Flow.d.ts: -------------------------------------------------------------------------------- 1 | export interface FlowConfig { 2 | imports?: () => void; 3 | } 4 | interface AppConfig { 5 | productionMode: boolean; 6 | appId: string; 7 | uidl: any; 8 | } 9 | interface AppInitResponse { 10 | appConfig: AppConfig; 11 | pushScript?: string; 12 | } 13 | interface Router { 14 | render: (ctx: NavigationParameters, shouldUpdateHistory: boolean) => Promise; 15 | } 16 | interface HTMLRouterContainer extends HTMLElement { 17 | onBeforeEnter?: (ctx: NavigationParameters, cmd: PreventAndRedirectCommands, router: Router) => void | Promise; 18 | onBeforeLeave?: (ctx: NavigationParameters, cmd: PreventCommands, router: Router) => void | Promise; 19 | serverConnected?: (cancel: boolean, url?: NavigationParameters) => void; 20 | serverPaused?: () => void; 21 | } 22 | interface FlowRoute { 23 | action: (params: NavigationParameters) => Promise; 24 | path: string; 25 | } 26 | export interface NavigationParameters { 27 | pathname: string; 28 | search: string; 29 | } 30 | export interface PreventCommands { 31 | prevent: () => any; 32 | } 33 | export interface PreventAndRedirectCommands extends PreventCommands { 34 | redirect: (route: string) => any; 35 | } 36 | /** 37 | * Client API for flow UI operations. 38 | */ 39 | export declare class Flow { 40 | config: FlowConfig; 41 | response?: AppInitResponse; 42 | pathname: string; 43 | container: HTMLRouterContainer; 44 | private isActive; 45 | private baseRegex; 46 | private appShellTitle; 47 | private navigation; 48 | constructor(config?: FlowConfig); 49 | /** 50 | * Return a `route` object for vaadin-router in an one-element array. 51 | * 52 | * The `FlowRoute` object `path` property handles any route, 53 | * and the `action` returns the flow container without updating the content, 54 | * delaying the actual Flow server call to the `onBeforeEnter` phase. 55 | * 56 | * This is a specific API for its use with `vaadin-router`. 57 | */ 58 | get serverSideRoutes(): [FlowRoute]; 59 | loadingStarted(): void; 60 | loadingFinished(): void; 61 | private get action(); 62 | private flowLeave; 63 | private flowNavigate; 64 | private getFlowRoutePath; 65 | private getFlowRouteQuery; 66 | private flowInit; 67 | private loadScript; 68 | private injectAppIdScript; 69 | private flowInitClient; 70 | private flowInitUi; 71 | private addConnectionIndicator; 72 | private offlineStubAction; 73 | private isFlowClientLoaded; 74 | } 75 | export {}; 76 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/FlowBootstrap.d.ts: -------------------------------------------------------------------------------- 1 | export const init: (appInitResponse: any) => void; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/FlowBootstrap.js: -------------------------------------------------------------------------------- 1 | /* This is a copy of the regular `BootstrapHandler.js` in the flow-server 2 | module, but with the following modifications: 3 | - The main function is exported as an ES module for lazy initialization. 4 | - Application configuration is passed as a parameter instead of using 5 | replacement placeholders as in the regular bootstrapping. 6 | - It reuses `Vaadin.Flow.clients` if exists. 7 | - Fixed lint errors. 8 | */ 9 | const init = function (appInitResponse) { 10 | window.Vaadin = window.Vaadin || {}; 11 | window.Vaadin.Flow = window.Vaadin.Flow || {}; 12 | 13 | var apps = {}; 14 | var widgetsets = {}; 15 | 16 | var log; 17 | if (typeof window.console === undefined || !window.location.search.match(/[&?]debug(&|$)/)) { 18 | /* If no console.log present, just use a no-op */ 19 | log = function () {}; 20 | } else if (typeof window.console.log === 'function') { 21 | /* If it's a function, use it with apply */ 22 | log = function () { 23 | window.console.log.apply(window.console, arguments); 24 | }; 25 | } else { 26 | /* In IE, its a native function for which apply is not defined, but it works 27 | without a proper 'this' reference */ 28 | log = window.console.log; 29 | } 30 | 31 | var isInitializedInDom = function (appId) { 32 | var appDiv = document.getElementById(appId); 33 | if (!appDiv) { 34 | return false; 35 | } 36 | for (var i = 0; i < appDiv.childElementCount; i++) { 37 | var className = appDiv.childNodes[i].className; 38 | /* If the app div contains a child with the class 39 | 'v-app-loading' we have only received the HTML 40 | but not yet started the widget set 41 | (UIConnector removes the v-app-loading div). */ 42 | if (className && className.indexOf('v-app-loading') != -1) { 43 | return false; 44 | } 45 | } 46 | return true; 47 | }; 48 | 49 | /* 50 | * Needed for Testbench compatibility, but prevents any Vaadin 7 app from 51 | * bootstrapping unless the legacy vaadinBootstrap.js file is loaded before 52 | * this script. 53 | */ 54 | window.Vaadin = window.Vaadin || {}; 55 | window.Vaadin.Flow = window.Vaadin.Flow || {}; 56 | 57 | /* 58 | * Needed for wrapping custom javascript functionality in the components (i.e. connectors) 59 | */ 60 | window.Vaadin.Flow.tryCatchWrapper = function (originalFunction, component) { 61 | return function () { 62 | try { 63 | // eslint-disable-next-line 64 | const result = originalFunction.apply(this, arguments); 65 | return result; 66 | } catch (error) { 67 | console.error( 68 | `There seems to be an error in ${component}: 69 | ${error.message} 70 | Please submit an issue to https://github.com/vaadin/flow-components/issues/new/choose` 71 | ); 72 | } 73 | }; 74 | }; 75 | 76 | if (!window.Vaadin.Flow.initApplication) { 77 | window.Vaadin.Flow.clients = window.Vaadin.Flow.clients || {}; 78 | 79 | window.Vaadin.Flow.initApplication = function (appId, config) { 80 | var testbenchId = appId.replace(/-\d+$/, ''); 81 | 82 | if (apps[appId]) { 83 | if ( 84 | window.Vaadin && 85 | window.Vaadin.Flow && 86 | window.Vaadin.Flow.clients && 87 | window.Vaadin.Flow.clients[testbenchId] && 88 | window.Vaadin.Flow.clients[testbenchId].initializing 89 | ) { 90 | throw new Error('Application ' + appId + ' is already being initialized'); 91 | } 92 | if (isInitializedInDom(appId)) { 93 | throw new Error('Application ' + appId + ' already initialized'); 94 | } 95 | } 96 | 97 | log('init application', appId, config); 98 | 99 | window.Vaadin.Flow.clients[testbenchId] = { 100 | isActive: function () { 101 | return true; 102 | }, 103 | initializing: true, 104 | productionMode: mode 105 | }; 106 | 107 | var getConfig = function (name) { 108 | var value = config[name]; 109 | return value; 110 | }; 111 | 112 | /* Export public data */ 113 | var app = { 114 | getConfig: getConfig 115 | }; 116 | apps[appId] = app; 117 | 118 | if (!window.name) { 119 | window.name = appId + '-' + Math.random(); 120 | } 121 | 122 | var widgetset = 'client'; 123 | widgetsets[widgetset] = { 124 | pendingApps: [] 125 | }; 126 | if (widgetsets[widgetset].callback) { 127 | log('Starting from bootstrap', appId); 128 | widgetsets[widgetset].callback(appId); 129 | } else { 130 | log('Setting pending startup', appId); 131 | widgetsets[widgetset].pendingApps.push(appId); 132 | } 133 | 134 | return app; 135 | }; 136 | window.Vaadin.Flow.getAppIds = function () { 137 | var ids = []; 138 | for (var id in apps) { 139 | if (Object.prototype.hasOwnProperty.call(apps, id)) { 140 | ids.push(id); 141 | } 142 | } 143 | return ids; 144 | }; 145 | window.Vaadin.Flow.getApp = function (appId) { 146 | return apps[appId]; 147 | }; 148 | window.Vaadin.Flow.registerWidgetset = function (widgetset, callback) { 149 | log('Widgetset registered', widgetset); 150 | var ws = widgetsets[widgetset]; 151 | if (ws && ws.pendingApps) { 152 | ws.callback = callback; 153 | for (var i = 0; i < ws.pendingApps.length; i++) { 154 | var appId = ws.pendingApps[i]; 155 | log('Starting from register widgetset', appId); 156 | callback(appId); 157 | } 158 | ws.pendingApps = null; 159 | } 160 | }; 161 | window.Vaadin.Flow.getBrowserDetailsParameters = function () { 162 | var params = {}; 163 | 164 | /* Screen height and width */ 165 | params['v-sh'] = window.screen.height; 166 | params['v-sw'] = window.screen.width; 167 | /* Browser window dimensions */ 168 | params['v-wh'] = window.innerHeight; 169 | params['v-ww'] = window.innerWidth; 170 | /* Body element dimensions */ 171 | params['v-bh'] = document.body.clientHeight; 172 | params['v-bw'] = document.body.clientWidth; 173 | 174 | /* Current time */ 175 | var date = new Date(); 176 | params['v-curdate'] = date.getTime(); 177 | 178 | /* Current timezone offset (including DST shift) */ 179 | var tzo1 = date.getTimezoneOffset(); 180 | 181 | /* Compare the current tz offset with the first offset from the end 182 | of the year that differs --- if less that, we are in DST, otherwise 183 | we are in normal time */ 184 | var dstDiff = 0; 185 | var rawTzo = tzo1; 186 | for (var m = 12; m > 0; m--) { 187 | date.setUTCMonth(m); 188 | var tzo2 = date.getTimezoneOffset(); 189 | if (tzo1 != tzo2) { 190 | dstDiff = tzo1 > tzo2 ? tzo1 - tzo2 : tzo2 - tzo1; 191 | rawTzo = tzo1 > tzo2 ? tzo1 : tzo2; 192 | break; 193 | } 194 | } 195 | 196 | /* Time zone offset */ 197 | params['v-tzo'] = tzo1; 198 | 199 | /* DST difference */ 200 | params['v-dstd'] = dstDiff; 201 | 202 | /* Time zone offset without DST */ 203 | params['v-rtzo'] = rawTzo; 204 | 205 | /* DST in effect? */ 206 | params['v-dston'] = tzo1 != rawTzo; 207 | 208 | /* Time zone id (if available) */ 209 | try { 210 | params['v-tzid'] = Intl.DateTimeFormat().resolvedOptions().timeZone; 211 | } catch (err) { 212 | params['v-tzid'] = ''; 213 | } 214 | 215 | /* Window name */ 216 | if (window.name) { 217 | params['v-wn'] = window.name; 218 | } 219 | 220 | /* Detect touch device support */ 221 | var supportsTouch = false; 222 | try { 223 | document.createEvent('TouchEvent'); 224 | supportsTouch = true; 225 | } catch (e) { 226 | /* Chrome and IE10 touch detection */ 227 | supportsTouch = 'ontouchstart' in window || typeof navigator.msMaxTouchPoints !== 'undefined'; 228 | } 229 | params['v-td'] = supportsTouch; 230 | 231 | /* Device Pixel Ratio */ 232 | params['v-pr'] = window.devicePixelRatio; 233 | 234 | if (navigator.platform) { 235 | params['v-np'] = navigator.platform; 236 | } 237 | 238 | /* Stringify each value (they are parsed on the server side) */ 239 | Object.keys(params).forEach(function (key) { 240 | var value = params[key]; 241 | if (typeof value !== 'undefined') { 242 | params[key] = value.toString(); 243 | } 244 | }); 245 | return params; 246 | }; 247 | } 248 | 249 | log('Flow bootstrap loaded'); 250 | if (appInitResponse.appConfig.productionMode && typeof window.__gwtStatsEvent != 'function') { 251 | window.Vaadin.Flow.gwtStatsEvents = []; 252 | window.__gwtStatsEvent = function (event) { 253 | window.Vaadin.Flow.gwtStatsEvents.push(event); 254 | return true; 255 | }; 256 | } 257 | var config = appInitResponse.appConfig; 258 | var mode = appInitResponse.appConfig.productionMode; 259 | window.Vaadin.Flow.initApplication(config.appId, config); 260 | }; 261 | 262 | export { init }; 263 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/FlowClient.d.ts: -------------------------------------------------------------------------------- 1 | export const init: () => void; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/buttonFunctions.js: -------------------------------------------------------------------------------- 1 | function disableOnClickListener({currentTarget: button}) { 2 | button.disabled = button.hasAttribute('disableOnClick'); 3 | } 4 | 5 | window.Vaadin.Flow.button = { 6 | initDisableOnClick: (button) => { 7 | if (!button.__hasDisableOnClickListener) { 8 | button.addEventListener('click', disableOnClickListener); 9 | button.__hasDisableOnClickListener = true; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/contextMenuConnector.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | function tryCatchWrapper(callback) { 3 | return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Context Menu'); 4 | } 5 | 6 | function getContainer(appId, nodeId) { 7 | try { 8 | return window.Vaadin.Flow.clients[appId].getByNodeId(nodeId); 9 | } catch (error) { 10 | console.error('Could not get node %s from app %s', nodeId, appId); 11 | console.error(error); 12 | } 13 | } 14 | 15 | /** 16 | * Initializes the connector for a context menu element. 17 | * 18 | * @param {HTMLElement} contextMenu 19 | * @param {string} appId 20 | */ 21 | function initLazy(contextMenu, appId) { 22 | if (contextMenu.$connector) { 23 | return; 24 | } 25 | 26 | contextMenu.$connector = { 27 | /** 28 | * Generates and assigns the items to the context menu. 29 | * 30 | * @param {number} nodeId 31 | */ 32 | generateItems: tryCatchWrapper((nodeId) => { 33 | const items = generateItemsTree(appId, nodeId); 34 | 35 | contextMenu.items = items; 36 | }) 37 | }; 38 | } 39 | 40 | /** 41 | * Generates an items tree compatible with the context-menu web component 42 | * by traversing the given Flow DOM tree of context menu item nodes 43 | * whose root node is identified by the `nodeId` argument. 44 | * 45 | * The app id is required to access the store of Flow DOM nodes. 46 | * 47 | * @param {string} appId 48 | * @param {number} nodeId 49 | */ 50 | function generateItemsTree(appId, nodeId) { 51 | const container = getContainer(appId, nodeId); 52 | if (!container) { 53 | return; 54 | } 55 | 56 | return Array.from(container.children).map((child) => { 57 | const item = { 58 | component: child, 59 | checked: child._checked, 60 | keepOpen: child._keepOpen, 61 | className: child.className, 62 | theme: child.__theme 63 | }; 64 | // Do not hardcode tag name to allow `vaadin-menu-bar-item` 65 | if (child._hasVaadinItemMixin && child._containerNodeId) { 66 | item.children = generateItemsTree(appId, child._containerNodeId); 67 | } 68 | child._item = item; 69 | return item; 70 | }); 71 | } 72 | 73 | /** 74 | * Sets the checked state for a context menu item. 75 | * 76 | * This method is supposed to be called when the context menu item is closed, 77 | * so there is no need for triggering a re-render eagarly. 78 | * 79 | * @param {HTMLElement} component 80 | * @param {boolean} checked 81 | */ 82 | function setChecked(component, checked) { 83 | if (component._item) { 84 | component._item.checked = checked; 85 | 86 | // Set the attribute in the connector to show the checkmark 87 | // without having to re-render the whole menu while opened. 88 | if (component._item.keepOpen) { 89 | component.toggleAttribute('menu-item-checked', checked); 90 | } 91 | } 92 | } 93 | 94 | /** 95 | * Sets the keep open state for a context menu item. 96 | * 97 | * @param {HTMLElement} component 98 | * @param {boolean} keepOpen 99 | */ 100 | function setKeepOpen(component, keepOpen) { 101 | if (component._item) { 102 | component._item.keepOpen = keepOpen; 103 | } 104 | } 105 | 106 | /** 107 | * Sets the theme for a context menu item. 108 | * 109 | * This method is supposed to be called when the context menu item is closed, 110 | * so there is no need for triggering a re-render eagarly. 111 | * 112 | * @param {HTMLElement} component 113 | * @param {string | undefined | null} theme 114 | */ 115 | function setTheme(component, theme) { 116 | if (component._item) { 117 | component._item.theme = theme; 118 | } 119 | } 120 | 121 | window.Vaadin.Flow.contextMenuConnector = { 122 | initLazy(...args) { 123 | return tryCatchWrapper(initLazy)(...args); 124 | }, 125 | 126 | generateItemsTree(...args) { 127 | return tryCatchWrapper(generateItemsTree)(...args); 128 | }, 129 | 130 | setChecked(...args) { 131 | return tryCatchWrapper(setChecked)(...args); 132 | }, 133 | 134 | setKeepOpen(...args) { 135 | return tryCatchWrapper(setKeepOpen)(...args); 136 | }, 137 | 138 | setTheme(...args) { 139 | return tryCatchWrapper(setTheme)(...args); 140 | } 141 | }; 142 | })(); 143 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/contextMenuTargetConnector.js: -------------------------------------------------------------------------------- 1 | import * as Gestures from '@vaadin/component-base/src/gestures.js'; 2 | 3 | (function () { 4 | function tryCatchWrapper(callback) { 5 | return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Context Menu Target'); 6 | } 7 | 8 | function init(target) { 9 | if (target.$contextMenuTargetConnector) { 10 | return; 11 | } 12 | 13 | target.$contextMenuTargetConnector = { 14 | openOnHandler: tryCatchWrapper(function (e) { 15 | // used by Grid to prevent context menu on selection column click 16 | if (target.preventContextMenu && target.preventContextMenu(e)) { 17 | return; 18 | } 19 | e.preventDefault(); 20 | e.stopPropagation(); 21 | this.$contextMenuTargetConnector.openEvent = e; 22 | let detail = {}; 23 | if (target.getContextMenuBeforeOpenDetail) { 24 | detail = target.getContextMenuBeforeOpenDetail(e); 25 | } 26 | target.dispatchEvent( 27 | new CustomEvent('vaadin-context-menu-before-open', { 28 | detail: detail 29 | }) 30 | ); 31 | }), 32 | 33 | updateOpenOn: tryCatchWrapper(function (eventType) { 34 | this.removeListener(); 35 | this.openOnEventType = eventType; 36 | 37 | customElements.whenDefined('vaadin-context-menu').then( 38 | tryCatchWrapper(() => { 39 | if (Gestures.gestures[eventType]) { 40 | Gestures.addListener(target, eventType, this.openOnHandler); 41 | } else { 42 | target.addEventListener(eventType, this.openOnHandler); 43 | } 44 | }) 45 | ); 46 | }), 47 | 48 | removeListener: tryCatchWrapper(function () { 49 | if (this.openOnEventType) { 50 | if (Gestures.gestures[this.openOnEventType]) { 51 | Gestures.removeListener(target, this.openOnEventType, this.openOnHandler); 52 | } else { 53 | target.removeEventListener(this.openOnEventType, this.openOnHandler); 54 | } 55 | } 56 | }), 57 | 58 | openMenu: tryCatchWrapper(function (contextMenu) { 59 | contextMenu.open(this.openEvent); 60 | }), 61 | 62 | removeConnector: tryCatchWrapper(function () { 63 | this.removeListener(); 64 | target.$contextMenuTargetConnector = undefined; 65 | }) 66 | }; 67 | } 68 | 69 | window.Vaadin.Flow.contextMenuTargetConnector = { 70 | init(...args) { 71 | return tryCatchWrapper(init)(...args); 72 | } 73 | }; 74 | })(); 75 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/datepickerConnector.js: -------------------------------------------------------------------------------- 1 | import dateFnsFormat from 'date-fns/format'; 2 | import dateFnsParse from 'date-fns/parse'; 3 | import dateFnsIsValid from 'date-fns/isValid'; 4 | import { extractDateParts, parseDate as _parseDate } from '@vaadin/date-picker/src/vaadin-date-picker-helper.js'; 5 | 6 | (function () { 7 | const tryCatchWrapper = function (callback) { 8 | return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Date Picker'); 9 | }; 10 | 11 | window.Vaadin.Flow.datepickerConnector = { 12 | initLazy: (datepicker) => 13 | tryCatchWrapper(function (datepicker) { 14 | // Check whether the connector was already initialized for the datepicker 15 | if (datepicker.$connector) { 16 | return; 17 | } 18 | 19 | datepicker.$connector = {}; 20 | 21 | const createLocaleBasedDateFormat = function (locale) { 22 | try { 23 | // Check whether the locale is supported or not 24 | new Date().toLocaleDateString(locale); 25 | } catch (e) { 26 | console.warn('The locale is not supported, using default format setting (ISO 8601).'); 27 | return 'yyyy-MM-dd'; 28 | } 29 | 30 | // format test date and convert to date-fns pattern 31 | const testDate = new Date(Date.UTC(1234, 4, 6)); 32 | let pattern = testDate.toLocaleDateString(locale, { timeZone: 'UTC' }); 33 | pattern = pattern 34 | // escape date-fns pattern letters by enclosing them in single quotes 35 | .replace(/([a-zA-Z]+)/g, "'$1'") 36 | // insert date placeholder 37 | .replace('06', 'dd') 38 | .replace('6', 'd') 39 | // insert month placeholder 40 | .replace('05', 'MM') 41 | .replace('5', 'M') 42 | // insert year placeholder 43 | .replace('1234', 'yyyy'); 44 | const isValidPattern = pattern.includes('d') && pattern.includes('M') && pattern.includes('y'); 45 | if (!isValidPattern) { 46 | console.warn('The locale is not supported, using default format setting (ISO 8601).'); 47 | return 'yyyy-MM-dd'; 48 | } 49 | 50 | return pattern; 51 | }; 52 | 53 | const createFormatterAndParser = tryCatchWrapper(function (formats) { 54 | if (!formats || formats.length === 0) { 55 | throw new Error('Array of custom date formats is null or empty'); 56 | } 57 | 58 | function getShortYearFormat(format) { 59 | if (format.includes('yyyy') && !format.includes('yyyyy')) { 60 | return format.replace('yyyy', 'yy'); 61 | } 62 | if (format.includes('YYYY') && !format.includes('YYYYY')) { 63 | return format.replace('YYYY', 'YY'); 64 | } 65 | return undefined; 66 | } 67 | 68 | function isShortYearFormat(format) { 69 | if (format.includes('y')) { 70 | return !format.includes('yyy'); 71 | } 72 | if (format.includes('Y')) { 73 | return !format.includes('YYY'); 74 | } 75 | return false; 76 | } 77 | 78 | function correctFullYear(date) { 79 | // The last parsed date check handles the case where a four-digit year is parsed, then formatted 80 | // as a two-digit year, and then parsed again. In this case we want to keep the century of the 81 | // originally parsed year, instead of using the century of the reference date. 82 | 83 | // Do not apply any correction if the previous parse attempt was failed. 84 | if (datepicker.$connector._lastParseStatus === 'error') { 85 | return; 86 | } 87 | 88 | // Update century if the last parsed date is the same except the century. 89 | if (datepicker.$connector._lastParseStatus === 'successful') { 90 | if (datepicker.$connector._lastParsedDate.day === date.getDate() && 91 | datepicker.$connector._lastParsedDate.month === date.getMonth() && 92 | datepicker.$connector._lastParsedDate.year % 100 === date.getFullYear() % 100) { 93 | date.setFullYear(datepicker.$connector._lastParsedDate.year); 94 | } 95 | return; 96 | } 97 | 98 | // Update century if this is the first parse after overlay open. 99 | const currentValue = _parseDate(datepicker.value); 100 | if (dateFnsIsValid(currentValue) && 101 | currentValue.getDate() === date.getDate() && 102 | currentValue.getMonth() === date.getMonth() && 103 | currentValue.getFullYear() % 100 === date.getFullYear() % 100) { 104 | date.setFullYear(currentValue.getFullYear()); 105 | } 106 | } 107 | 108 | function formatDate(dateParts) { 109 | const format = formats[0]; 110 | const date = _parseDate(`${dateParts.year}-${dateParts.month + 1}-${dateParts.day}`); 111 | 112 | return dateFnsFormat(date, format); 113 | } 114 | 115 | function doParseDate(dateString, format, referenceDate) { 116 | const date = dateFnsParse(dateString, format, referenceDate); 117 | if (dateFnsIsValid(date)) { 118 | if (isShortYearFormat(format)) { 119 | correctFullYear(date); 120 | } 121 | return { 122 | day: date.getDate(), 123 | month: date.getMonth(), 124 | year: date.getFullYear() 125 | }; 126 | } 127 | } 128 | 129 | function parseDate(dateString) { 130 | const referenceDate = _getReferenceDate(); 131 | for (let format of formats) { 132 | const isShortFormat = isShortYearFormat(format); 133 | // We first try to match the date with the shorter version. 134 | if (!isShortFormat) { 135 | const parsedDate = doParseDate(dateString, getShortYearFormat(format), referenceDate); 136 | if (parsedDate) { 137 | datepicker.$connector._lastParseStatus = 'successful'; 138 | datepicker.$connector._lastParsedDate = parsedDate; 139 | return parsedDate; 140 | } 141 | } 142 | const parsedDate = doParseDate(dateString, format, referenceDate); 143 | if (parsedDate) { 144 | datepicker.$connector._lastParseStatus = 'successful'; 145 | datepicker.$connector._lastParsedDate = parsedDate; 146 | return parsedDate; 147 | } 148 | } 149 | datepicker.$connector._lastParseStatus = 'error'; 150 | return false; 151 | } 152 | 153 | return { 154 | formatDate: formatDate, 155 | parseDate: parseDate 156 | }; 157 | }); 158 | 159 | function _getReferenceDate() { 160 | const { referenceDate } = datepicker.i18n; 161 | return referenceDate ? new Date(referenceDate.year, referenceDate.month, referenceDate.day) : new Date(); 162 | } 163 | 164 | datepicker.$connector.updateI18n = tryCatchWrapper(function (locale, i18n) { 165 | // Either use custom formats specified in I18N, or create format from locale 166 | const hasCustomFormats = i18n && i18n.dateFormats && i18n.dateFormats.length > 0; 167 | if (i18n && i18n.referenceDate) { 168 | i18n.referenceDate = extractDateParts(new Date(i18n.referenceDate)); 169 | } 170 | const usedFormats = hasCustomFormats ? i18n.dateFormats : [createLocaleBasedDateFormat(locale)]; 171 | const formatterAndParser = createFormatterAndParser(usedFormats); 172 | 173 | // Merge current web component I18N settings with new I18N settings and the formatting and parsing functions 174 | datepicker.i18n = Object.assign({}, datepicker.i18n, i18n, formatterAndParser); 175 | }); 176 | 177 | datepicker.addEventListener('opened-changed', () => datepicker.$connector._lastParseStatus = undefined); 178 | })(datepicker) 179 | }; 180 | })(); 181 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/dndConnector.js: -------------------------------------------------------------------------------- 1 | window.Vaadin = window.Vaadin || {}; 2 | window.Vaadin.Flow = window.Vaadin.Flow || {}; 3 | window.Vaadin.Flow.dndConnector = { 4 | __ondragenterListener: function (event) { 5 | // TODO filter by data type 6 | // TODO prevent dropping on itself (by default) 7 | const effect = event.currentTarget['__dropEffect']; 8 | if (!event.currentTarget.hasAttribute('disabled')) { 9 | if (effect) { 10 | event.dataTransfer.dropEffect = effect; 11 | } 12 | 13 | if (effect !== 'none') { 14 | /* #7108: if drag moves on top of drop target's children, first another ondragenter event 15 | * is fired and then a ondragleave event. This happens again once the drag 16 | * moves on top of another children, or back on top of the drop target element. 17 | * Thus need to "cancel" the following ondragleave, to not remove class name. 18 | * Drop event will happen even when dropped to a child element. */ 19 | if (event.currentTarget.classList.contains('v-drag-over-target')) { 20 | event.currentTarget['__skip-leave'] = true; 21 | } else { 22 | event.currentTarget.classList.add('v-drag-over-target'); 23 | } 24 | // enables browser specific pseudo classes (at least FF) 25 | event.preventDefault(); 26 | event.stopPropagation(); // don't let parents know 27 | } 28 | } 29 | }, 30 | 31 | __ondragoverListener: function (event) { 32 | // TODO filter by data type 33 | // TODO filter by effectAllowed != dropEffect due to Safari & IE11 ? 34 | if (!event.currentTarget.hasAttribute('disabled')) { 35 | const effect = event.currentTarget['__dropEffect']; 36 | if (effect) { 37 | event.dataTransfer.dropEffect = effect; 38 | } 39 | // allows the drop && don't let parents know 40 | event.preventDefault(); 41 | event.stopPropagation(); 42 | } 43 | }, 44 | 45 | __ondragleaveListener: function (event) { 46 | if (event.currentTarget['__skip-leave']) { 47 | event.currentTarget['__skip-leave'] = false; 48 | } else { 49 | event.currentTarget.classList.remove('v-drag-over-target'); 50 | } 51 | // #7109 need to stop or any parent drop target might not get highlighted, 52 | // as ondragenter for it is fired before the child gets dragleave. 53 | event.stopPropagation(); 54 | }, 55 | 56 | __ondropListener: function (event) { 57 | const effect = event.currentTarget['__dropEffect']; 58 | if (effect) { 59 | event.dataTransfer.dropEffect = effect; 60 | } 61 | event.currentTarget.classList.remove('v-drag-over-target'); 62 | // prevent browser handling && don't let parents know 63 | event.preventDefault(); 64 | event.stopPropagation(); 65 | }, 66 | 67 | updateDropTarget: function (element) { 68 | if (element['__active']) { 69 | element.addEventListener('dragenter', this.__ondragenterListener, false); 70 | element.addEventListener('dragover', this.__ondragoverListener, false); 71 | element.addEventListener('dragleave', this.__ondragleaveListener, false); 72 | element.addEventListener('drop', this.__ondropListener, false); 73 | } else { 74 | element.removeEventListener('dragenter', this.__ondragenterListener, false); 75 | element.removeEventListener('dragover', this.__ondragoverListener, false); 76 | element.removeEventListener('dragleave', this.__ondragleaveListener, false); 77 | element.removeEventListener('drop', this.__ondropListener, false); 78 | element.classList.remove('v-drag-over-target'); 79 | } 80 | }, 81 | 82 | /** DRAG SOURCE METHODS: */ 83 | 84 | __dragstartListener: function (event) { 85 | event.stopPropagation(); 86 | event.dataTransfer.setData('text/plain', ''); 87 | if (event.currentTarget.hasAttribute('disabled')) { 88 | event.preventDefault(); 89 | } else { 90 | if (event.currentTarget['__effectAllowed']) { 91 | event.dataTransfer.effectAllowed = event.currentTarget['__effectAllowed']; 92 | } 93 | event.currentTarget.classList.add('v-dragged'); 94 | } 95 | }, 96 | 97 | __dragendListener: function (event) { 98 | event.currentTarget.classList.remove('v-dragged'); 99 | }, 100 | 101 | updateDragSource: function (element) { 102 | if (element['draggable']) { 103 | element.addEventListener('dragstart', this.__dragstartListener, false); 104 | element.addEventListener('dragend', this.__dragendListener, false); 105 | } else { 106 | element.removeEventListener('dragstart', this.__dragstartListener, false); 107 | element.removeEventListener('dragend', this.__dragendListener, false); 108 | } 109 | } 110 | }; 111 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/flow-component-directive.js: -------------------------------------------------------------------------------- 1 | import { noChange } from 'lit'; 2 | import { directive, PartType } from 'lit/directive.js'; 3 | import { AsyncDirective } from 'lit/async-directive.js'; 4 | 5 | class FlowComponentDirective extends AsyncDirective { 6 | constructor(partInfo) { 7 | super(partInfo); 8 | if (partInfo.type !== PartType.CHILD) { 9 | throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`); 10 | } 11 | } 12 | 13 | update(part, [appid, nodeid]) { 14 | this.updateContent(part, appid, nodeid); 15 | return noChange; 16 | } 17 | 18 | updateContent(part, appid, nodeid) { 19 | const { parentNode, startNode } = part; 20 | 21 | const hasNewNodeId = nodeid !== undefined && nodeid !== null; 22 | const newNode = hasNewNodeId ? this.getNewNode(appid, nodeid) : null; 23 | const oldNode = this.getOldNode(part); 24 | 25 | clearTimeout(this.__nodeRetryTimeout); 26 | 27 | if (hasNewNodeId && !newNode) { 28 | // If the node is not found, try again later. 29 | this.__nodeRetryTimeout = setTimeout(() => this.updateContent(part, appid, nodeid)); 30 | } else if (oldNode === newNode) { 31 | return; 32 | } else if (oldNode && newNode) { 33 | parentNode.replaceChild(newNode, oldNode); 34 | } else if (oldNode) { 35 | parentNode.removeChild(oldNode); 36 | } else if (newNode) { 37 | startNode.after(newNode); 38 | } 39 | } 40 | 41 | getNewNode(appid, nodeid) { 42 | return window.Vaadin.Flow.clients[appid].getByNodeId(nodeid); 43 | } 44 | 45 | getOldNode(part) { 46 | const { startNode, endNode } = part; 47 | if (startNode.nextSibling === endNode) { 48 | return; 49 | } 50 | return startNode.nextSibling; 51 | } 52 | 53 | disconnected() { 54 | clearTimeout(this.__nodeRetryTimeout); 55 | } 56 | } 57 | 58 | /** 59 | * Renders the given flow component node. 60 | * 61 | * WARNING: This directive is not intended for public use. 62 | * 63 | * @param {string} appid 64 | * @param {number} nodeid 65 | * @private 66 | */ 67 | export const flowComponentDirective = directive(FlowComponentDirective); 68 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/flow-component-renderer.js: -------------------------------------------------------------------------------- 1 | import '@polymer/polymer/lib/elements/dom-if.js'; 2 | import { html } from '@polymer/polymer/lib/utils/html-tag.js'; 3 | import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; 4 | import { idlePeriod } from '@polymer/polymer/lib/utils/async.js'; 5 | import { PolymerElement } from '@polymer/polymer/polymer-element.js'; 6 | import { flowComponentDirective } from './flow-component-directive.js'; 7 | import { render, html as litHtml } from 'lit'; 8 | 9 | /** 10 | * Returns the requested node in a form suitable for Lit template interpolation. 11 | * @param {string} appid 12 | * @param {number} nodeid 13 | * @returns {any} a Lit directive 14 | */ 15 | function getNode(appid, nodeid) { 16 | return flowComponentDirective(appid, nodeid); 17 | } 18 | 19 | /** 20 | * Sets the nodes defined by the given node ids as the child nodes of the 21 | * given root element. 22 | * @param {string} appid 23 | * @param {number[]} nodeIds 24 | * @param {Element} root 25 | */ 26 | function setChildNodes(appid, nodeIds, root) { 27 | render(litHtml`${nodeIds.map(id => flowComponentDirective(appid, id))}`, root); 28 | } 29 | 30 | /** 31 | * SimpleElementBindingStrategy::addChildren uses insertBefore to add child 32 | * elements to the container. When the children are manually placed under 33 | * another element, the call to insertBefore can occasionally fail due to 34 | * an invalid reference node. 35 | * 36 | * This is a temporary workaround which patches the container's native API 37 | * to not fail when called with invalid arguments. 38 | */ 39 | function patchVirtualContainer(container) { 40 | const originalInsertBefore = container.insertBefore; 41 | 42 | container.insertBefore = function (newNode, referenceNode) { 43 | if (referenceNode && referenceNode.parentNode === this) { 44 | return originalInsertBefore.call(this, newNode, referenceNode); 45 | } else { 46 | return originalInsertBefore.call(this, newNode, null); 47 | } 48 | }; 49 | } 50 | 51 | window.Vaadin ||= {}; 52 | window.Vaadin.FlowComponentHost ||= { patchVirtualContainer, getNode, setChildNodes }; 53 | 54 | class FlowComponentRenderer extends PolymerElement { 55 | static get template() { 56 | return html` 57 | 68 | 69 | `; 70 | } 71 | 72 | static get is() { 73 | return 'flow-component-renderer'; 74 | } 75 | static get properties() { 76 | return { 77 | nodeid: Number, 78 | appid: String, 79 | }; 80 | } 81 | static get observers() { 82 | return ['_attachRenderedComponentIfAble(appid, nodeid)']; 83 | } 84 | 85 | ready() { 86 | super.ready(); 87 | this.addEventListener('click', function (event) { 88 | if ( 89 | this.firstChild && 90 | typeof this.firstChild.click === 'function' && 91 | event.target === this 92 | ) { 93 | event.stopPropagation(); 94 | this.firstChild.click(); 95 | } 96 | }); 97 | this.addEventListener('animationend', this._onAnimationEnd); 98 | } 99 | 100 | _asyncAttachRenderedComponentIfAble() { 101 | this._debouncer = Debouncer.debounce(this._debouncer, idlePeriod, () => 102 | this._attachRenderedComponentIfAble() 103 | ); 104 | } 105 | 106 | _attachRenderedComponentIfAble() { 107 | if (this.appid == null) { 108 | return; 109 | } 110 | if (this.nodeid == null) { 111 | if (this.firstChild) { 112 | this.removeChild(this.firstChild); 113 | } 114 | return; 115 | } 116 | const renderedComponent = this._getRenderedComponent(); 117 | if (this.firstChild) { 118 | if (!renderedComponent) { 119 | this._asyncAttachRenderedComponentIfAble(); 120 | } else if (this.firstChild !== renderedComponent) { 121 | this.replaceChild(renderedComponent, this.firstChild); 122 | this._defineFocusTarget(); 123 | this.onComponentRendered(); 124 | } else { 125 | this._defineFocusTarget(); 126 | this.onComponentRendered(); 127 | } 128 | } else { 129 | if (renderedComponent) { 130 | this.appendChild(renderedComponent); 131 | this._defineFocusTarget(); 132 | this.onComponentRendered(); 133 | } else { 134 | this._asyncAttachRenderedComponentIfAble(); 135 | } 136 | } 137 | } 138 | 139 | _getRenderedComponent() { 140 | try { 141 | return window.Vaadin.Flow.clients[this.appid].getByNodeId(this.nodeid); 142 | } catch (error) { 143 | console.error( 144 | 'Could not get node %s from app %s', 145 | this.nodeid, 146 | this.appid 147 | ); 148 | console.error(error); 149 | } 150 | return null; 151 | } 152 | 153 | onComponentRendered() { 154 | // subclasses can override this method to execute custom logic on resize 155 | } 156 | 157 | /* Setting the `focus-target` attribute to the first focusable descendant 158 | starting from the firstChild necessary for the focus to be delegated 159 | within the flow-component-renderer when used inside a vaadin-grid cell */ 160 | _defineFocusTarget() { 161 | var focusable = this._getFirstFocusableDescendant(this.firstChild); 162 | if (focusable !== null) { 163 | focusable.setAttribute('focus-target', 'true'); 164 | } 165 | } 166 | 167 | _getFirstFocusableDescendant(node) { 168 | if (this._isFocusable(node)) { 169 | return node; 170 | } 171 | if (node.hasAttribute && (node.hasAttribute('disabled') || node.hasAttribute('hidden'))) { 172 | return null; 173 | } 174 | if (!node.children) { 175 | return null; 176 | } 177 | for (var i = 0; i < node.children.length; i++) { 178 | var focusable = this._getFirstFocusableDescendant(node.children[i]); 179 | if (focusable !== null) { 180 | return focusable; 181 | } 182 | } 183 | return null; 184 | } 185 | 186 | _isFocusable(node) { 187 | if ( 188 | node.hasAttribute && 189 | typeof node.hasAttribute === 'function' && 190 | (node.hasAttribute('disabled') || node.hasAttribute('hidden')) 191 | ) { 192 | return false; 193 | } 194 | 195 | return node.tabIndex === 0; 196 | } 197 | 198 | _onAnimationEnd(e) { 199 | // ShadyCSS applies scoping suffixes to animation names 200 | // To ensure that child is attached once element is unhidden 201 | // for when it was filtered out from, eg, ComboBox 202 | // https://github.com/vaadin/vaadin-flow-components/issues/437 203 | if (e.animationName.indexOf('flow-component-renderer-appear') === 0) { 204 | this._attachRenderedComponentIfAble(); 205 | } 206 | } 207 | } 208 | window.customElements.define(FlowComponentRenderer.is, FlowComponentRenderer); 209 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './Flow'; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/index.js: -------------------------------------------------------------------------------- 1 | export * from './Flow'; 2 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /frontend/generated/jar-resources/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/frontend/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './Flow';\n"]} -------------------------------------------------------------------------------- /frontend/generated/jar-resources/lit-renderer.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-restricted-syntax */ 2 | /* eslint-disable max-params */ 3 | import { html, render } from 'lit'; 4 | 5 | type RenderRoot = HTMLElement & { __litRenderer?: Renderer; _$litPart$?: any }; 6 | 7 | type ItemModel = { item: any; index: number }; 8 | 9 | type Renderer = ((root: RenderRoot, rendererOwner: HTMLElement, model: ItemModel) => void) & { __rendererId?: string }; 10 | 11 | type Component = HTMLElement & { [key: string]: Renderer | undefined }; 12 | 13 | const _window = window as any; 14 | _window.Vaadin = _window.Vaadin || {}; 15 | 16 | /** 17 | * Assigns the component a renderer function which uses Lit to render 18 | * the given template expression inside the render root element. 19 | * 20 | * @param component The host component to which the renderer runction is to be set 21 | * @param rendererName The name of the renderer function 22 | * @param templateExpression The content of the template literal passed to Lit for rendering. 23 | * @param returnChannel A channel to the server. 24 | * Calling it will end up invoking a handler in the server-side LitRenderer. 25 | * @param clientCallables A list of function names that can be called from within the template literal. 26 | * @param propertyNamespace LitRenderer-specific namespace for properties. 27 | * Needed to avoid property name collisions between renderers. 28 | */ 29 | _window.Vaadin.setLitRenderer = ( 30 | component: Component, 31 | rendererName: string, 32 | templateExpression: string, 33 | returnChannel: (name: string, itemKey: string, args: any[]) => void, 34 | clientCallables: string[], 35 | propertyNamespace: string, 36 | ) => { 37 | // Dynamically created function that renders the templateExpression 38 | // inside the given root element using Lit 39 | const renderFunction = Function(` 40 | "use strict"; 41 | 42 | const [render, html, returnChannel] = arguments; 43 | 44 | return (root, model, itemKey) => { 45 | const { item, index } = model; 46 | ${clientCallables 47 | .map((clientCallable) => { 48 | // Map all the client-callables as inline functions so they can be accessed from the template literal 49 | return ` 50 | const ${clientCallable} = (...args) => { 51 | if (itemKey !== undefined) { 52 | returnChannel('${clientCallable}', itemKey, args[0] instanceof Event ? [] : [...args]); 53 | } 54 | }`; 55 | }) 56 | .join('')} 57 | 58 | render(html\`${templateExpression}\`, root) 59 | } 60 | `)(render, html, returnChannel); 61 | 62 | const renderer: Renderer = (root, _, model) => { 63 | const { item } = model; 64 | // Clean up the root element of any existing content 65 | // (and Lit's _$litPart$ property) from other renderers 66 | // TODO: Remove once https://github.com/vaadin/web-components/issues/2235 is done 67 | if (root.__litRenderer !== renderer) { 68 | root.innerHTML = ''; 69 | delete root._$litPart$; 70 | root.__litRenderer = renderer; 71 | } 72 | 73 | // Map a new item that only includes the properties defined by 74 | // this specific LitRenderer instance. The renderer instance specific 75 | // "propertyNamespace" prefix is stripped from the property name at this point: 76 | // 77 | // item: { key: "2", lr_3_lastName: "Tyler"} 78 | // -> 79 | // mappedItem: { lastName: "Tyler" } 80 | const mappedItem: { [key: string]: any } = {}; 81 | for (const key in item) { 82 | if (key.startsWith(propertyNamespace)) { 83 | mappedItem[key.replace(propertyNamespace, '')] = item[key]; 84 | } 85 | } 86 | 87 | renderFunction(root, { ...model, item: mappedItem }, item.key); 88 | }; 89 | 90 | renderer.__rendererId = propertyNamespace; 91 | component[rendererName] = renderer; 92 | }; 93 | 94 | /** 95 | * Removes the renderer function with the given name from the component 96 | * if the propertyNamespace matches the renderer's id. 97 | * 98 | * @param component The host component whose renderer function is to be removed 99 | * @param rendererName The name of the renderer function 100 | * @param rendererId The rendererId of the function to be removed 101 | */ 102 | _window.Vaadin.unsetLitRenderer = (component: Component, rendererName: string, rendererId: string) => { 103 | // The check for __rendererId property is necessary since the renderer function 104 | // may get overridden by another renderer, for example, by one coming from 105 | // vaadin-template-renderer. We don't want LitRenderer registration cleanup to 106 | // unintentionally remove the new renderer. 107 | if (component[rendererName]?.__rendererId === rendererId) { 108 | component[rendererName] = undefined; 109 | } 110 | }; 111 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/menubarConnector.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2023 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | import './contextMenuConnector.js'; 17 | 18 | (function () { 19 | const tryCatchWrapper = function (callback) { 20 | return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Menu Bar'); 21 | }; 22 | 23 | /** 24 | * Initializes the connector for a menu bar element. 25 | * 26 | * @param {HTMLElement} menubar 27 | * @param {string} appId 28 | */ 29 | function initLazy(menubar, appId) { 30 | if (menubar.$connector) { 31 | return; 32 | } 33 | 34 | const observer = new MutationObserver((records) => { 35 | const hasChangedAttributes = records.some((entry) => { 36 | const oldValue = entry.oldValue; 37 | const newValue = entry.target.getAttribute(entry.attributeName); 38 | return oldValue !== newValue; 39 | }); 40 | 41 | if (hasChangedAttributes) { 42 | menubar.$connector.generateItems(); 43 | } 44 | }); 45 | 46 | menubar.$connector = { 47 | /** 48 | * Generates and assigns the items to the menu bar. 49 | * 50 | * When the method is called without providing a node id, 51 | * the previously generated items tree will be used. 52 | * That can be useful if you only want to sync the disabled and hidden properties of root items. 53 | * 54 | * @param {number | undefined} nodeId 55 | */ 56 | generateItems: tryCatchWrapper((nodeId) => { 57 | if (!menubar.shadowRoot) { 58 | // workaround for https://github.com/vaadin/flow/issues/5722 59 | setTimeout(() => menubar.$connector.generateItems(nodeId)); 60 | return; 61 | } 62 | 63 | if (nodeId) { 64 | menubar.__generatedItems = window.Vaadin.Flow.contextMenuConnector.generateItemsTree(appId, nodeId); 65 | } 66 | 67 | let items = menubar.__generatedItems || []; 68 | 69 | // Propagate disabled state from items to parent buttons 70 | items.forEach((item) => (item.disabled = item.component.disabled)); 71 | 72 | // Observe for hidden and disabled attributes in case they are changed by Flow. 73 | // When a change occurs, the observer will re-generate items on top of the existing tree 74 | // to sync the new attribute values with the corresponding properties in the items array. 75 | items.forEach((item) => { 76 | observer.observe(item.component, { 77 | attributeFilter: ['hidden', 'disabled'], 78 | attributeOldValue: true 79 | }); 80 | }); 81 | 82 | // Remove hidden items entirely from the array. Just hiding them 83 | // could cause the overflow button to be rendered without items. 84 | // 85 | // The items-prop needs to be set even when all items are visible 86 | // to update the disabled state and re-render buttons. 87 | items = items.filter((item) => !item.component.hidden); 88 | 89 | menubar.items = items; 90 | 91 | // Propagate click events from the menu buttons to the item components 92 | menubar._buttons.forEach((button) => { 93 | if (button.item && button.item.component) { 94 | button.addEventListener('click', (e) => { 95 | if (e.composedPath().indexOf(button.item.component) === -1) { 96 | button.item.component.click(); 97 | e.stopPropagation(); 98 | } 99 | }); 100 | } 101 | }); 102 | }) 103 | }; 104 | } 105 | 106 | function setClassName (component) { 107 | if (component._item) { 108 | component._item.className = component.className; 109 | } 110 | } 111 | 112 | window.Vaadin.Flow.menubarConnector = { 113 | initLazy(...args) { 114 | return tryCatchWrapper(initLazy)(...args); 115 | }, 116 | setClassName(...args) { 117 | return tryCatchWrapper(setClassName)(...args); 118 | } 119 | }; 120 | })(); 121 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/messageListConnector.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2023 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | (function () { 18 | const tryCatchWrapper = function (callback) { 19 | return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Message List'); 20 | }; 21 | 22 | window.Vaadin.Flow.messageListConnector = { 23 | setItems: (list, items, locale) => 24 | tryCatchWrapper(function (list, items, locale) { 25 | const formatter = new Intl.DateTimeFormat(locale, { 26 | year: 'numeric', 27 | month: 'short', 28 | day: 'numeric', 29 | hour: 'numeric', 30 | minute: 'numeric' 31 | }); 32 | list.items = items.map((item) => 33 | item.time 34 | ? Object.assign(item, { 35 | time: formatter.format(new Date(item.time)) 36 | }) 37 | : item 38 | ); 39 | })(list, items, locale) 40 | }; 41 | })(); 42 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/selectConnector.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | const tryCatchWrapper = function (callback) { 3 | return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Select'); 4 | }; 5 | 6 | window.Vaadin.Flow.selectConnector = { 7 | initLazy: (select) => 8 | tryCatchWrapper(function (select) { 9 | const _findListBoxElement = tryCatchWrapper(function () { 10 | for (let i = 0; i < select.childElementCount; i++) { 11 | const child = select.children[i]; 12 | if ('VAADIN-SELECT-LIST-BOX' === child.tagName.toUpperCase()) { 13 | return child; 14 | } 15 | } 16 | }); 17 | 18 | // do not init this connector twice for the given select 19 | if (select.$connector) { 20 | return; 21 | } 22 | 23 | select.$connector = {}; 24 | 25 | select.renderer = tryCatchWrapper(function (root) { 26 | const listBox = _findListBoxElement(); 27 | if (listBox) { 28 | if (root.firstChild) { 29 | root.removeChild(root.firstChild); 30 | } 31 | root.appendChild(listBox); 32 | } 33 | }); 34 | })(select) 35 | }; 36 | })(); 37 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/theme-util.js: -------------------------------------------------------------------------------- 1 | import stripCssComments from 'strip-css-comments'; 2 | 3 | // Safari 15 - 16.3, polyfilled 4 | const polyfilledSafari = CSSStyleSheet.toString().includes('document.createElement'); 5 | 6 | const createLinkReferences = (css, target) => { 7 | // Unresolved urls are written as '@import url(text);' or '@import "text";' to the css 8 | // media query can be present on @media tag or on @import directive after url 9 | // Note that with Vite production build there is no space between @import and "text" 10 | // [0] is the full match 11 | // [1] matches the media query 12 | // [2] matches the url 13 | // [3] matches the quote char surrounding in '@import "..."' 14 | // [4] matches the url in '@import "..."' 15 | // [5] matches media query on @import statement 16 | const importMatcher = 17 | /(?:@media\s(.+?))?(?:\s{)?\@import\s*(?:url\(\s*['"]?(.+?)['"]?\s*\)|(["'])((?:\\.|[^\\])*?)\3)([^;]*);(?:})?/g; 18 | 19 | // Only cleanup if comment exist 20 | if (/\/\*(.|[\r\n])*?\*\//gm.exec(css) != null) { 21 | // clean up comments 22 | css = stripCssComments(css); 23 | } 24 | 25 | var match; 26 | var styleCss = css; 27 | 28 | // For each external url import add a link reference 29 | while ((match = importMatcher.exec(css)) !== null) { 30 | styleCss = styleCss.replace(match[0], ''); 31 | const link = document.createElement('link'); 32 | link.rel = 'stylesheet'; 33 | link.href = match[2] || match[4]; 34 | const media = match[1] || match[5]; 35 | if (media) { 36 | link.media = media; 37 | } 38 | // For target document append to head else append to target 39 | if (target === document) { 40 | document.head.appendChild(link); 41 | } else { 42 | target.appendChild(link); 43 | } 44 | } 45 | return styleCss; 46 | }; 47 | 48 | const addAdoptedStyleSafariPolyfill = (sheet, target, first) => { 49 | if (first) { 50 | target.adoptedStyleSheets = [sheet, ...target.adoptedStyleSheets]; 51 | } else { 52 | target.adoptedStyleSheets = [...target.adoptedStyleSheets, sheet]; 53 | } 54 | return () => { 55 | target.adoptedStyleSheets = target.adoptedStyleSheets.filter((ss) => ss !== sheet); 56 | }; 57 | }; 58 | 59 | const addAdoptedStyle = (cssText, target, first) => { 60 | const sheet = new CSSStyleSheet(); 61 | sheet.replaceSync(cssText); 62 | if (polyfilledSafari) { 63 | return addAdoptedStyleSafariPolyfill(sheet, target, first); 64 | } 65 | if (first) { 66 | target.adoptedStyleSheets.splice(0, 0, sheet); 67 | } else { 68 | target.adoptedStyleSheets.push(sheet); 69 | } 70 | return () => { 71 | target.adoptedStyleSheets.splice(target.adoptedStyleSheets.indexOf(sheet), 1); 72 | }; 73 | }; 74 | 75 | const addStyleTag = (cssText, referenceComment) => { 76 | const styleTag = document.createElement('style'); 77 | styleTag.type = 'text/css'; 78 | styleTag.textContent = cssText; 79 | 80 | let beforeThis = undefined; 81 | if (referenceComment) { 82 | const comments = Array.from(document.head.childNodes).filter(elem => elem.nodeType === Node.COMMENT_NODE); 83 | const container = comments.find(comment => comment.data.trim() === referenceComment); 84 | if (container) { 85 | beforeThis = container; 86 | } 87 | } 88 | document.head.insertBefore(styleTag, beforeThis); 89 | return () => { 90 | styleTag.remove(); 91 | }; 92 | }; 93 | 94 | // target: Document | ShadowRoot 95 | export const injectGlobalCss = (css, referenceComment, target, first) => { 96 | if (target === document) { 97 | const hash = getHash(css); 98 | if (window.Vaadin.theme.injectedGlobalCss.indexOf(hash) !== -1) { 99 | return; 100 | } 101 | window.Vaadin.theme.injectedGlobalCss.push(hash); 102 | } 103 | const cssText = createLinkReferences(css, target); 104 | 105 | // We avoid mixing style tags and adoptedStyleSheets to make override order clear 106 | if (target === document) { 107 | return addStyleTag(cssText, referenceComment); 108 | } 109 | 110 | return addAdoptedStyle(cssText, target, first); 111 | }; 112 | 113 | window.Vaadin = window.Vaadin || {}; 114 | window.Vaadin.theme = window.Vaadin.theme || {}; 115 | window.Vaadin.theme.injectedGlobalCss = []; 116 | 117 | /** 118 | * Calculate a 32 bit FNV-1a hash 119 | * Found here: https://gist.github.com/vaiorabbit/5657561 120 | * Ref.: http://isthe.com/chongo/tech/comp/fnv/ 121 | * 122 | * @param {string} str the input value 123 | * @returns {string} 32 bit (as 8 byte hex string) 124 | */ 125 | function hashFnv32a(str) { 126 | /*jshint bitwise:false */ 127 | let i, 128 | l, 129 | hval = 0x811c9dc5; 130 | 131 | for (i = 0, l = str.length; i < l; i++) { 132 | hval ^= str.charCodeAt(i); 133 | hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24); 134 | } 135 | 136 | // Convert to 8 digit hex string 137 | return ('0000000' + (hval >>> 0).toString(16)).substr(-8); 138 | } 139 | 140 | /** 141 | * Calculate a 64 bit hash for the given input. 142 | * Double hash is used to significantly lower the collision probability. 143 | * 144 | * @param {string} input value to get hash for 145 | * @returns {string} 64 bit (as 16 byte hex string) 146 | */ 147 | function getHash(input) { 148 | let h1 = hashFnv32a(input); // returns 32 bit (as 8 byte hex string) 149 | return h1 + hashFnv32a(h1 + input); 150 | } 151 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/tooltip.ts: -------------------------------------------------------------------------------- 1 | import { Tooltip } from '@vaadin/tooltip/src/vaadin-tooltip.js'; 2 | 3 | const _window = window as any; 4 | _window.Vaadin ||= {}; 5 | _window.Vaadin.Flow ||= {}; 6 | _window.Vaadin.Flow.tooltip ||= {}; 7 | 8 | Object.assign(_window.Vaadin.Flow.tooltip, { 9 | setDefaultHideDelay: (hideDelay: number) => Tooltip.setDefaultHideDelay(hideDelay), 10 | setDefaultFocusDelay: (focusDelay: number) => Tooltip.setDefaultFocusDelay(focusDelay), 11 | setDefaultHoverDelay: (hoverDelay: number) => Tooltip.setDefaultHoverDelay(hoverDelay) 12 | }); 13 | 14 | const { defaultHideDelay, defaultFocusDelay, defaultHoverDelay } = _window.Vaadin.Flow.tooltip; 15 | if (defaultHideDelay) { 16 | Tooltip.setDefaultHideDelay(defaultHideDelay); 17 | } 18 | if (defaultFocusDelay) { 19 | Tooltip.setDefaultFocusDelay(defaultFocusDelay); 20 | } 21 | if (defaultHoverDelay) { 22 | Tooltip.setDefaultHoverDelay(defaultHoverDelay); 23 | } 24 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-big-decimal-field.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2023 Vaadin Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | (function () { 17 | let memoizedTemplate; 18 | 19 | customElements.whenDefined('vaadin-text-field').then(() => { 20 | class BigDecimalFieldElement extends customElements.get('vaadin-text-field') { 21 | static get template() { 22 | if (!memoizedTemplate) { 23 | memoizedTemplate = super.template.cloneNode(true); 24 | memoizedTemplate.innerHTML += ``; 37 | } 38 | return memoizedTemplate; 39 | } 40 | 41 | static get is() { 42 | return 'vaadin-big-decimal-field'; 43 | } 44 | 45 | static get properties() { 46 | return { 47 | _decimalSeparator: { 48 | type: String, 49 | value: '.', 50 | observer: '__decimalSeparatorChanged' 51 | } 52 | }; 53 | } 54 | 55 | ready() { 56 | super.ready(); 57 | this.inputElement.setAttribute('inputmode', 'decimal'); 58 | } 59 | 60 | __decimalSeparatorChanged(separator, oldSeparator) { 61 | this.allowedCharPattern = '[-+\\d' + separator + ']'; 62 | 63 | if (this.value && oldSeparator) { 64 | this.value = this.value.split(oldSeparator).join(separator); 65 | } 66 | } 67 | } 68 | 69 | customElements.define(BigDecimalFieldElement.is, BigDecimalFieldElement); 70 | }); 71 | })(); 72 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts: -------------------------------------------------------------------------------- 1 | import { ServerMessage } from "./vaadin-dev-tools"; 2 | export interface Product { 3 | name: string; 4 | version: string; 5 | } 6 | export interface ProductAndMessage { 7 | message: string; 8 | messageHtml?: string; 9 | product: Product; 10 | } 11 | export declare const findAll: (element: Element | ShadowRoot | Document, tags: string[]) => Element[]; 12 | export declare const licenseCheckOk: (data: Product) => void; 13 | export declare const licenseCheckFailed: (data: ProductAndMessage) => void; 14 | export declare const licenseCheckNoKey: (data: ProductAndMessage) => void; 15 | export declare const handleLicenseMessage: (message: ServerMessage) => boolean; 16 | export declare const licenseInit: () => void; 17 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-eed3b794.js: -------------------------------------------------------------------------------- 1 | import{t as a,s as o,i}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-accordion",displayName:"Accordion",elements:[{selector:"vaadin-accordion > vaadin-accordion-panel > vaadin-accordion-heading",displayName:"Heading",properties:[a.textColor,a.fontSize,o.padding]},{selector:"vaadin-accordion > vaadin-accordion-panel > vaadin-accordion-heading::part(toggle)",displayName:"Toggle",properties:[i.iconColor,i.iconSize]},{selector:"vaadin-accordion > vaadin-accordion-panel",displayName:"Panel",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-heading-c0acdd6d.js: -------------------------------------------------------------------------------- 1 | import{html as e}from"lit";import{t as o,s as a,i}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-accordion-heading",displayName:"Accordion Heading",description:e`You are trying to style selected heading only, if you wish to style all panel headings of given 2 | accordion please pick vaadin-accordion instead.`,notAccessibleDescription:e`If you wish to style all panel headings of current accordion please pick 3 | vaadin-accordion instead.`,elements:[{selector:"vaadin-accordion-heading",displayName:"Heading",properties:[o.textColor,o.fontSize,a.padding]},{selector:"vaadin-accordion-heading::part(toggle)",displayName:"Toggle",properties:[i.iconColor,i.iconSize]}]};export{p as default}; 4 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-panel-616e55d6.js: -------------------------------------------------------------------------------- 1 | import{s as o}from"../vaadin-dev-tools.js";import{html as e}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-accordion-panel",displayName:"Accordion Panel",description:e`You are styling selected panel only, if you wish to style all panel of given accordion please pick 2 | vaadin-accordion instead.`,notAccessibleDescription:e`If you wish to style all panels of current accordion please pick 3 | vaadin-accordion instead.`,elements:[{selector:"vaadin-accordion-panel",displayName:"Panel",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{l as default}; 4 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-app-layout-e56de2e9.js: -------------------------------------------------------------------------------- 1 | import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-app-layout",displayName:"App Layout",elements:[{selector:"vaadin-app-layout",displayName:"Layout",properties:[a.backgroundColor]},{selector:"vaadin-app-layout::part(drawer)",displayName:"Drawer",properties:[a.backgroundColor,a.padding]},{selector:"vaadin-app-layout::part(navbar)",displayName:"Navbar",properties:[a.backgroundColor,a.padding]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-avatar-7599297d.js: -------------------------------------------------------------------------------- 1 | import{s as a,E as r,p as t,t as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-avatar",displayName:"Avatar",elements:[{selector:"vaadin-avatar",displayName:"Root element",properties:[a.backgroundColor,a.borderColor,a.borderWidth,{propertyName:"--vaadin-avatar-size",displayName:"Size",editorType:r.range,presets:t.lumoSize,icon:"square"}]},{selector:"vaadin-avatar::part(abbr)",displayName:"Abbreviation",properties:[e.textColor,e.fontWeight]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-big-decimal-field-e51def24.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as e,labelProperties as i,helperTextProperties as r,errorMessageProperties as a}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as t}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const g={tagName:"vaadin-big-decimal-field",displayName:"BigDecimal Field",elements:[{selector:"vaadin-big-decimal-field::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-big-decimal-field::part(label)",displayName:"Label",properties:i},{selector:"vaadin-big-decimal-field::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-big-decimal-field::part(error-message)",displayName:"Error message",properties:a},{selector:"vaadin-big-decimal-field::part(clear-button)",displayName:"Clear button",properties:t}]};export{g as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-828ebdea.js: -------------------------------------------------------------------------------- 1 | import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-board",displayName:"Board",elements:[{selector:"vaadin-board",displayName:"Layout",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]},{selector:"vaadin-board vaadin-board-row",displayName:"Row",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-row-c70d0c55.js: -------------------------------------------------------------------------------- 1 | import{s as o}from"../vaadin-dev-tools.js";import{html as r}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-board-row",description:r`You are styling selected row only, if you wish to style all rows of given board please pick 2 | vaadin-board instead.`,notAccessibleDescription:r`If you wish to style all rows of current board please pick 3 | vaadin-board instead.`,displayName:"Board Row",elements:[{selector:"vaadin-board-row",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding]}]};export{l as default}; 4 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-button-2511ad84.js: -------------------------------------------------------------------------------- 1 | import{c as t,s as e,E as r,p as o,f as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s=[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,{propertyName:"--lumo-button-size",displayName:"Size",editorType:r.range,presets:o.lumoSize,icon:"square"},a.paddingInline],u={tagName:"vaadin-button",displayName:"Button",elements:[{selector:"vaadin-button",displayName:"Root element",properties:s},{selector:"vaadin-button::part(label)",displayName:"Label",properties:t}]};export{u as default,s as standardButtonProperties}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-chart-5192dc15.js: -------------------------------------------------------------------------------- 1 | import{a as r,E as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-chart",displayName:"Chart",elements:[{selector:"vaadin-chart",displayName:"Root element",properties:r},{selector:"vaadin-chart",displayName:"Data series",properties:[{propertyName:"--vaadin-charts-color-0",displayName:"Color 0",editorType:o.color},{propertyName:"--vaadin-charts-color-1",displayName:"Color 1",editorType:o.color},{propertyName:"--vaadin-charts-color-2",displayName:"Color 2",editorType:o.color},{propertyName:"--vaadin-charts-color-3",displayName:"Color 3",editorType:o.color},{propertyName:"--vaadin-charts-color-4",displayName:"Color 4",editorType:o.color},{propertyName:"--vaadin-charts-color-5",displayName:"Color 5",editorType:o.color},{propertyName:"--vaadin-charts-color-6",displayName:"Color 6",editorType:o.color},{propertyName:"--vaadin-charts-color-7",displayName:"Color 7",editorType:o.color},{propertyName:"--vaadin-charts-color-8",displayName:"Color 8",editorType:o.color},{propertyName:"--vaadin-charts-color-9",displayName:"Color 9",editorType:o.color}]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-4e68df64.js: -------------------------------------------------------------------------------- 1 | import{E as r,p as t,s as e,i as a,t as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={selector:"vaadin-checkbox",displayName:"Checkbox",properties:[{propertyName:"--vaadin-checkbox-size",displayName:"Checkbox size",defaultValue:"var(--lumo-font-size-l)",editorType:r.range,presets:t.lumoFontSize,icon:"square"}]},s={selector:"vaadin-checkbox::part(checkbox)",displayName:"Checkbox box",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius]},i={selector:"vaadin-checkbox[checked]::part(checkbox)",stateAttribute:"checked",displayName:"Checkbox box (when checked)",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius]},p={selector:"vaadin-checkbox::part(checkbox)::after",displayName:"Checkmark",properties:[a.iconColor]},l={selector:"vaadin-checkbox label",displayName:"Label",properties:[o.textColor,o.fontSize,o.fontWeight,o.fontStyle]},x={tagName:"vaadin-checkbox",displayName:"Checkbox",elements:[c,s,i,p,l]};export{s as checkboxElement,i as checkedCheckboxElement,p as checkmarkElement,x as default,c as hostElement,l as labelElement}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-group-a7c65bf2.js: -------------------------------------------------------------------------------- 1 | import{s as e}from"../vaadin-dev-tools.js";import{labelProperties as i,helperTextProperties as m,errorMessageProperties as d}from"./vaadin-text-field-0b3db014.js";import{hostElement as a,checkboxElement as t,checkedCheckboxElement as c,checkmarkElement as l,labelElement as p}from"./vaadin-checkbox-4e68df64.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const C={tagName:"vaadin-checkbox-group",displayName:"Checkbox Group",elements:[{selector:"vaadin-checkbox-group",displayName:"Root element",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-checkbox-group::part(label)",displayName:"Label",properties:i},{selector:"vaadin-checkbox-group::part(helper-text)",displayName:"Helper text",properties:m},{selector:"vaadin-checkbox-group::part(error-message)",displayName:"Error message",properties:d},{...a,selector:`vaadin-checkbox-group ${a.selector}`,displayName:"Checkboxes"},{...t,selector:`vaadin-checkbox-group ${t.selector}`,displayName:"Checkmark boxes"},{...c,selector:`vaadin-checkbox-group ${c.selector}`,displayName:"Checkmark boxes (when checked)",stateElementSelector:"vaadin-checkbox-group vaadin-checkbox"},{...l,selector:`vaadin-checkbox-group ${l.selector}`,displayName:"Checkmarks"},{...p,selector:`vaadin-checkbox-group ${p.selector}`,displayName:"Checkbox labels"}],setupElement(s){const r=document.createElement("vaadin-checkbox"),o=document.createElement("label");o.textContent="Some label",o.setAttribute("slot","label"),r.append(o),s.append(r)}};export{C as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-combo-box-96451ddd.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as s,labelProperties as l,helperTextProperties as p,errorMessageProperties as m}from"./vaadin-text-field-0b3db014.js";import{i as a,s as r,t as i,b as n,h as b}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-combo-box",displayName:"Combo Box",elements:[{selector:"vaadin-combo-box::part(input-field)",displayName:"Input field",properties:s},{selector:"vaadin-combo-box::part(toggle-button)",displayName:"Toggle button",properties:[a.iconColor,a.iconSize]},{selector:"vaadin-combo-box::part(label)",displayName:"Label",properties:l},{selector:"vaadin-combo-box::part(helper-text)",displayName:"Helper text",properties:p},{selector:"vaadin-combo-box::part(error-message)",displayName:"Error message",properties:m},{selector:"vaadin-combo-box-overlay::part(overlay)",displayName:"Overlay",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]},{selector:"vaadin-combo-box-overlay vaadin-combo-box-item",displayName:"Overlay items",properties:[i.textColor,i.fontSize,i.fontWeight]},{selector:"vaadin-combo-box-overlay vaadin-combo-box-item::part(checkmark)::before",displayName:"Overlay item checkmark",properties:[a.iconColor,a.iconSize]}],async setupElement(o){o.overlayClass=o.getAttribute("class")},openOverlay:o=>{const e=o.element,t=e.$.overlay;n(e,e,t)},hideOverlay:o=>{const e=o.element,t=e.$.overlay;b(e,e,t)}};export{u as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-confirm-dialog-4d718829.js: -------------------------------------------------------------------------------- 1 | import{a,c as e}from"../vaadin-dev-tools.js";import{standardButtonProperties as o}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-confirm-dialog",displayName:"Confirm Dialog",elements:[{selector:"vaadin-confirm-dialog-overlay::part(backdrop)",displayName:"Modality curtain (backdrop)",properties:a},{selector:"vaadin-confirm-dialog-overlay::part(overlay)",displayName:"Dialog surface",properties:a},{selector:"vaadin-confirm-dialog-overlay::part(header)",displayName:"Header",properties:[...a,...e]},{selector:"vaadin-confirm-dialog-overlay::part(content)",displayName:"Content",properties:a},{selector:"vaadin-confirm-dialog-overlay::part(message)",displayName:"Message",properties:e},{selector:"vaadin-confirm-dialog-overlay::part(footer)",displayName:"Footer",properties:a},{selector:'vaadin-confirm-dialog-overlay > [slot="confirm-button"]',displayName:"Confirm button",properties:o},{selector:'vaadin-confirm-dialog-overlay > [slot="confirm-button"]::part(label)',displayName:"Confirm button label",properties:e},{selector:'vaadin-confirm-dialog-overlay > [slot="reject-button"]',displayName:"Reject button",properties:o},{selector:'vaadin-confirm-dialog-overlay > [slot="reject-button"]::part(label)',displayName:"Reject button label",properties:e},{selector:'vaadin-confirm-dialog-overlay > [slot="cancel-button"]',displayName:"Cancel button",properties:o},{selector:'vaadin-confirm-dialog-overlay > [slot="cancel-button"]::part(label)',displayName:"Cancel button label",properties:e}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-cookie-consent-46c09f8b.js: -------------------------------------------------------------------------------- 1 | import{a as e,c as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-cookie-consent",displayName:"Cookie Consent",elements:[{selector:"div.cc-banner",displayName:"Banner",properties:e},{selector:"div.cc-banner span.cc-message",displayName:"Message",properties:a},{selector:"div.cc-banner a.cc-btn",displayName:"Button",properties:[...e,...a]}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-crud-8d161a22.js: -------------------------------------------------------------------------------- 1 | import{s as r,i as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const n={tagName:"vaadin-crud",displayName:"CRUD",elements:[{selector:"vaadin-crud",displayName:"Root element",properties:[r.borderColor,r.borderWidth]},{selector:"vaadin-crud::part(toolbar)",displayName:"Toolbar below grid",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.padding]},{selector:"vaadin-crud::part(editor)",displayName:"Editor panel",properties:[r.backgroundColor]},{selector:"vaadin-crud vaadin-crud-edit",displayName:"Edit button in grid",properties:[r.backgroundColor,r.borderColor,r.borderWidth]},{selector:"vaadin-crud vaadin-crud-edit::part(icon)::before",displayName:"Edit button in grid icon",properties:[o.iconColor,o.iconSize]}]};export{n as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-custom-field-42c85b9e.js: -------------------------------------------------------------------------------- 1 | import{labelProperties as e,helperTextProperties as r,errorMessageProperties as t}from"./vaadin-text-field-0b3db014.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-custom-field",displayName:"Custom Field",elements:[{selector:"vaadin-custom-field::part(label)",displayName:"Label",properties:e},{selector:"vaadin-custom-field::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-custom-field::part(error-message)",displayName:"Error message",properties:t}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-picker-f2001167.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as i,labelProperties as p,helperTextProperties as l,errorMessageProperties as d}from"./vaadin-text-field-0b3db014.js";import{i as o,s as r,t as e,b as n,h as s}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const b={tagName:"vaadin-date-picker",displayName:"Date Picker",elements:[{selector:"vaadin-date-picker::part(input-field)",displayName:"Input field",properties:i},{selector:"vaadin-date-picker::part(toggle-button)",displayName:"Toggle button",properties:[o.iconColor,o.iconSize]},{selector:"vaadin-date-picker::part(label)",displayName:"Label",properties:p},{selector:"vaadin-date-picker::part(helper-text)",displayName:"Helper text",properties:l},{selector:"vaadin-date-picker::part(error-message)",displayName:"Error message",properties:d},{selector:"vaadin-date-picker-overlay::part(overlay)",displayName:"Overlay content",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]},{selector:"vaadin-date-picker-overlay vaadin-month-calendar::part(month-header)",displayName:"Month header",properties:[e.textColor,e.fontSize,e.fontWeight,e.fontStyle]},{selector:"vaadin-date-picker-overlay vaadin-month-calendar::part(weekday)",displayName:"Weekday",properties:[e.textColor,e.fontSize,e.fontWeight,e.fontStyle]},{selector:"vaadin-date-picker-overlay vaadin-month-calendar::part(date)",displayName:"Day",properties:[e.textColor,e.fontSize,e.fontWeight,e.fontStyle,r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius]},{selector:"vaadin-date-picker-overlay vaadin-date-picker-year::part(year-number)",displayName:"Year number",properties:[e.textColor,e.fontSize,e.fontWeight,e.fontStyle]}],openOverlay:t=>{if(!t||!t.element)return;const a=t.element;n(a,a,a)},hideOverlay:t=>{const a=t.element;s(a,a,a)}};export{b as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-time-picker-c8c047a7.js: -------------------------------------------------------------------------------- 1 | import{labelProperties as e,helperTextProperties as r,errorMessageProperties as t}from"./vaadin-text-field-0b3db014.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-date-time-picker",displayName:"Date Time Picker",elements:[{selector:"vaadin-date-time-picker::part(label)",displayName:"Label",properties:e},{selector:"vaadin-date-time-picker::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-date-time-picker::part(error-message)",displayName:"Error message",properties:t}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-bf336660.js: -------------------------------------------------------------------------------- 1 | import{a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-details",displayName:"Details",elements:[{selector:"vaadin-details",displayName:"Root element",properties:a}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-summary-351a1448.js: -------------------------------------------------------------------------------- 1 | import{t as a,s as t,i as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-details-summary",displayName:"Details Summary",elements:[{selector:"vaadin-details-summary",displayName:"Summary",properties:[a.textColor,a.fontSize,t.padding]},{selector:"vaadin-details-summary::part(toggle)",displayName:"Toggle",properties:[e.iconColor,e.iconSize]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-dialog-53253a08.js: -------------------------------------------------------------------------------- 1 | import{a,c as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-dialog",displayName:"Dialog",elements:[{selector:"vaadin-dialog-overlay::part(backdrop)",displayName:"Modality curtain (backdrop)",properties:a},{selector:"vaadin-dialog-overlay::part(overlay)",displayName:"Dialog surface",properties:a},{selector:"vaadin-dialog-overlay::part(header)",displayName:"Header",properties:a},{selector:"vaadin-dialog-overlay::part(title)",displayName:"Title",properties:e},{selector:"vaadin-dialog-overlay::part(content)",displayName:"Content",properties:a},{selector:"vaadin-dialog-overlay::part(footer)",displayName:"Footer",properties:a}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-email-field-d7a35f04.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as e,labelProperties as r,helperTextProperties as a,errorMessageProperties as i}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as t}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={tagName:"vaadin-email-field",displayName:"Email Field",elements:[{selector:"vaadin-email-field::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-email-field::part(label)",displayName:"Label",properties:r},{selector:"vaadin-email-field::part(helper-text)",displayName:"Helper text",properties:a},{selector:"vaadin-email-field::part(error-message)",displayName:"Error message",properties:i},{selector:"vaadin-email-field::part(clear-button)",displayName:"Clear button",properties:t}]};export{c as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-form-layout-47744b1d.js: -------------------------------------------------------------------------------- 1 | import{s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-form-layout",displayName:"Form Layout",elements:[{selector:"vaadin-form-layout",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-0a4791c2.js: -------------------------------------------------------------------------------- 1 | import{s as o,t as e,i}from"../vaadin-dev-tools.js";import{checkboxElement as t,checkedCheckboxElement as a}from"./vaadin-checkbox-4e68df64.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const r=[e.textColor,e.fontSize,e.fontWeight,e.fontStyle,o.backgroundColor],g={tagName:"vaadin-grid",displayName:"Grid",elements:[{selector:"vaadin-grid",displayName:"Root element",properties:[o.borderColor,o.borderWidth]},{selector:"vaadin-grid::part(header-cell)",displayName:"Header row cell",properties:[e.textColor,{...e.fontSize,propertyName:"--lumo-font-size-s"},e.fontStyle,o.backgroundColor]},{selector:"vaadin-grid::part(body-cell)",displayName:"Body cell",properties:r},{selector:"vaadin-grid::part(even-row-cell)",displayName:"Cell in even row",properties:r},{selector:"vaadin-grid::part(odd-row-cell)",displayName:"Cell in odd row",properties:r},{selector:"vaadin-grid::part(selected-row-cell)",displayName:"Cell in selected row",properties:r},{selector:"vaadin-grid vaadin-grid-cell-content > vaadin-checkbox::part(checkbox)",displayName:"Row selection checkbox",properties:t.properties},{selector:"vaadin-grid vaadin-grid-cell-content > vaadin-checkbox[checked]::part(checkbox)",displayName:"Row selection checkbox (when checked)",properties:a.properties},{selector:"vaadin-grid vaadin-grid-cell-content > vaadin-checkbox::part(checkbox)::after",displayName:"Row selection checkbox checkmark",properties:[i.iconColor]},{selector:"vaadin-grid vaadin-grid-tree-toggle::part(toggle)",displayName:"Expand icon (for tree grid)",properties:[i.iconColor]}]};export{r as cellProperties,g as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-pro-ff415555.js: -------------------------------------------------------------------------------- 1 | import{s as r,t as o,i as a,E as t,p}from"../vaadin-dev-tools.js";import{checkboxElement as d,checkedCheckboxElement as l}from"./vaadin-checkbox-4e68df64.js";import{cellProperties as e}from"./vaadin-grid-0a4791c2.js";import{inputFieldProperties as i}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const x={tagName:"vaadin-grid-pro",displayName:"Grid Pro",elements:[{selector:"vaadin-grid-pro",displayName:"Root element",properties:[r.borderColor,r.borderWidth]},{selector:"vaadin-grid-pro::part(header-cell)",displayName:"Header row cell",properties:[o.textColor,{...o.fontSize,propertyName:"--lumo-font-size-s"},o.fontStyle,r.backgroundColor]},{selector:"vaadin-grid-pro::part(body-cell)",displayName:"Body cell",properties:e},{selector:"vaadin-grid-pro::part(even-row-cell)",displayName:"Cell in even row",properties:e},{selector:"vaadin-grid-pro::part(odd-row-cell)",displayName:"Cell in odd row",properties:e},{selector:"vaadin-grid-pro::part(selected-row-cell)",displayName:"Cell in selected row",properties:e},{selector:"vaadin-grid-pro vaadin-grid-cell-content > vaadin-checkbox::part(checkbox)",displayName:"Row selection checkbox",properties:d.properties},{selector:"vaadin-grid-pro vaadin-grid-cell-content > vaadin-checkbox[checked]::part(checkbox)",displayName:"Row selection checkbox (when checked)",properties:l.properties},{selector:"vaadin-grid-pro vaadin-grid-cell-content > vaadin-checkbox::part(checkbox)::after",displayName:"Row selection checkbox checkmark",properties:[a.iconColor]},{selector:"vaadin-grid-pro vaadin-grid-pro-edit-text-field",displayName:"Text field editor",properties:i},{selector:"vaadin-grid-pro vaadin-grid-pro-edit-checkbox",displayName:"Checkbox editor",properties:[{propertyName:"--vaadin-checkbox-size",displayName:"Checkbox size",defaultValue:"var(--lumo-font-size-l)",editorType:t.range,presets:p.lumoFontSize,icon:"square"}]},{selector:"vaadin-grid-pro vaadin-grid-pro-edit-select",displayName:"Select editor",properties:i}]};export{x as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-horizontal-layout-3193943f.js: -------------------------------------------------------------------------------- 1 | import{s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-horizontal-layout",displayName:"Horizontal Layout",elements:[{selector:"vaadin-horizontal-layout",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding,o.gap]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-icon-601f36ed.js: -------------------------------------------------------------------------------- 1 | import{i as r,s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-icon",displayName:"Icon",elements:[{selector:"vaadin-icon",displayName:"Icon",properties:[r.iconColor,r.iconSize,o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{s as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-integer-field-85078932.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as t,labelProperties as i,helperTextProperties as a,errorMessageProperties as o}from"./vaadin-text-field-0b3db014.js";import{i as e}from"../vaadin-dev-tools.js";import{standardButtonProperties as p}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-integer-field",displayName:"Integer Field",elements:[{selector:"vaadin-integer-field::part(input-field)",displayName:"Input field",properties:t},{selector:"vaadin-integer-field::part(label)",displayName:"Label",properties:i},{selector:"vaadin-integer-field::part(helper-text)",displayName:"Helper text",properties:a},{selector:"vaadin-integer-field::part(error-message)",displayName:"Error message",properties:o},{selector:"vaadin-integer-field::part(clear-button)",displayName:"Clear button",properties:p},{selector:"vaadin-integer-field::part(decrease-button)",displayName:"Decrease button",properties:[e.iconColor,e.iconSize]},{selector:"vaadin-integer-field::part(increase-button)",displayName:"Increase button",properties:[e.iconColor,e.iconSize]}],setupElement(r){r.stepButtonsVisible=!0}};export{u as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-list-box-d7a8433b.js: -------------------------------------------------------------------------------- 1 | import{s as o,f as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-list-box",displayName:"List Box",elements:[{selector:"vaadin-list-box",displayName:"Root element",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,r.paddingInline]},{selector:"vaadin-list-box > hr",displayName:"Divider",properties:[o.backgroundColor]},{selector:"vaadin-list-box > vaadin-item",displayName:"Item",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,r.paddingInline]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-form-638996c6.js: -------------------------------------------------------------------------------- 1 | import{a as e,c as r,d as a}from"../vaadin-dev-tools.js";import{inputFieldProperties as i,labelProperties as t,helperTextProperties as p,errorMessageProperties as s}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as o}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-login-form",displayName:"Login",elements:[{selector:"vaadin-login-form",displayName:"Login form root component",properties:e},{selector:"vaadin-login-form vaadin-login-form-wrapper",displayName:"Login form",properties:e},{selector:"vaadin-login-form vaadin-login-form-wrapper::part(form-title)",displayName:"Form title",properties:r},{selector:"vaadin-login-form vaadin-login-form-wrapper::part(error-message)",displayName:"Error message section",properties:e},{selector:"vaadin-login-form vaadin-login-form-wrapper::part(error-message-title)",displayName:"Error message heading",properties:r},{selector:"vaadin-login-form vaadin-login-form-wrapper::part(error-message-description)",displayName:"Error message description",properties:r},{selector:"vaadin-login-form vaadin-login-form-wrapper [required]::part(input-field)",displayName:"Input field",properties:i},{selector:"vaadin-login-form vaadin-login-form-wrapper [required]::part(label)",displayName:"Label",properties:t},{selector:"vaadin-login-form vaadin-login-form-wrapper [required]::part(helper-text)",displayName:"Helper text",properties:p},{selector:"vaadin-login-form vaadin-login-form-wrapper [required]::part(error-message)",displayName:"Error message",properties:s},{selector:"vaadin-login-form vaadin-password-field::part(reveal-button)",displayName:"Reveal button",properties:a},{selector:'vaadin-login-form vaadin-button[theme~="submit"]',displayName:"Log In Button",properties:o},{selector:'vaadin-login-form vaadin-button[theme~="submit"]::part(label)',displayName:"Log In Button Label",properties:r},{selector:'vaadin-login-form [slot="forgot-password"]',displayName:"Forgot password button",properties:o},{selector:'vaadin-login-form [slot="forgot-password"]::part(label)',displayName:"Forgot password button label",properties:r}]};export{u as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-overlay-f8a5db8a.js: -------------------------------------------------------------------------------- 1 | import{s as o,a,c as r,d as i}from"../vaadin-dev-tools.js";import{inputFieldProperties as p,labelProperties as l,helperTextProperties as t,errorMessageProperties as n}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as e}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={tagName:"vaadin-login-overlay",displayName:"Login Overlay",elements:[{selector:"vaadin-login-overlay-wrapper::part(backdrop)",displayName:"Overlay backdrop / modality curtain",properties:[o.backgroundColor]},{selector:"vaadin-login-overlay-wrapper::part(card)",displayName:"Overlay card",properties:a},{selector:"vaadin-login-overlay-wrapper::part(brand)",displayName:"Card header",properties:a},{selector:"vaadin-login-overlay-wrapper::part(title)",displayName:"Title",properties:r},{selector:"vaadin-login-overlay-wrapper::part(description)",displayName:"Description",properties:r},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper",displayName:"Login form",properties:a},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper::part(form-title)",displayName:"Form title",properties:r},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper::part(error-message)",displayName:"Error message section",properties:a},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper::part(error-message-title)",displayName:"Error message heading",properties:r},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper::part(error-message-description)",displayName:"Error message description",properties:r},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper [required]::part(input-field)",displayName:"Input field",properties:p},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper [required]::part(label)",displayName:"Input field label",properties:l},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper [required]::part(helper-text)",displayName:"Input field helper text",properties:t},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper [required]::part(error-message)",displayName:"Input field error message",properties:n},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-password-field::part(reveal-button)",displayName:"Password field reveal button",properties:i},{selector:'vaadin-login-overlay-wrapper vaadin-login-form vaadin-button[theme~="submit"]',displayName:"Log In Button",properties:e},{selector:'vaadin-login-overlay-wrapper vaadin-login-form vaadin-button[theme~="submit"]::part(label)',displayName:"Log In Button Label",properties:r},{selector:'vaadin-login-overlay-wrapper vaadin-login-form [slot="forgot-password"]',displayName:"Forgot password button",properties:e},{selector:'vaadin-login-overlay-wrapper vaadin-login-form [slot="forgot-password"]::part(label)',displayName:"Forgot password button label",properties:r}]};export{c as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-map-d40a0116.js: -------------------------------------------------------------------------------- 1 | import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-map",displayName:"Map",elements:[{selector:"vaadin-map",displayName:"Root element",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-menu-bar-3f5ab096.js: -------------------------------------------------------------------------------- 1 | import{s as o,E as a,p as i,f as s,t as n,e as d}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const v={tagName:"vaadin-menu-bar",displayName:"Menu Bar",elements:[{selector:"vaadin-menu-bar vaadin-menu-bar-button",displayName:"Buttons",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,{propertyName:"--lumo-button-size",displayName:"Size",editorType:a.range,presets:i.lumoSize,icon:"square"},s.paddingInline]},{selector:"vaadin-menu-bar vaadin-menu-bar-button vaadin-menu-bar-item",displayName:"Button labels",properties:[n.textColor,n.fontSize,n.fontWeight]},{selector:"vaadin-menu-bar-overlay::part(overlay)",displayName:"Overlay",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding]},{selector:"vaadin-menu-bar-overlay vaadin-menu-bar-item",displayName:"Menu Items",properties:[n.textColor,n.fontSize,n.fontWeight]}],async setupElement(t){t.overlayClass=t.getAttribute("class");const r=document.createElement("vaadin-menu-bar-item");t.items=[{component:r,children:[{text:"Sub item"}]}],await new Promise(e=>setTimeout(e,10))},async cleanupElement(t){t._close()},openOverlay(t){t.element.querySelector("vaadin-menu-bar-button").click();const r=t.element.shadowRoot.querySelector("vaadin-menu-bar-submenu");if(!r)return;const e=r.$.overlay;e&&(e._storedModeless=e.modeless,e.modeless=!0,document._themeEditorDocClickListener=d(r,e),document.addEventListener("click",document._themeEditorDocClickListener),document.documentElement.removeEventListener("click",r.__itemsOutsideClickListener))},hideOverlay(t){const r=t.element.shadowRoot.querySelector("vaadin-menu-bar-submenu");if(!r)return;const e=r.$.overlay;e&&(e.close(),e.modeless=e._storedModeless,delete e._storedModeless,document.removeEventListener("click",document._themeEditorDocClickListener),document.documentElement.addEventListener("click",r.__itemsOutsideClickListener),delete document._themeEditorDocClickListener)}};export{v as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-input-996ac37c.js: -------------------------------------------------------------------------------- 1 | import{s as e,E as a,p as r,f as t}from"../vaadin-dev-tools.js";import{inputFieldProperties as i}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-message-input",displayName:"Message Input",elements:[{selector:"vaadin-message-input vaadin-text-area::part(input-field)",displayName:"Text area",properties:i},{selector:"vaadin-message-input vaadin-button",displayName:"Button",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,{propertyName:"--lumo-button-size",displayName:"Size",editorType:a.range,presets:r.lumoSize,icon:"square"},t.paddingInline]}]};export{u as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-list-70a435ba.js: -------------------------------------------------------------------------------- 1 | import{s as e,t as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-message-list",displayName:"Message List",elements:[{selector:"vaadin-message-list",displayName:"Root element",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-message-list::part(list)",displayName:"Internal list layout",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-message-list vaadin-message",displayName:"Message item",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-message-list vaadin-message::part(name)",displayName:"Name",properties:[a.textColor,a.fontSize,a.fontWeight,a.fontStyle]},{selector:"vaadin-message-list vaadin-message::part(time)",displayName:"Time",properties:[a.textColor,a.fontSize,a.fontWeight,a.fontStyle]},{selector:"vaadin-message-list vaadin-message::part(message)",displayName:"Text",properties:[a.textColor,a.fontSize,a.fontWeight,a.fontStyle]},{selector:"vaadin-message-list vaadin-message > vaadin-avatar",displayName:"Avatar",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-message-list vaadin-message > vaadin-avatar::part(abbr)",displayName:"Avatar abbreviation",properties:[a.textColor,a.fontSize,a.fontWeight,a.fontStyle]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-multi-select-combo-box-a3373557.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as i,labelProperties as l,helperTextProperties as s,errorMessageProperties as p}from"./vaadin-text-field-0b3db014.js";import{i as t,s as e,t as r,g as m,j as c}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const h={tagName:"vaadin-multi-select-combo-box",displayName:"Multi-Select Combo Box",elements:[{selector:"vaadin-multi-select-combo-box::part(input-field)",displayName:"Input field",properties:i},{selector:"vaadin-multi-select-combo-box::part(toggle-button)",displayName:"Toggle button",properties:[t.iconColor,t.iconSize]},{selector:"vaadin-multi-select-combo-box::part(label)",displayName:"Label",properties:l},{selector:"vaadin-multi-select-combo-box::part(helper-text)",displayName:"Helper text",properties:s},{selector:"vaadin-multi-select-combo-box::part(error-message)",displayName:"Error message",properties:p},{selector:"vaadin-multi-select-combo-box-overlay::part(overlay)",displayName:"Overlay",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-multi-select-combo-box-overlay vaadin-multi-select-combo-box-item",displayName:"Overlay items",properties:[r.textColor,r.fontSize,r.fontWeight]},{selector:"vaadin-multi-select-combo-box-overlay vaadin-multi-select-combo-box-item::part(checkmark)::before",displayName:"Overlay item checkmark",properties:[t.iconColor,t.iconSize]},{selector:"vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip",displayName:"Chip",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip",displayName:"Chip label",properties:[r.textColor,r.fontSize,r.fontWeight]},{selector:"vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip::part(remove-button)",displayName:"Chip remove button",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip::part(remove-button)::before",displayName:"Chip remove button icon",properties:[t.iconColor,t.iconSize]}],async setupElement(o){o.overlayClass=o.getAttribute("class"),o.items=[{label:"Item",value:"value"}],o.value="value",o.opened=!0,await new Promise(a=>setTimeout(a,10))},async cleanupElement(o){o.opened=!1},openOverlay:m,hideOverlay:c};export{h as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-notification-bd6eb776.js: -------------------------------------------------------------------------------- 1 | import{a,c as t}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-notification",displayName:"Notification",elements:[{selector:"vaadin-notification-card::part(overlay)",displayName:"Notification card",properties:a},{selector:"vaadin-notification-card::part(content)",displayName:"Content",properties:t}]};export{s as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-number-field-cb3ee8b2.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as t,labelProperties as i,helperTextProperties as a,errorMessageProperties as o}from"./vaadin-text-field-0b3db014.js";import{i as e}from"../vaadin-dev-tools.js";import{standardButtonProperties as p}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const f={tagName:"vaadin-number-field",displayName:"Number Field",elements:[{selector:"vaadin-number-field::part(input-field)",displayName:"Input field",properties:t},{selector:"vaadin-number-field::part(label)",displayName:"Label",properties:i},{selector:"vaadin-number-field::part(helper-text)",displayName:"Helper text",properties:a},{selector:"vaadin-number-field::part(error-message)",displayName:"Error message",properties:o},{selector:"vaadin-number-field::part(clear-button)",displayName:"Clear button",properties:p},{selector:"vaadin-number-field::part(increase-button)",displayName:"Increase button",properties:[e.iconColor,e.iconSize]},{selector:"vaadin-number-field::part(decrease-button)",displayName:"Decrease button",properties:[e.iconColor,e.iconSize]}],setupElement(r){r.stepButtonsVisible=!0}};export{f as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-password-field-d289cb18.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as r,labelProperties as a,helperTextProperties as t,errorMessageProperties as i}from"./vaadin-text-field-0b3db014.js";import{i as e}from"../vaadin-dev-tools.js";import{standardButtonProperties as s}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const v={tagName:"vaadin-password-field",displayName:"Password Field",elements:[{selector:"vaadin-password-field::part(input-field)",displayName:"Input field",properties:r},{selector:"vaadin-password-field::part(label)",displayName:"Label",properties:a},{selector:"vaadin-password-field::part(helper-text)",displayName:"Helper text",properties:t},{selector:"vaadin-password-field::part(error-message)",displayName:"Error message",properties:i},{selector:"vaadin-password-field::part(clear-button)",displayName:"Clear button",properties:s},{selector:"vaadin-password-field::part(reveal-button)",displayName:"Reveal button",properties:[e.iconColor,e.iconSize]}]};export{v as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-progress-bar-309ecf1f.js: -------------------------------------------------------------------------------- 1 | import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const i={tagName:"vaadin-progress-bar",displayName:"Progress Bar",elements:[{selector:"vaadin-progress-bar::part(bar)",displayName:"Bar",properties:[r.backgroundColor]},{selector:"vaadin-progress-bar::part(value)",displayName:"Value",properties:[r.backgroundColor]}]};export{i as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-radio-group-88b5afd8.js: -------------------------------------------------------------------------------- 1 | import{s as e,E as i,p as d,i as p,t as r}from"../vaadin-dev-tools.js";import{labelProperties as s,helperTextProperties as l,errorMessageProperties as n}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const N={tagName:"vaadin-radio-group",displayName:"Radio Button Group",elements:[{selector:"vaadin-radio-group",displayName:"Group",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-radio-group::part(label)",displayName:"Label",properties:s},{selector:"vaadin-radio-group::part(helper-text)",displayName:"Helper text",properties:l},{selector:"vaadin-radio-group::part(error-message)",displayName:"Error message",properties:n},{selector:"vaadin-radio-group vaadin-radio-button",displayName:"Radio buttons",properties:[{propertyName:"--vaadin-radio-button-size",displayName:"Radio button size",defaultValue:"var(--lumo-font-size-l)",editorType:i.range,presets:d.lumoFontSize,icon:"square"}]},{selector:"vaadin-radio-group vaadin-radio-button::part(radio)",displayName:"Radio part",properties:[e.backgroundColor,e.borderColor,e.borderWidth]},{selector:"vaadin-radio-group vaadin-radio-button[checked]::part(radio)",stateAttribute:"checked",stateElementSelector:"vaadin-radio-group vaadin-radio-button",displayName:"Radio part (when checked)",properties:[e.backgroundColor,e.borderColor,e.borderWidth]},{selector:"vaadin-radio-group vaadin-radio-button::part(radio)::after",displayName:"Selection indicator",properties:[{...p.iconColor,propertyName:"border-color"}]},{selector:"vaadin-radio-group vaadin-radio-button label",displayName:"Label",properties:[r.textColor,r.fontSize,r.fontWeight,r.fontStyle]}],setupElement(t){const a=document.createElement("vaadin-radio-button"),o=document.createElement("label");o.textContent="Some label",o.setAttribute("slot","label"),a.append(o),t.append(a)}};export{N as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-rich-text-editor-8cd892f2.js: -------------------------------------------------------------------------------- 1 | import{s as r,t as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-rich-text-editor",displayName:"Rich Text Editor",elements:[{selector:"vaadin-rich-text-editor",displayName:"Editor",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]},{selector:"vaadin-rich-text-editor::part(toolbar)",displayName:"Toolbar",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]},{selector:"vaadin-rich-text-editor::part(toolbar-button)",displayName:"Toolbar Buttons",properties:[{...o.textColor,displayName:"Color"},{...o.textColor,displayName:"Highlight Color",propertyName:"--lumo-primary-color"}]},{selector:"vaadin-rich-text-editor::part(content)",displayName:"Content",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-scroller-35e68818.js: -------------------------------------------------------------------------------- 1 | import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-scroller",displayName:"Scroller",elements:[{selector:"vaadin-scroller",displayName:"Scroller",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-select-df6e9947.js: -------------------------------------------------------------------------------- 1 | import{s as e,f as i,t as a,i as o,b as l,h as s}from"../vaadin-dev-tools.js";import{labelProperties as p,helperTextProperties as d,errorMessageProperties as n}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const f={tagName:"vaadin-select",displayName:"Select",elements:[{selector:"vaadin-select::part(input-field)",displayName:"Field",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,i.height,i.paddingInline]},{selector:"vaadin-select vaadin-select-value-button>vaadin-select-item",displayName:"Field text",properties:[a.textColor,a.fontSize,a.fontWeight]},{selector:"vaadin-select::part(toggle-button)",displayName:"Field toggle button",properties:[o.iconColor,o.iconSize]},{selector:"vaadin-select::part(label)",displayName:"Label",properties:p},{selector:"vaadin-select::part(helper-text)",displayName:"Helper text",properties:d},{selector:"vaadin-select::part(error-message)",displayName:"Error message",properties:n},{selector:"vaadin-select-overlay::part(overlay)",displayName:"Overlay",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-select-overlay vaadin-select-item",displayName:"Overlay items",properties:[a.textColor,a.fontSize,a.fontWeight]},{selector:"vaadin-select-overlay vaadin-select-item::part(checkmark)::before",displayName:"Overlay item checkmark",properties:[o.iconColor,o.iconSize]}],async setupElement(t){t.overlayClass=t.getAttribute("class")},openOverlay:t=>{const r=t.element;l(r,r,r)},hideOverlay:t=>{const r=t.element;r.opened=!1,s(r,r,r)}};export{f as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-ba80d91d.js: -------------------------------------------------------------------------------- 1 | import{s as e,t as i,i as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-side-nav",displayName:"Side Navigation",elements:[{selector:"vaadin-side-nav",displayName:"Root element",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:'vaadin-side-nav > [slot="label"]',displayName:"Label",properties:[i.textColor,i.fontSize,i.fontWeight,i.fontStyle]},{selector:'vaadin-side-nav vaadin-side-nav-item > [slot="prefix"]',displayName:"Nav item icon",properties:[a.iconSize,a.iconColor]},{selector:'vaadin-side-nav vaadin-side-nav-item[active] > [slot="prefix"]',displayName:"Nav item icon (active)",properties:[a.iconSize,a.iconColor]},{selector:"vaadin-side-nav vaadin-side-nav-item::part(item)",displayName:"Nav item",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding,i.textColor,i.fontSize,i.fontWeight,i.fontStyle]},{selector:"vaadin-side-nav vaadin-side-nav-item[active]::part(item)",displayName:"Nav item (active)",properties:[i.textColor,i.fontSize,i.fontWeight,i.fontStyle,e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-side-nav vaadin-side-nav-item::part(toggle-button)::before",displayName:"Expand/collapse icon",properties:[a.iconSize,a.iconColor]},{selector:"vaadin-side-nav vaadin-side-nav-item[active]::part(toggle-button)::before",displayName:"Expand/collapse icon (active)",properties:[a.iconSize,a.iconColor]}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-item-34918f92.js: -------------------------------------------------------------------------------- 1 | import{i,s as e,t as o}from"../vaadin-dev-tools.js";import{html as t}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-side-nav-item",displayName:"Side Navigation Item",description:t`You are styling selected item only, if you wish to style all items of given SideNav component please 2 | pick vaadin-side-nav instead.`,notAccessibleDescription:t`If you wish to style all items of current SideNav component please pick 3 | vaadin-side-nav instead.`,elements:[{selector:'vaadin-side-nav-item > [slot="prefix"]',displayName:"Nav item icon",properties:[i.iconSize,i.iconColor]},{selector:'vaadin-side-nav-item[active] > [slot="prefix"]',displayName:"Nav item icon (active)",properties:[i.iconSize,i.iconColor]},{selector:"vaadin-side-nav-item::part(item)",displayName:"Nav item",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding,o.textColor,o.fontSize,o.fontWeight,o.fontStyle]},{selector:"vaadin-side-nav-item[active]::part(item)",displayName:"Nav item (active)",properties:[o.textColor,o.fontSize,o.fontWeight,o.fontStyle,e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-side-nav-item::part(toggle-button)::before",displayName:"Expand/collapse icon",properties:[i.iconSize,i.iconColor]},{selector:"vaadin-side-nav-item[active]::part(toggle-button)::before",displayName:"Expand/collapse icon (active)",properties:[i.iconSize,i.iconColor]}]};export{l as default}; 4 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-split-layout-80c92131.js: -------------------------------------------------------------------------------- 1 | import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-split-layout",displayName:"Split Layout",elements:[{selector:"vaadin-split-layout",displayName:"Layout",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius]},{selector:"vaadin-split-layout::part(splitter)",displayName:"Splitter bar",properties:[a.backgroundColor]},{selector:"vaadin-split-layout::part(handle)::after",displayName:"Splitter handle",properties:[a.backgroundColor]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-spreadsheet-59d8c5ef.js: -------------------------------------------------------------------------------- 1 | import{s as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-spreadsheet",displayName:"Spreadsheet",elements:[{selector:"vaadin-spreadsheet",displayName:"Spreadsheet",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]}]};export{s as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tab-aaf32809.js: -------------------------------------------------------------------------------- 1 | import{t as e,s as t}from"../vaadin-dev-tools.js";import{html as a}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-tab",displayName:"Tab",description:a`You are styling selected tab only, if you wish to style all tabs please pick 2 | vaadin-tabs instead.`,notAccessibleDescription:a`If you wish to style all tabs please pick vaadin-tabs instead.`,elements:[{selector:"vaadin-tab",displayName:"Tab item",properties:[e.textColor,e.fontSize,e.fontWeight,t.backgroundColor,t.padding]},{selector:"vaadin-tab[selected]",displayName:"Tab item (selected)",properties:[e.textColor,e.fontSize,e.fontWeight,t.backgroundColor,t.padding]},{selector:"vaadin-tab::before",displayName:"Selection indicator",properties:[t.backgroundColor]}]};export{p as default}; 3 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabs-d9a5e24e.js: -------------------------------------------------------------------------------- 1 | import{s as a,t as e,i as t}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-tabs",displayName:"Tabs",elements:[{selector:"vaadin-tabs",displayName:"Tabs",properties:[a.padding]},{selector:"vaadin-tabs vaadin-tab",displayName:"Tab item",properties:[e.textColor,e.fontSize,e.fontWeight,a.backgroundColor,a.padding]},{selector:"vaadin-tabs > vaadin-tab[selected]",displayName:"Tab item (selected)",properties:[e.textColor,e.fontSize,e.fontWeight,a.backgroundColor,a.padding]},{selector:"vaadin-tabs > vaadin-tab::before",displayName:"Selection indicator",properties:[a.backgroundColor]},{selector:"vaadin-tabs::part(back-button)",displayName:"Back button",properties:[t.iconColor,t.iconSize]},{selector:"vaadin-tabs::part(forward-button)",displayName:"Forward button",properties:[t.iconColor,t.iconSize]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabsheet-dd99ed9a.js: -------------------------------------------------------------------------------- 1 | import{s as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-tabsheet",displayName:"Tab Sheet",elements:[{selector:"vaadin-tabsheet",displayName:"TabSheet",properties:[e.padding,e.backgroundColor,e.borderWidth,e.borderColor,e.borderRadius]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-area-83627ebc.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as e,labelProperties as r,helperTextProperties as t,errorMessageProperties as a}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as p}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={tagName:"vaadin-text-area",displayName:"Text Area",elements:[{selector:"vaadin-text-area::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-text-area::part(label)",displayName:"Label",properties:r},{selector:"vaadin-text-area::part(helper-text)",displayName:"Helper text",properties:t},{selector:"vaadin-text-area::part(error-message)",displayName:"Error message",properties:a},{selector:"vaadin-text-area::part(clear-button)",displayName:"Clear button",properties:p}]};export{c as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-field-0b3db014.js: -------------------------------------------------------------------------------- 1 | import{d as o,s as t,f as r,t as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const i=[t.backgroundColor,t.borderColor,t.borderWidth,t.borderRadius,r.height,r.paddingInline,e.textColor,e.fontSize,e.fontWeight],a=[e.textColor,e.fontSize,e.fontWeight],s=[e.textColor,e.fontSize,e.fontWeight],p=[e.textColor,e.fontSize,e.fontWeight],c={tagName:"vaadin-text-field",displayName:"Text Field",elements:[{selector:"vaadin-text-field::part(input-field)",displayName:"Input field",properties:i},{selector:"vaadin-text-field::part(label)",displayName:"Label",properties:a},{selector:"vaadin-text-field::part(helper-text)",displayName:"Helper text",properties:s},{selector:"vaadin-text-field::part(error-message)",displayName:"Error message",properties:p},{selector:"vaadin-text-field::part(clear-button)",displayName:"Clear button",properties:o}]};export{c as default,p as errorMessageProperties,s as helperTextProperties,i as inputFieldProperties,a as labelProperties}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-time-picker-715ec415.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as o,labelProperties as p,helperTextProperties as s,errorMessageProperties as l}from"./vaadin-text-field-0b3db014.js";import{i as r,s as e,t as a,g as m,j as d}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const b={tagName:"vaadin-time-picker",displayName:"Time Picker",elements:[{selector:"vaadin-time-picker::part(input-field)",displayName:"Input field",properties:o},{selector:"vaadin-time-picker::part(toggle-button)",displayName:"Toggle button",properties:[r.iconColor,r.iconSize]},{selector:"vaadin-time-picker::part(label)",displayName:"Label",properties:p},{selector:"vaadin-time-picker::part(helper-text)",displayName:"Helper text",properties:s},{selector:"vaadin-time-picker::part(error-message)",displayName:"Error message",properties:l},{selector:"vaadin-time-picker-overlay::part(overlay)",displayName:"Overlay",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-time-picker-overlay vaadin-time-picker-item",displayName:"Overlay items",properties:[a.textColor,a.fontSize,a.fontWeight]},{selector:"vaadin-time-picker-overlay vaadin-time-picker-item::part(checkmark)::before",displayName:"Overlay item checkmark",properties:[r.iconColor,r.iconSize]}],async setupElement(i){i.overlayClass=i.getAttribute("class"),i.value="00:00",await new Promise(t=>setTimeout(t,10))},openOverlay:m,hideOverlay:d};export{b as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-upload-d3c162ed.js: -------------------------------------------------------------------------------- 1 | import{standardButtonProperties as e}from"./vaadin-button-2511ad84.js";import{t as o,s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const n={tagName:"vaadin-upload",displayName:"Upload",elements:[{selector:"vaadin-upload > vaadin-button",displayName:"Upload button",properties:e},{selector:"vaadin-upload > vaadin-button::part(label)",displayName:"Upload button text",properties:[o.textColor,o.fontSize,o.fontWeight]},{selector:"vaadin-upload::part(drop-label)",displayName:"Drop label",properties:[o.textColor,o.fontSize,o.fontWeight]},{selector:"vaadin-upload vaadin-upload-file-list::part(list)",displayName:"File list",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding]},{selector:"vaadin-upload vaadin-upload-file",displayName:"File element",properties:[o.textColor,o.fontSize,o.fontWeight,a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding]},{selector:"vaadin-upload vaadin-upload-file > vaadin-progress-bar::part(value)",displayName:"Progress bar",properties:[a.backgroundColor]}]};export{n as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-vertical-layout-ad4174c4.js: -------------------------------------------------------------------------------- 1 | import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-vertical-layout",displayName:"Vertical Layout",elements:[{selector:"vaadin-vertical-layout",displayName:"Layout",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding,a.gap]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-virtual-list-96896203.js: -------------------------------------------------------------------------------- 1 | import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-virtual-list",displayName:"Virtual List",elements:[{selector:"vaadin-virtual-list",displayName:"List",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/component-picker.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, PropertyValues, TemplateResult } from 'lit'; 2 | import { ComponentReference } from './component-util.js'; 3 | import './shim.js'; 4 | import { Shim } from './shim.js'; 5 | export interface PickerOptions { 6 | infoTemplate: TemplateResult; 7 | pickCallback: (component: ComponentReference) => void; 8 | } 9 | export type PickerProvider = () => ComponentPicker; 10 | /** 11 | * When active, shows a component picker that allows the user to select an element with a server side counterpart. 12 | */ 13 | export declare class ComponentPicker extends LitElement { 14 | active: boolean; 15 | options?: PickerOptions; 16 | components: ComponentReference[]; 17 | selected: number; 18 | highlighted?: HTMLElement; 19 | overlayElement: HTMLElement; 20 | shim: Shim; 21 | static styles: import("lit").CSSResult[]; 22 | constructor(); 23 | connectedCallback(): void; 24 | disconnectedCallback(): void; 25 | render(): TemplateResult<1> | null; 26 | open(options: PickerOptions): void; 27 | close(): void; 28 | update(changedProperties: PropertyValues): void; 29 | mouseMoveEvent(e: MouseEvent): void; 30 | shimKeydown(e: CustomEvent): void; 31 | shimMove(e: CustomEvent): void; 32 | shimClick(_e: CustomEvent): void; 33 | pickSelectedComponent(): void; 34 | highlight(componentRef: ComponentReference | undefined): void; 35 | } 36 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/component-util.d.ts: -------------------------------------------------------------------------------- 1 | export type ComponentReference = { 2 | nodeId: number; 3 | uiId: number; 4 | element?: HTMLElement; 5 | highlightElement?: HTMLElement; 6 | }; 7 | export declare function getComponents(element: HTMLElement): ComponentReference[]; 8 | export declare function getComponent(element: HTMLElement): ComponentReference; 9 | export declare function deepContains(container: HTMLElement, node: Node): boolean; 10 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum ConnectionStatus { 2 | ACTIVE = "active", 3 | INACTIVE = "inactive", 4 | UNAVAILABLE = "unavailable", 5 | ERROR = "error" 6 | } 7 | export declare abstract class Connection { 8 | static HEARTBEAT_INTERVAL: number; 9 | status: ConnectionStatus; 10 | onHandshake(): void; 11 | onConnectionError(_: string): void; 12 | onStatusChange(_: ConnectionStatus): void; 13 | setActive(yes: boolean): void; 14 | setStatus(status: ConnectionStatus): void; 15 | } 16 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts: -------------------------------------------------------------------------------- 1 | import { Connection } from './connection.js'; 2 | export declare class LiveReloadConnection extends Connection { 3 | webSocket?: WebSocket; 4 | constructor(url: string); 5 | onReload(): void; 6 | handleMessage(msg: any): void; 7 | handleError(msg: any): void; 8 | } 9 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/shim.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement } from 'lit'; 2 | /** 3 | * Blocks interaction with all elements on the page. Forwards mouse and key events as custom shim-* events. 4 | */ 5 | export declare class Shim extends LitElement { 6 | highlighted?: HTMLElement; 7 | static shadowRootOptions: { 8 | delegatesFocus: boolean; 9 | mode: ShadowRootMode; 10 | slotAssignment?: SlotAssignmentMode | undefined; 11 | customElements?: CustomElementRegistry | undefined; 12 | registry?: CustomElementRegistry | undefined; 13 | }; 14 | static styles: import("lit").CSSResult[]; 15 | render(): import("lit").TemplateResult<1>; 16 | onClick(e: MouseEvent): void; 17 | onMouseMove(e: MouseEvent): void; 18 | onKeyDown(e: KeyboardEvent): void; 19 | getTargetElement(e: MouseEvent): HTMLElement; 20 | } 21 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/styles.d.ts: -------------------------------------------------------------------------------- 1 | export declare const popupStyles: import("lit").CSSResult; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/api.d.ts: -------------------------------------------------------------------------------- 1 | import { WebSocketConnection } from '../websocket-connection'; 2 | import { ComponentReference } from '../component-util'; 3 | export declare enum Commands { 4 | response = "themeEditorResponse", 5 | loadComponentMetadata = "themeEditorComponentMetadata", 6 | setLocalClassName = "themeEditorLocalClassName", 7 | setCssRules = "themeEditorRules", 8 | loadRules = "themeEditorLoadRules", 9 | history = "themeEditorHistory", 10 | openCss = "themeEditorOpenCss", 11 | markAsUsed = "themeEditorMarkAsUsed" 12 | } 13 | export declare enum ResponseCode { 14 | ok = "ok", 15 | error = "error" 16 | } 17 | export interface BaseResponse { 18 | requestId: string; 19 | code: ResponseCode; 20 | } 21 | export interface LoadComponentMetadataResponse extends BaseResponse { 22 | accessible?: boolean; 23 | className?: string; 24 | suggestedClassName?: string; 25 | } 26 | export interface LoadPreviewResponse extends BaseResponse { 27 | css: string; 28 | } 29 | export interface ServerCssRule { 30 | selector: string; 31 | properties: { 32 | [key: string]: string; 33 | }; 34 | } 35 | export interface LoadRulesResponse extends BaseResponse { 36 | rules: ServerCssRule[]; 37 | } 38 | export declare class ThemeEditorApi { 39 | private wrappedConnection; 40 | private pendingRequests; 41 | private requestCounter; 42 | private globalUiId; 43 | constructor(wrappedConnection: WebSocketConnection); 44 | private sendRequest; 45 | private handleResponse; 46 | loadComponentMetadata(componentRef: ComponentReference): Promise; 47 | setLocalClassName(componentRef: ComponentReference, className: string): Promise; 48 | setCssRules(rules: ServerCssRule[]): Promise; 49 | loadRules(selectors: string[]): Promise; 50 | markAsUsed(): Promise; 51 | undo(requestId: string): Promise; 52 | redo(requestId: string): Promise; 53 | openCss(selector: string): Promise; 54 | private getGlobalUiId; 55 | } 56 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/class-name-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, PropertyValues } from 'lit'; 2 | import './editors/base-property-editor'; 3 | export declare class ClassNameChangeEvent extends CustomEvent<{ 4 | value: string; 5 | }> { 6 | constructor(value: string); 7 | } 8 | export declare class ClassNameEditor extends LitElement { 9 | static get styles(): import("lit").CSSResult[]; 10 | className: string; 11 | private editedClassName; 12 | private invalid; 13 | protected update(changedProperties: PropertyValues): void; 14 | render(): import("lit").TemplateResult<1>; 15 | private handleInputChange; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-overlay-manager.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentReference } from '../../component-util'; 2 | import { ComponentMetadata } from '../metadata/model'; 3 | export declare class ComponentOverlayManager { 4 | currentActiveComponent: ComponentReference | null; 5 | currentActiveComponentMetaData: ComponentMetadata | null; 6 | componentPicked: (component: ComponentReference, metaData: ComponentMetadata) => Promise; 7 | showOverlay: () => void; 8 | hideOverlay: () => void; 9 | reset: () => void; 10 | } 11 | export declare const componentOverlayManager: ComponentOverlayManager; 12 | export declare const defaultShowOverlay: (component: ComponentReference) => void; 13 | export declare const defaultHideOverlay: (component: ComponentReference) => void; 14 | export declare const showOverlayMixin: (element: any, overlayMixinElement: any, overlay: any) => void; 15 | /** 16 | * Hide overlay of given element 17 | * @param element 18 | * @param overlayMixinElement 19 | * @param overlay 20 | */ 21 | export declare const hideOverlayMixin: (element: any, overlayMixinElement: any, overlay: any) => void; 22 | /** 23 | * Creates a click event that checks the clicked target. If clicked target is dev-tools or the element itself overlay becomes visible otherwise becomes hidden. 24 | * @param element 25 | * @param overlayMixinElement 26 | */ 27 | export declare const createDocumentClickEvent: (element: HTMLElement, overlayMixinElement: any) => (e: MouseEvent) => void; 28 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-resolver.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Resolves HTMLElement that should be considered instead of directly picked element. 3 | * 4 | * Used with overlays that have different HTMLElements visible than present in node tree. 5 | * 6 | * Resolvers cannot be added to component metadata as component metadata is dynamically imported after being picked. 7 | * 8 | * Using Polymer __dataHost property to get base Vaadin component. 9 | * 10 | * TODO: Refactor required after moving to Lit components 11 | */ 12 | declare class ComponentResolver { 13 | resolveElement(element: HTMLElement): HTMLElement; 14 | } 15 | declare class ComponentHighlightResolver { 16 | resolveElement(element: HTMLElement): HTMLElement; 17 | } 18 | export declare const componentResolver: ComponentResolver; 19 | export declare const componentHighlightResolver: ComponentHighlightResolver; 20 | export {}; 21 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/base-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { CSSResultGroup, LitElement, PropertyValues, TemplateResult } from 'lit'; 2 | import { ComponentElementMetadata, CssPropertyMetadata } from '../../metadata/model'; 3 | import { ComponentTheme, ThemePropertyValue } from '../../model'; 4 | export declare class ThemePropertyValueChangeEvent extends CustomEvent<{ 5 | element: ComponentElementMetadata; 6 | property: CssPropertyMetadata; 7 | value: string; 8 | }> { 9 | constructor(element: ComponentElementMetadata, property: CssPropertyMetadata, value: string); 10 | } 11 | export declare abstract class BasePropertyEditor extends LitElement { 12 | static get styles(): CSSResultGroup; 13 | elementMetadata: ComponentElementMetadata; 14 | propertyMetadata: CssPropertyMetadata; 15 | theme: ComponentTheme; 16 | protected propertyValue?: ThemePropertyValue; 17 | protected value: string; 18 | protected update(changedProperties: PropertyValues): void; 19 | render(): TemplateResult<1>; 20 | protected abstract renderEditor(): TemplateResult; 21 | protected updateValueFromTheme(): void; 22 | protected dispatchChange(value: string): void; 23 | } 24 | export declare class PropertyPresets { 25 | private _values; 26 | private _rawValues; 27 | get values(): string[]; 28 | get rawValues(): { 29 | [key: string]: string; 30 | }; 31 | constructor(propertyMetadata?: CssPropertyMetadata); 32 | tryMapToRawValue(presetOrValue: string): string; 33 | tryMapToPreset(value: string): string; 34 | findPreset(rawValue: string): string | undefined; 35 | } 36 | export declare class TextInputChangeEvent extends CustomEvent<{ 37 | value: string; 38 | }> { 39 | constructor(value: string); 40 | } 41 | export declare class TextInput extends LitElement { 42 | static get styles(): import("lit").CSSResult; 43 | value: string; 44 | showClearButton: boolean; 45 | protected update(changedProperties: PropertyValues): void; 46 | render(): TemplateResult<1>; 47 | private handleInputChange; 48 | private handleClearClick; 49 | } 50 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/checkbox-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { TemplateResult } from 'lit'; 2 | import { BasePropertyEditor } from './base-property-editor'; 3 | export declare class CheckboxPropertyEditor extends BasePropertyEditor { 4 | static get styles(): import("lit").CSSResultGroup[]; 5 | handleInputChange(e: Event): void; 6 | protected renderEditor(): TemplateResult; 7 | } 8 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-picker.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, PropertyValues } from 'lit'; 2 | export declare class ColorPickerChangeEvent extends CustomEvent<{ 3 | value: string; 4 | }> { 5 | constructor(value: string); 6 | } 7 | export declare class ColorPicker extends LitElement { 8 | static get styles(): import("lit").CSSResult[]; 9 | value: string; 10 | presets?: string[]; 11 | private toggle; 12 | private overlay; 13 | private commitValue; 14 | protected update(changedProperties: PropertyValues): void; 15 | protected firstUpdated(): void; 16 | render(): import("lit").TemplateResult<1>; 17 | private open; 18 | private renderOverlayContent; 19 | private handleColorChange; 20 | private handleOverlayEscape; 21 | private handleOverlayClose; 22 | } 23 | export declare class ColorPickerOverlayContent extends LitElement { 24 | value: string; 25 | presets?: string[]; 26 | static get styles(): import("lit").CSSResult[]; 27 | render(): import("lit").TemplateResult<1>; 28 | renderSwatches(): import("lit").TemplateResult<1> | undefined; 29 | private handlePickerChange; 30 | private selectPreset; 31 | } 32 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { PropertyValues, TemplateResult } from 'lit'; 2 | import './color-picker'; 3 | import { BasePropertyEditor } from './base-property-editor'; 4 | export declare class ColorPropertyEditor extends BasePropertyEditor { 5 | static get styles(): import("lit").CSSResultGroup[]; 6 | private presets; 7 | protected update(changedProperties: PropertyValues): void; 8 | protected renderEditor(): TemplateResult; 9 | private handleInputChange; 10 | private handleColorPickerChange; 11 | private handleColorPickerCommit; 12 | private handleColorPickerCancel; 13 | protected dispatchChange(value: string): void; 14 | protected updateValueFromTheme(): void; 15 | } 16 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/range-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { PropertyValues, TemplateResult } from 'lit'; 2 | import { BasePropertyEditor } from './base-property-editor'; 3 | export declare class RangePropertyEditor extends BasePropertyEditor { 4 | static get styles(): import("lit").CSSResultGroup[]; 5 | private selectedPresetIndex; 6 | private presets; 7 | protected update(changedProperties: PropertyValues): void; 8 | protected renderEditor(): TemplateResult; 9 | private handleSliderInput; 10 | private handleSliderChange; 11 | private handleValueChange; 12 | protected dispatchChange(value: string): void; 13 | protected updateValueFromTheme(): void; 14 | private updateSliderValue; 15 | } 16 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/text-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { TemplateResult } from 'lit'; 2 | import { BasePropertyEditor, TextInputChangeEvent } from './base-property-editor'; 3 | export declare class TextPropertyEditor extends BasePropertyEditor { 4 | handleInputChange(e: TextInputChangeEvent): void; 5 | protected renderEditor(): TemplateResult; 6 | } 7 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/property-list.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement } from 'lit'; 2 | import { ComponentElementMetadata, ComponentMetadata } from '../metadata/model'; 3 | import { ComponentTheme } from '../model'; 4 | import './editors/checkbox-property-editor'; 5 | import './editors/text-property-editor'; 6 | import './editors/range-property-editor'; 7 | import './editors/color-property-editor'; 8 | export declare class OpenCssEvent extends CustomEvent<{ 9 | element: ComponentElementMetadata; 10 | }> { 11 | constructor(element: ComponentElementMetadata); 12 | } 13 | export declare class PropertyList extends LitElement { 14 | static get styles(): import("lit").CSSResult; 15 | metadata: ComponentMetadata; 16 | theme: ComponentTheme; 17 | render(): import("lit").TemplateResult<1>; 18 | private renderSection; 19 | private handleOpenCss; 20 | private renderPropertyEditor; 21 | } 22 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/scope-selector.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, PropertyValues } from 'lit'; 2 | import { ComponentMetadata } from '../metadata/model'; 3 | import { ThemeScope } from '../model'; 4 | export declare class ScopeChangeEvent extends CustomEvent<{ 5 | value: ThemeScope; 6 | }> { 7 | constructor(value: ThemeScope); 8 | } 9 | export declare class ScopeSelector extends LitElement { 10 | static get styles(): import("lit").CSSResult; 11 | value: ThemeScope; 12 | metadata?: ComponentMetadata; 13 | private select?; 14 | protected update(changedProperties: PropertyValues): void; 15 | render(): import("lit").TemplateResult<1>; 16 | private selectRenderer; 17 | private handleValueChange; 18 | } 19 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/detector.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentTheme } from './model'; 2 | import { ComponentMetadata } from './metadata/model'; 3 | import { ComponentReference } from '../component-util'; 4 | export declare function detectTheme(metadata: ComponentMetadata): Promise; 5 | export declare function detectElementDisplayName(component: ComponentReference): string | null; 6 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/editor.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, PropertyValues, TemplateResult } from 'lit'; 2 | import { PickerProvider } from '../component-picker'; 3 | import { ThemeEditorState } from './model'; 4 | import { WebSocketConnection } from '../websocket-connection'; 5 | import './components/class-name-editor'; 6 | import './components/scope-selector'; 7 | import './components/property-list'; 8 | import '../component-picker.js'; 9 | import { OpenCssEvent } from './components/property-list'; 10 | export declare class ThemeEditor extends LitElement { 11 | expanded: boolean; 12 | themeEditorState: ThemeEditorState; 13 | pickerProvider: PickerProvider; 14 | connection: WebSocketConnection; 15 | private api; 16 | private history; 17 | private historyActions?; 18 | private context; 19 | /** 20 | * Base theme detected from existing CSS files for the selected component 21 | */ 22 | private baseTheme; 23 | /** 24 | * Currently edited theme modifications for the selected component since the 25 | * last reload 26 | */ 27 | private editedTheme; 28 | /** 29 | * The effective theme for the selected component, including base theme and 30 | * previously saved modifications 31 | */ 32 | private effectiveTheme; 33 | private markedAsUsed; 34 | private undoRedoListener; 35 | static get styles(): import("lit").CSSResult; 36 | protected firstUpdated(): void; 37 | activate(): void; 38 | deactivate(): void; 39 | protected update(changedProperties: PropertyValues): void; 40 | disconnectedCallback(): void; 41 | render(): TemplateResult<1>; 42 | renderMissingThemeNotice(): TemplateResult<1>; 43 | renderPropertyList(): TemplateResult<1> | null; 44 | handleShowComponent(): void; 45 | handleOpenCss(event: OpenCssEvent): Promise; 46 | renderPicker(): TemplateResult<1>; 47 | renderLocalClassNameEditor(): TemplateResult<1> | null; 48 | private handleClassNameChange; 49 | private pickComponent; 50 | private handleScopeChange; 51 | private handlePropertyChange; 52 | private handleUndo; 53 | private handleRedo; 54 | private ensureLocalClassName; 55 | private refreshComponentAndTheme; 56 | private refreshTheme; 57 | private highlightElement; 58 | private removeElementHighlight; 59 | } 60 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/history.d.ts: -------------------------------------------------------------------------------- 1 | import { ThemeEditorApi } from './api'; 2 | type HistoryCustomizerFn = () => void; 3 | export interface HistoryEntry { 4 | requestId: string; 5 | execute?: HistoryCustomizerFn; 6 | rollback?: HistoryCustomizerFn; 7 | } 8 | export interface ThemeEditorHistoryActions { 9 | allowUndo: boolean; 10 | allowRedo: boolean; 11 | } 12 | export declare class ThemeEditorHistory { 13 | private api; 14 | constructor(api: ThemeEditorApi); 15 | get allowUndo(): boolean; 16 | get allowRedo(): boolean; 17 | get allowedActions(): ThemeEditorHistoryActions; 18 | push(requestId: string, execute?: HistoryCustomizerFn, rollback?: HistoryCustomizerFn): ThemeEditorHistoryActions; 19 | undo(): Promise; 20 | redo(): Promise; 21 | static clear(): void; 22 | } 23 | export {}; 24 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/icons.d.ts: -------------------------------------------------------------------------------- 1 | export declare const icons: { 2 | crosshair: import("lit").TemplateResult<2>; 3 | square: import("lit").TemplateResult<2>; 4 | font: import("lit").TemplateResult<2>; 5 | undo: import("lit").TemplateResult<2>; 6 | redo: import("lit").TemplateResult<2>; 7 | cross: import("lit").TemplateResult<2>; 8 | }; 9 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/defaults.d.ts: -------------------------------------------------------------------------------- 1 | import { CssPropertyMetadata, EditorType } from '../model'; 2 | export declare const textProperties: { 3 | textColor: { 4 | propertyName: string; 5 | displayName: string; 6 | editorType: EditorType; 7 | presets: string[]; 8 | }; 9 | fontSize: { 10 | propertyName: string; 11 | displayName: string; 12 | editorType: EditorType; 13 | presets: string[]; 14 | icon: string; 15 | }; 16 | fontWeight: { 17 | propertyName: string; 18 | displayName: string; 19 | editorType: EditorType; 20 | checkedValue: string; 21 | }; 22 | fontStyle: { 23 | propertyName: string; 24 | displayName: string; 25 | editorType: EditorType; 26 | checkedValue: string; 27 | }; 28 | }; 29 | export declare const shapeProperties: { 30 | backgroundColor: { 31 | propertyName: string; 32 | displayName: string; 33 | editorType: EditorType; 34 | }; 35 | borderColor: { 36 | propertyName: string; 37 | displayName: string; 38 | editorType: EditorType; 39 | }; 40 | borderWidth: { 41 | propertyName: string; 42 | displayName: string; 43 | editorType: EditorType; 44 | presets: string[]; 45 | icon: string; 46 | }; 47 | borderRadius: { 48 | propertyName: string; 49 | displayName: string; 50 | editorType: EditorType; 51 | presets: string[]; 52 | icon: string; 53 | }; 54 | padding: { 55 | propertyName: string; 56 | displayName: string; 57 | editorType: EditorType; 58 | presets: string[]; 59 | icon: string; 60 | }; 61 | gap: { 62 | propertyName: string; 63 | displayName: string; 64 | editorType: EditorType; 65 | presets: string[]; 66 | icon: string; 67 | }; 68 | }; 69 | export declare const fieldProperties: { 70 | height: { 71 | propertyName: string; 72 | displayName: string; 73 | editorType: EditorType; 74 | presets: string[]; 75 | icon: string; 76 | }; 77 | paddingInline: { 78 | propertyName: string; 79 | displayName: string; 80 | editorType: EditorType; 81 | presets: string[]; 82 | icon: string; 83 | }; 84 | }; 85 | export declare const iconProperties: { 86 | iconColor: { 87 | propertyName: string; 88 | displayName: string; 89 | editorType: EditorType; 90 | presets: string[]; 91 | }; 92 | iconSize: { 93 | propertyName: string; 94 | displayName: string; 95 | editorType: EditorType; 96 | presets: string[]; 97 | icon: string; 98 | }; 99 | }; 100 | export declare const standardShapeProperties: CssPropertyMetadata[]; 101 | export declare const standardTextProperties: CssPropertyMetadata[]; 102 | export declare const standardIconProperties: CssPropertyMetadata[]; 103 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/generic.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentMetadata } from '../model'; 2 | export declare function createGenericMetadata(tagName: string): ComponentMetadata; 3 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/presets.d.ts: -------------------------------------------------------------------------------- 1 | export declare const presets: { 2 | lumoSize: string[]; 3 | lumoSpace: string[]; 4 | lumoBorderRadius: string[]; 5 | lumoFontSize: string[]; 6 | lumoTextColor: string[]; 7 | basicBorderSize: string[]; 8 | }; 9 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/model.d.ts: -------------------------------------------------------------------------------- 1 | import { TemplateResult } from 'lit'; 2 | import { ComponentReference } from '../../component-util'; 3 | export declare enum EditorType { 4 | text = "text", 5 | checkbox = "checkbox", 6 | range = "range", 7 | color = "color" 8 | } 9 | export interface CssPropertyMetadata { 10 | propertyName: string; 11 | displayName: string; 12 | defaultValue?: string; 13 | description?: string; 14 | editorType?: EditorType; 15 | presets?: string[]; 16 | icon?: string; 17 | checkedValue?: string; 18 | } 19 | export interface ComponentElementMetadata { 20 | selector: string; 21 | stateAttribute?: string; 22 | stateElementSelector?: string; 23 | displayName: string; 24 | description?: string; 25 | properties: CssPropertyMetadata[]; 26 | } 27 | export interface ComponentMetadata { 28 | tagName: string; 29 | displayName: string; 30 | description?: TemplateResult; 31 | notAccessibleDescription?: TemplateResult; 32 | elements: ComponentElementMetadata[]; 33 | setupElement?: (element: any) => Promise; 34 | cleanupElement?: (element: any) => Promise; 35 | openOverlay?: (component: ComponentReference) => void; 36 | hideOverlay?: (component: ComponentReference) => void; 37 | } 38 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/registry.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentReference } from '../../component-util'; 2 | import { ComponentMetadata } from './model'; 3 | type ModuleLoader = (modulePath: string) => Promise; 4 | export declare class MetadataRegistry { 5 | private loader; 6 | private metadata; 7 | constructor(loader?: ModuleLoader); 8 | getMetadata(component: ComponentReference): Promise; 9 | } 10 | export declare const metadataRegistry: MetadataRegistry; 11 | export {}; 12 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/model.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentElementMetadata, ComponentMetadata } from './metadata/model'; 2 | import { ServerCssRule } from './api'; 3 | import { ComponentReference } from '../component-util'; 4 | export declare enum ThemeEditorState { 5 | disabled = "disabled", 6 | enabled = "enabled", 7 | missing_theme = "missing_theme" 8 | } 9 | export declare enum ThemeScope { 10 | local = "local", 11 | global = "global" 12 | } 13 | export interface SelectorScope { 14 | themeScope: ThemeScope; 15 | localClassName?: string; 16 | } 17 | export interface ThemeContext { 18 | scope: ThemeScope; 19 | metadata?: ComponentMetadata; 20 | component: ComponentReference; 21 | accessible?: boolean; 22 | localClassName?: string; 23 | suggestedClassName?: string; 24 | } 25 | export interface ThemePropertyValue { 26 | elementSelector: string; 27 | propertyName: string; 28 | value: string; 29 | modified: boolean; 30 | } 31 | export declare class ComponentTheme { 32 | private _metadata; 33 | private _properties; 34 | constructor(metadata: ComponentMetadata); 35 | get metadata(): ComponentMetadata; 36 | get properties(): ThemePropertyValue[]; 37 | getPropertyValue(elementSelector: string, propertyName: string): ThemePropertyValue; 38 | updatePropertyValue(elementSelector: string, propertyName: string, value: string, modified?: boolean): void; 39 | addPropertyValues(values: ThemePropertyValue[]): void; 40 | getPropertyValuesForElement(elementSelector: string): ThemePropertyValue[]; 41 | static combine(...themes: ComponentTheme[]): ComponentTheme; 42 | static fromServerRules(metadata: ComponentMetadata, scope: SelectorScope, rules: ServerCssRule[]): ComponentTheme; 43 | } 44 | export declare function createScopedSelector(element: ComponentElementMetadata, scope: SelectorScope): string; 45 | export declare function generateThemeRule(element: ComponentElementMetadata, scope: SelectorScope, propertyName: string, value: string): ServerCssRule; 46 | export declare function generateThemeRuleCss(rule: ServerCssRule): string; 47 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/preview.d.ts: -------------------------------------------------------------------------------- 1 | declare class ThemePreview { 2 | private _stylesheet?; 3 | private _localClassNameMap; 4 | get stylesheet(): CSSStyleSheet; 5 | add(css: string): void; 6 | clear(): void; 7 | previewLocalClassName(element?: HTMLElement, className?: string): void; 8 | private ensureStylesheet; 9 | } 10 | export declare const themePreview: ThemePreview; 11 | export {}; 12 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/styles.d.ts: -------------------------------------------------------------------------------- 1 | import { CSSResult } from 'lit'; 2 | export declare function injectGlobalCss(css: CSSResult): void; 3 | export declare const editorRowStyles: CSSResult; 4 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-info.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement } from 'lit'; 2 | export declare class InfoTab extends LitElement { 3 | private _devTools; 4 | private serverInfo; 5 | protected createRenderRoot(): Element | ShadowRoot; 6 | render(): import("lit").TemplateResult<1>; 7 | handleMessage(message: any): boolean; 8 | copyInfoToClipboard(): void; 9 | } 10 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-log.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement } from 'lit'; 2 | import { VaadinDevTools } from './vaadin-dev-tools.js'; 3 | export declare class VaadinDevToolsLog extends LitElement { 4 | _devTools: VaadinDevTools; 5 | protected createRenderRoot(): Element | ShadowRoot; 6 | activate(): void; 7 | render(): import("lit").TemplateResult<1>; 8 | } 9 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts: -------------------------------------------------------------------------------- 1 | import 'construct-style-sheets-polyfill'; 2 | import { LitElement, PropertyValueMap, TemplateResult } from 'lit'; 3 | import { Product } from './License'; 4 | import { ConnectionStatus } from './connection'; 5 | import './theme-editor/editor'; 6 | import { ThemeEditorState } from './theme-editor/model'; 7 | import './vaadin-dev-tools-info'; 8 | import './vaadin-dev-tools-log'; 9 | /** 10 | * Plugin API for the dev tools window. 11 | */ 12 | export interface DevToolsInterface { 13 | send(command: string, data: any): void; 14 | addTab(id: string, tag: string): void; 15 | } 16 | export interface MessageHandler { 17 | handleMessage(message: ServerMessage): boolean; 18 | } 19 | export interface ServerMessage { 20 | /** 21 | * The command 22 | */ 23 | command: string; 24 | /** 25 | * the data for the command 26 | */ 27 | data: any; 28 | } 29 | /** 30 | * To create and register a plugin, use e.g. 31 | * @example 32 | * export class MyTab extends LitElement implements MessageHandler { 33 | * render() { 34 | * return html`
Here I am
`; 35 | * } 36 | * } 37 | * customElements.define('my-tab', MyTab); 38 | * 39 | * const plugin: DevToolsPlugin = { 40 | * init: function (devToolsInterface: DevToolsInterface): void { 41 | * devToolsInterface.addTab('Tab title', 'my-tab') 42 | * } 43 | * }; 44 | * 45 | * (window as any).Vaadin.devToolsPlugins.push(plugin); 46 | */ 47 | export interface DevToolsPlugin { 48 | /** 49 | * Called once to initialize the plugin. 50 | * 51 | * @param devToolsInterface provides methods to interact with the dev tools 52 | */ 53 | init(devToolsInterface: DevToolsInterface): void; 54 | } 55 | interface Feature { 56 | id: string; 57 | title: string; 58 | moreInfoLink: string; 59 | requiresServerRestart: boolean; 60 | enabled: boolean; 61 | } 62 | export declare enum MessageType { 63 | LOG = "log", 64 | INFORMATION = "information", 65 | WARNING = "warning", 66 | ERROR = "error" 67 | } 68 | interface Message { 69 | id: number; 70 | type: MessageType; 71 | message: string; 72 | details?: string; 73 | link?: string; 74 | persistentId?: string; 75 | dontShowAgain: boolean; 76 | dontShowAgainMessage?: string; 77 | deleted: boolean; 78 | } 79 | type DevToolsConf = { 80 | enable: boolean; 81 | url: string; 82 | backend?: string; 83 | liveReloadPort: number; 84 | token?: string; 85 | }; 86 | export declare class VaadinDevTools extends LitElement { 87 | static MAX_LOG_ROWS: number; 88 | unhandledMessages: ServerMessage[]; 89 | conf: DevToolsConf; 90 | static get styles(): import("lit").CSSResult[]; 91 | static DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE: string; 92 | static ACTIVE_KEY_IN_SESSION_STORAGE: string; 93 | static TRIGGERED_KEY_IN_SESSION_STORAGE: string; 94 | static TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE: string; 95 | static AUTO_DEMOTE_NOTIFICATION_DELAY: number; 96 | static HOTSWAP_AGENT: string; 97 | static JREBEL: string; 98 | static SPRING_BOOT_DEVTOOLS: string; 99 | static BACKEND_DISPLAY_NAME: Record; 100 | static get isActive(): boolean; 101 | static notificationDismissed(persistentId: string): boolean; 102 | expanded: boolean; 103 | messages: Message[]; 104 | splashMessage?: string; 105 | notifications: Message[]; 106 | frontendStatus: ConnectionStatus; 107 | javaStatus: ConnectionStatus; 108 | private tabs; 109 | private activeTab; 110 | private features; 111 | unreadErrors: boolean; 112 | private root; 113 | private componentPicker; 114 | componentPickActive: boolean; 115 | themeEditorState: ThemeEditorState; 116 | private javaConnection?; 117 | private frontendConnection?; 118 | private nextMessageId; 119 | private disableEventListener?; 120 | private transitionDuration; 121 | elementTelemetry(): void; 122 | openWebSocketConnection(): void; 123 | tabHandleMessage(tabElement: HTMLElement, message: ServerMessage): boolean; 124 | handleFrontendMessage(message: ServerMessage): void; 125 | getDedicatedWebSocketUrl(): string | undefined; 126 | getSpringBootWebSocketUrl(location: any): string; 127 | constructor(); 128 | connectedCallback(): void; 129 | initPlugin(plugin: DevToolsPlugin): Promise; 130 | format(o: any): string; 131 | catchErrors(): void; 132 | disconnectedCallback(): void; 133 | toggleExpanded(): void; 134 | showSplashMessage(msg: string | undefined): void; 135 | demoteSplashMessage(): void; 136 | checkLicense(productInfo: Product): void; 137 | log(type: MessageType, message: string, details?: string, link?: string, dontShowAgainMessage?: string): void; 138 | showNotification(type: MessageType, message: string, details?: string, link?: string, persistentId?: string, dontShowAgainMessage?: string): void; 139 | dismissNotification(id: number): void; 140 | findNotificationIndex(id: number): number; 141 | toggleDontShowAgain(id: number): void; 142 | setActive(yes: boolean): void; 143 | getStatusColor(status: ConnectionStatus | undefined): "none" | "var(--dev-tools-green-color)" | "var(--dev-tools-grey-color)" | "var(--dev-tools-yellow-hsl)" | "var(--dev-tools-red-color)"; 144 | renderMessage(messageObject: Message): TemplateResult<1>; 145 | render(): TemplateResult<1>; 146 | protected updated(_changedProperties: PropertyValueMap | Map): void; 147 | renderCode(): TemplateResult<1>; 148 | private renderFeatures; 149 | setJavaLiveReloadActive(active: boolean): void; 150 | renderThemeEditor(): TemplateResult<1>; 151 | toggleFeatureFlag(e: Event, feature: Feature): void; 152 | } 153 | export {}; 154 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.test.d.ts: -------------------------------------------------------------------------------- 1 | import './vaadin-dev-tools'; 2 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts: -------------------------------------------------------------------------------- 1 | import { Connection } from './connection'; 2 | export declare class WebSocketConnection extends Connection { 3 | static HEARTBEAT_INTERVAL: number; 4 | socket?: any; 5 | constructor(url: string); 6 | onReload(): void; 7 | onUpdate(_path: string, _content: string): void; 8 | onMessage(_message: any): void; 9 | handleMessage(msg: any): void; 10 | handleError(msg: any): void; 11 | send(command: string, data: any): void; 12 | } 13 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js: -------------------------------------------------------------------------------- 1 | import '@vaadin/grid/vaadin-grid-column.js'; 2 | import { GridColumn } from '@vaadin/grid/src/vaadin-grid-column.js'; 3 | import { GridSelectionColumnBaseMixin } from '@vaadin/grid/src/vaadin-grid-selection-column-base-mixin.js'; 4 | 5 | export class GridFlowSelectionColumn extends GridSelectionColumnBaseMixin(GridColumn) { 6 | 7 | static get is() { 8 | return 'vaadin-grid-flow-selection-column'; 9 | } 10 | 11 | static get properties() { 12 | return { 13 | /** 14 | * Override property to enable auto-width 15 | */ 16 | autoWidth: { 17 | type: Boolean, 18 | value: true 19 | }, 20 | 21 | /** 22 | * Override property to set custom width 23 | */ 24 | width: { 25 | type: String, 26 | value: '56px' 27 | } 28 | }; 29 | } 30 | 31 | /** 32 | * Override method from `GridSelectionColumnBaseMixin` to add ID to select all 33 | * checkbox 34 | * 35 | * @override 36 | */ 37 | _defaultHeaderRenderer(root, _column) { 38 | super._defaultHeaderRenderer(root, _column); 39 | const checkbox = root.firstElementChild; 40 | if (checkbox) { 41 | checkbox.id = 'selectAllCheckbox'; 42 | } 43 | } 44 | 45 | 46 | /** 47 | * Override a method from `GridSelectionColumnBaseMixin` to handle the user 48 | * selecting all items. 49 | * 50 | * @protected 51 | * @override 52 | */ 53 | _selectAll() { 54 | this.selectAll = true; 55 | this.$server.selectAll(); 56 | } 57 | 58 | /** 59 | * Override a method from `GridSelectionColumnBaseMixin` to handle the user 60 | * deselecting all items. 61 | * 62 | * @protected 63 | * @override 64 | */ 65 | _deselectAll() { 66 | this.selectAll = false; 67 | this.$server.deselectAll(); 68 | } 69 | 70 | /** 71 | * Override a method from `GridSelectionColumnBaseMixin` to handle the user 72 | * selecting an item. 73 | * 74 | * @param {Object} item the item to select 75 | * @protected 76 | * @override 77 | */ 78 | _selectItem(item) { 79 | this._grid.$connector.doSelection([item], true); 80 | } 81 | 82 | /** 83 | * Override a method from `GridSelectionColumnBaseMixin` to handle the user 84 | * deselecting an item. 85 | * 86 | * @param {Object} item the item to deselect 87 | * @protected 88 | * @override 89 | */ 90 | _deselectItem(item) { 91 | this._grid.$connector.doDeselection([item], true); 92 | // Optimistically update select all state 93 | this.selectAll = false; 94 | } 95 | } 96 | 97 | customElements.define(GridFlowSelectionColumn.is, GridFlowSelectionColumn); 98 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-time-picker/helpers.js: -------------------------------------------------------------------------------- 1 | // map from unicode eastern arabic number characters to arabic numbers 2 | const EASTERN_ARABIC_DIGIT_MAP = { 3 | '\\u0660': '0', 4 | '\\u0661': '1', 5 | '\\u0662': '2', 6 | '\\u0663': '3', 7 | '\\u0664': '4', 8 | '\\u0665': '5', 9 | '\\u0666': '6', 10 | '\\u0667': '7', 11 | '\\u0668': '8', 12 | '\\u0669': '9' 13 | }; 14 | 15 | /** 16 | * Escapes the given string so it can be safely used in a regexp. 17 | * 18 | * @param {string} string 19 | * @return {string} 20 | */ 21 | function escapeRegExp(string) { 22 | return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); 23 | } 24 | 25 | /** 26 | * Parses eastern arabic number characters to arabic numbers (0-9) 27 | * 28 | * @param {string} digits 29 | * @return {string} 30 | */ 31 | function parseEasternArabicDigits(digits) { 32 | return digits.replace(/[\u0660-\u0669]/g, function (char) { 33 | const unicode = '\\u0' + char.charCodeAt(0).toString(16); 34 | return EASTERN_ARABIC_DIGIT_MAP[unicode]; 35 | }); 36 | } 37 | 38 | /** 39 | * @param {string} locale 40 | * @param {Date} testTime 41 | * @return {string | null} 42 | */ 43 | function getAmOrPmString(locale, testTime) { 44 | const testTimeString = testTime.toLocaleTimeString(locale); 45 | 46 | // AM/PM string is anything from one letter in eastern arabic to standard two letters, 47 | // to having space in between, dots ... 48 | // cannot disqualify whitespace since some locales use a. m. / p. m. 49 | // TODO when more scripts support is added (than Arabic), need to exclude those numbers too 50 | const amOrPmRegExp = /[^\d\u0660-\u0669]/; 51 | 52 | const matches = 53 | // In most locales, the time ends with AM/PM: 54 | testTimeString.match(new RegExp(`${amOrPmRegExp.source}+$`, 'g')) || 55 | // In some locales, the time starts with AM/PM e.g in Chinese: 56 | testTimeString.match(new RegExp(`^${amOrPmRegExp.source}+`, 'g')); 57 | 58 | return matches && matches[0].trim(); 59 | } 60 | 61 | /** 62 | * @param {string} locale 63 | * @return {string | null} 64 | */ 65 | export function getSeparator(locale) { 66 | let timeString = TEST_PM_TIME.toLocaleTimeString(locale); 67 | 68 | // Since the next regex picks first non-number-whitespace, 69 | // need to discard possible PM from beginning (eg. chinese locale) 70 | const pmString = getPmString(locale); 71 | if (pmString && timeString.startsWith(pmString)) { 72 | timeString = timeString.replace(pmString, ''); 73 | } 74 | 75 | const matches = timeString.match(/[^\u0660-\u0669\s\d]/); 76 | return matches && matches[0]; 77 | } 78 | 79 | /** 80 | * Searches for either an AM or PM token in the given time string 81 | * depending on what is provided in `amOrPmString`. 82 | * 83 | * The search is case and space insensitive. 84 | * 85 | * @example 86 | * `searchAmOrPmToken('1 P M', 'PM')` => `'P M'` 87 | * 88 | * @example 89 | * `searchAmOrPmToken('1 a.m.', 'A. M.')` => `a.m.` 90 | * 91 | * @param {string} timeString 92 | * @param {string} amOrPmString 93 | * @return {string | null} 94 | */ 95 | export function searchAmOrPmToken(timeString, amOrPmString) { 96 | if (!amOrPmString) return null; 97 | 98 | // Create a regexp string for searching for AM/PM without space-sensitivity. 99 | const tokenRegExpString = amOrPmString.split(/\s*/).map(escapeRegExp).join('\\s*'); 100 | 101 | // Create a regexp without case-sensitivity. 102 | const tokenRegExp = new RegExp(tokenRegExpString, 'i'); 103 | 104 | // Match the regexp against the time string. 105 | const tokenMatches = timeString.match(tokenRegExp); 106 | if (tokenMatches) { 107 | return tokenMatches[0]; 108 | } 109 | } 110 | 111 | export const TEST_PM_TIME = new Date('August 19, 1975 23:15:30'); 112 | 113 | export const TEST_AM_TIME = new Date('August 19, 1975 05:15:30'); 114 | 115 | /** 116 | * @param {string} locale 117 | * @return {string} 118 | */ 119 | export function getPmString(locale) { 120 | return getAmOrPmString(locale, TEST_PM_TIME); 121 | } 122 | 123 | /** 124 | * @param {string} locale 125 | * @return {string} 126 | */ 127 | export function getAmString(locale) { 128 | return getAmOrPmString(locale, TEST_AM_TIME); 129 | } 130 | 131 | /** 132 | * @param {string} digits 133 | * @return {number} 134 | */ 135 | export function parseDigitsIntoInteger(digits) { 136 | return parseInt(parseEasternArabicDigits(digits)); 137 | } 138 | 139 | /** 140 | * @param {string} milliseconds 141 | * @return {number} 142 | */ 143 | export function parseMillisecondsIntoInteger(milliseconds) { 144 | milliseconds = parseEasternArabicDigits(milliseconds); 145 | // digits are either .1 .01 or .001 so need to "shift" 146 | if (milliseconds.length === 1) { 147 | milliseconds += '00'; 148 | } else if (milliseconds.length === 2) { 149 | milliseconds += '0'; 150 | } 151 | return parseInt(milliseconds); 152 | } 153 | 154 | /** 155 | * @param {string} timeString 156 | * @param {number} milliseconds 157 | * @param {string} amString 158 | * @param {string} pmString 159 | * @return {string} 160 | */ 161 | export function formatMilliseconds(timeString, milliseconds, amString, pmString) { 162 | // might need to inject milliseconds between seconds and AM/PM 163 | let cleanedTimeString = timeString; 164 | if (timeString.endsWith(amString)) { 165 | cleanedTimeString = timeString.replace(' ' + amString, ''); 166 | } else if (timeString.endsWith(pmString)) { 167 | cleanedTimeString = timeString.replace(' ' + pmString, ''); 168 | } 169 | if (milliseconds) { 170 | let millisecondsString = milliseconds < 10 ? '0' : ''; 171 | millisecondsString += milliseconds < 100 ? '0' : ''; 172 | millisecondsString += milliseconds; 173 | cleanedTimeString += '.' + millisecondsString; 174 | } else { 175 | cleanedTimeString += '.000'; 176 | } 177 | if (timeString.endsWith(amString)) { 178 | cleanedTimeString = cleanedTimeString + ' ' + amString; 179 | } else if (timeString.endsWith(pmString)) { 180 | cleanedTimeString = cleanedTimeString + ' ' + pmString; 181 | } 182 | return cleanedTimeString; 183 | } 184 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js: -------------------------------------------------------------------------------- 1 | import { 2 | TEST_PM_TIME, 3 | formatMilliseconds, 4 | parseMillisecondsIntoInteger, 5 | parseDigitsIntoInteger, 6 | getAmString, 7 | getPmString, 8 | getSeparator, 9 | searchAmOrPmToken 10 | } from './helpers.js'; 11 | 12 | (function () { 13 | const tryCatchWrapper = function (callback) { 14 | return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Time Picker'); 15 | }; 16 | 17 | // Execute callback when predicate returns true. 18 | // Try again later if predicate returns false. 19 | function when(predicate, callback, timeout = 0) { 20 | if (predicate()) { 21 | callback(); 22 | } else { 23 | setTimeout(() => when(predicate, callback, 200), timeout); 24 | } 25 | } 26 | 27 | window.Vaadin.Flow.timepickerConnector = { 28 | initLazy: (timepicker) => 29 | tryCatchWrapper(function (timepicker) { 30 | // Check whether the connector was already initialized for the timepicker 31 | if (timepicker.$connector) { 32 | return; 33 | } 34 | 35 | timepicker.$connector = {}; 36 | 37 | timepicker.$connector.setLocale = tryCatchWrapper(function (locale) { 38 | // capture previous value if any 39 | let previousValueObject; 40 | if (timepicker.value && timepicker.value !== '') { 41 | previousValueObject = timepicker.i18n.parseTime(timepicker.value); 42 | } 43 | 44 | try { 45 | // Check whether the locale is supported by the browser or not 46 | TEST_PM_TIME.toLocaleTimeString(locale); 47 | } catch (e) { 48 | locale = 'en-US'; 49 | // FIXME should do a callback for server to throw an exception ? 50 | throw new Error( 51 | 'vaadin-time-picker: The locale ' + 52 | locale + 53 | ' is not supported, falling back to default locale setting(en-US).' 54 | ); 55 | } 56 | 57 | // 1. 24 or 12 hour clock, if latter then what are the am/pm strings ? 58 | const pmString = getPmString(locale); 59 | const amString = getAmString(locale); 60 | 61 | // 2. What is the separator ? 62 | const separator = getSeparator(locale); 63 | 64 | const includeSeconds = function () { 65 | return timepicker.step && timepicker.step < 60; 66 | }; 67 | 68 | const includeMilliSeconds = function () { 69 | return timepicker.step && timepicker.step < 1; 70 | }; 71 | 72 | let cachedTimeString; 73 | let cachedTimeObject; 74 | 75 | timepicker.i18n = { 76 | formatTime: tryCatchWrapper(function (timeObject) { 77 | if (!timeObject) return; 78 | 79 | const timeToBeFormatted = new Date(); 80 | timeToBeFormatted.setHours(timeObject.hours); 81 | timeToBeFormatted.setMinutes(timeObject.minutes); 82 | timeToBeFormatted.setSeconds(timeObject.seconds !== undefined ? timeObject.seconds : 0); 83 | 84 | // the web component expects the correct granularity used for the time string, 85 | // thus need to format the time object in correct granularity by passing the format options 86 | let localeTimeString = timeToBeFormatted.toLocaleTimeString(locale, { 87 | hour: 'numeric', 88 | minute: 'numeric', 89 | second: includeSeconds() ? 'numeric' : undefined 90 | }); 91 | 92 | // milliseconds not part of the time format API 93 | if (includeMilliSeconds()) { 94 | localeTimeString = formatMilliseconds(localeTimeString, timeObject.milliseconds, amString, pmString); 95 | } 96 | 97 | return localeTimeString; 98 | }), 99 | 100 | parseTime: tryCatchWrapper(function (timeString) { 101 | if (timeString && timeString === cachedTimeString && cachedTimeObject) { 102 | return cachedTimeObject; 103 | } 104 | 105 | if (!timeString) { 106 | // when nothing is returned, the component shows the invalid state for the input 107 | return; 108 | } 109 | 110 | const amToken = searchAmOrPmToken(timeString, amString); 111 | const pmToken = searchAmOrPmToken(timeString, pmString); 112 | 113 | const numbersOnlyTimeString = timeString 114 | .replace(amToken || '', '') 115 | .replace(pmToken || '', '') 116 | .trim(); 117 | 118 | // A regexp that allows to find the numbers with optional separator and continuing searching after it. 119 | const numbersRegExp = new RegExp('([\\d\\u0660-\\u0669]){1,2}(?:' + separator + ')?', 'g'); 120 | 121 | let hours = numbersRegExp.exec(numbersOnlyTimeString); 122 | if (hours) { 123 | hours = parseDigitsIntoInteger(hours[0].replace(separator, '')); 124 | // handle 12 am -> 0 125 | // do not do anything if am & pm are not used or if those are the same, 126 | // as with locale bg-BG there is always ч. at the end of the time 127 | if (amToken !== pmToken) { 128 | if (hours === 12 && amToken) { 129 | hours = 0; 130 | } 131 | if (hours !== 12 && pmToken) { 132 | hours += 12; 133 | } 134 | } 135 | const minutes = numbersRegExp.exec(numbersOnlyTimeString); 136 | const seconds = minutes && numbersRegExp.exec(numbersOnlyTimeString); 137 | // detecting milliseconds from input, expects am/pm removed from end, eg. .0 or .00 or .000 138 | const millisecondRegExp = /[[\.][\d\u0660-\u0669]{1,3}$/; 139 | // reset to end or things can explode 140 | let milliseconds = seconds && includeMilliSeconds() && millisecondRegExp.exec(numbersOnlyTimeString); 141 | // handle case where last numbers are seconds and . is the separator (invalid regexp match) 142 | if (milliseconds && milliseconds['index'] <= seconds['index']) { 143 | milliseconds = undefined; 144 | } 145 | // hours is a number at this point, others are either arrays or null 146 | // the string in [0] from the arrays includes the separator too 147 | cachedTimeObject = hours !== undefined && { 148 | hours: hours, 149 | minutes: minutes ? parseDigitsIntoInteger(minutes[0].replace(separator, '')) : 0, 150 | seconds: seconds ? parseDigitsIntoInteger(seconds[0].replace(separator, '')) : 0, 151 | milliseconds: 152 | minutes && seconds && milliseconds 153 | ? parseMillisecondsIntoInteger(milliseconds[0].replace('.', '')) 154 | : 0 155 | }; 156 | cachedTimeString = timeString; 157 | return cachedTimeObject; 158 | } 159 | }) 160 | }; 161 | 162 | if (previousValueObject) { 163 | when( 164 | () => timepicker.$, 165 | () => { 166 | const newValue = timepicker.i18n.formatTime(previousValueObject); 167 | // FIXME works but uses private API, needs fixes in web component 168 | if (timepicker.inputElement.value !== newValue) { 169 | timepicker.inputElement.value = newValue; 170 | timepicker.$.comboBox.value = newValue; 171 | } 172 | } 173 | ); 174 | } 175 | }); 176 | })(timepicker) 177 | }; 178 | })(); 179 | -------------------------------------------------------------------------------- /frontend/generated/jar-resources/virtualListConnector.js: -------------------------------------------------------------------------------- 1 | import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; 2 | import { timeOut } from '@polymer/polymer/lib/utils/async.js'; 3 | 4 | window.Vaadin.Flow.virtualListConnector = { 5 | initLazy: function (list) { 6 | // Check whether the connector was already initialized for the virtual list 7 | if (list.$connector) { 8 | return; 9 | } 10 | 11 | const extraItemsBuffer = 20; 12 | 13 | let lastRequestedRange = [0, 0]; 14 | 15 | list.$connector = {}; 16 | list.$connector.placeholderItem = { __placeholder: true }; 17 | 18 | const updateRequestedItem = function () { 19 | /* 20 | * TODO virtual list seems to do a small index adjustment after scrolling 21 | * has stopped. This causes a redundant request to be sent to make a 22 | * corresponding minimal change to the buffer. We should avoid these 23 | * requests by making the logic skip doing a request if the available 24 | * buffer is within some tolerance compared to the requested buffer. 25 | */ 26 | const visibleIndexes = [...list.children] 27 | .filter((el) => '__virtualListIndex' in el) 28 | .map((el) => el.__virtualListIndex); 29 | const firstNeededItem = Math.min(...visibleIndexes); 30 | const lastNeededItem = Math.max(...visibleIndexes); 31 | 32 | let first = Math.max(0, firstNeededItem - extraItemsBuffer); 33 | let last = Math.min(lastNeededItem + extraItemsBuffer, list.items.length); 34 | 35 | if (lastRequestedRange[0] != first || lastRequestedRange[1] != last) { 36 | lastRequestedRange = [first, last]; 37 | const count = 1 + last - first; 38 | list.$server.setRequestedRange(first, count); 39 | } 40 | }; 41 | 42 | const scheduleUpdateRequest = function () { 43 | list.__requestDebounce = Debouncer.debounce(list.__requestDebounce, timeOut.after(50), updateRequestedItem); 44 | }; 45 | 46 | requestAnimationFrame(() => updateRequestedItem); 47 | 48 | // Add an observer function that will invoke on virtualList.renderer property 49 | // change and then patches it with a wrapper renderer 50 | list.patchVirtualListRenderer = function () { 51 | if (!list.renderer || list.renderer.__virtualListConnectorPatched) { 52 | // The list either doesn't have a renderer yet or it's already been patched 53 | return; 54 | } 55 | 56 | const originalRenderer = list.renderer; 57 | 58 | const renderer = (root, list, model) => { 59 | root.__virtualListIndex = model.index; 60 | 61 | if (model.item === undefined) { 62 | if (list.$connector.placeholderElement) { 63 | // ComponentRenderer 64 | if (!root.__hasComponentRendererPlaceholder) { 65 | // The root was previously rendered by the ComponentRenderer. Clear and add a placeholder. 66 | root.innerHTML = ''; 67 | delete root._$litPart$; 68 | root.appendChild(list.$connector.placeholderElement.cloneNode(true)); 69 | root.__hasComponentRendererPlaceholder = true; 70 | } 71 | } else { 72 | // LitRenderer 73 | originalRenderer.call(list, root, list, { 74 | ...model, 75 | item: list.$connector.placeholderItem 76 | }); 77 | } 78 | } else { 79 | if (root.__hasComponentRendererPlaceholder) { 80 | // The root was previously populated with a placeholder. Clear it. 81 | root.innerHTML = ''; 82 | root.__hasComponentRendererPlaceholder = false; 83 | } 84 | 85 | originalRenderer.call(list, root, list, model); 86 | } 87 | 88 | /* 89 | * Check if we need to do anything once things have settled down. 90 | * This method is called multiple times in sequence for the same user 91 | * action, but we only want to do the check once. 92 | */ 93 | scheduleUpdateRequest(); 94 | }; 95 | renderer.__virtualListConnectorPatched = true; 96 | renderer.__rendererId = originalRenderer.__rendererId; 97 | 98 | list.renderer = renderer; 99 | }; 100 | 101 | list._createPropertyObserver('renderer', 'patchVirtualListRenderer', true); 102 | list.patchVirtualListRenderer(); 103 | 104 | list.items = []; 105 | 106 | list.$connector.set = function (index, items) { 107 | list.items.splice(index, items.length, ...items); 108 | list.items = [...list.items]; 109 | }; 110 | 111 | list.$connector.clear = function (index, length) { 112 | // How many items, starting from "index", should be set as undefined 113 | const clearCount = Math.min(length, list.items.length - index); 114 | list.$connector.set(index, [...Array(clearCount)]); 115 | }; 116 | 117 | list.$connector.updateData = function (items) { 118 | const updatedItemsMap = items.reduce((map, item) => { 119 | map[item.key] = item; 120 | return map; 121 | }, {}); 122 | 123 | list.items = list.items.map((item) => { 124 | // Items can be undefined if they are outside the viewport 125 | if (!item) { 126 | return item; 127 | } 128 | // Replace existing item with updated item, 129 | // return existing item as fallback if it was not updated 130 | return updatedItemsMap[item.key] || item; 131 | }); 132 | }; 133 | 134 | list.$connector.updateSize = function (newSize) { 135 | const delta = newSize - list.items.length; 136 | if (delta > 0) { 137 | list.items = [...list.items, ...Array(delta)]; 138 | } else if (delta < 0) { 139 | list.items = list.items.slice(0, newSize); 140 | } 141 | }; 142 | 143 | list.$connector.setPlaceholderItem = function (placeholderItem = {}, appId) { 144 | placeholderItem.__placeholder = true; 145 | list.$connector.placeholderItem = placeholderItem; 146 | const nodeId = Object.entries(placeholderItem).find(([key]) => key.endsWith('_nodeid')); 147 | list.$connector.placeholderElement = nodeId ? Vaadin.Flow.clients[appId].getByNodeId(nodeId[1]) : null; 148 | }; 149 | } 150 | }; 151 | -------------------------------------------------------------------------------- /frontend/generated/vaadin-featureflags.js: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | window.Vaadin = window.Vaadin || {}; 3 | window.Vaadin.featureFlags = window.Vaadin.featureFlags || {}; 4 | window.Vaadin.featureFlags.exampleFeatureFlag = false; 5 | window.Vaadin.featureFlags.collaborationEngineBackend = false; 6 | window.Vaadin.featureFlags.webPush = false; 7 | window.Vaadin.featureFlags.formFillerAddon = false; 8 | window.Vaadin.featureFlags.reactRouter = false; 9 | export {}; -------------------------------------------------------------------------------- /frontend/generated/vaadin.ts: -------------------------------------------------------------------------------- 1 | import './vaadin-featureflags.js'; 2 | 3 | import './index'; 4 | -------------------------------------------------------------------------------- /frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Apache Maven Wrapper startup batch script, version 3.2.0 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 28 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 29 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 30 | @REM e.g. to debug Maven itself, use 31 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 32 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 33 | @REM ---------------------------------------------------------------------------- 34 | 35 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 36 | @echo off 37 | @REM set title of command window 38 | title %0 39 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 40 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 41 | 42 | @REM set %HOME% to equivalent of $HOME 43 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 44 | 45 | @REM Execute a user defined script before this one 46 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 47 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 48 | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* 49 | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* 50 | :skipRcPre 51 | 52 | @setlocal 53 | 54 | set ERROR_CODE=0 55 | 56 | @REM To isolate internal variables from possible post scripts, we use another setlocal 57 | @setlocal 58 | 59 | @REM ==== START VALIDATION ==== 60 | if not "%JAVA_HOME%" == "" goto OkJHome 61 | 62 | echo. 63 | echo Error: JAVA_HOME not found in your environment. >&2 64 | echo Please set the JAVA_HOME variable in your environment to match the >&2 65 | echo location of your Java installation. >&2 66 | echo. 67 | goto error 68 | 69 | :OkJHome 70 | if exist "%JAVA_HOME%\bin\java.exe" goto init 71 | 72 | echo. 73 | echo Error: JAVA_HOME is set to an invalid directory. >&2 74 | echo JAVA_HOME = "%JAVA_HOME%" >&2 75 | echo Please set the JAVA_HOME variable in your environment to match the >&2 76 | echo location of your Java installation. >&2 77 | echo. 78 | goto error 79 | 80 | @REM ==== END VALIDATION ==== 81 | 82 | :init 83 | 84 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 85 | @REM Fallback to current working directory if not found. 86 | 87 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 88 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 89 | 90 | set EXEC_DIR=%CD% 91 | set WDIR=%EXEC_DIR% 92 | :findBaseDir 93 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 94 | cd .. 95 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 96 | set WDIR=%CD% 97 | goto findBaseDir 98 | 99 | :baseDirFound 100 | set MAVEN_PROJECTBASEDIR=%WDIR% 101 | cd "%EXEC_DIR%" 102 | goto endDetectBaseDir 103 | 104 | :baseDirNotFound 105 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 106 | cd "%EXEC_DIR%" 107 | 108 | :endDetectBaseDir 109 | 110 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 111 | 112 | @setlocal EnableExtensions EnableDelayedExpansion 113 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 114 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 115 | 116 | :endReadAdditionalConfig 117 | 118 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 119 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 120 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 121 | 122 | set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" 123 | 124 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 125 | IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B 126 | ) 127 | 128 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 129 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 130 | if exist %WRAPPER_JAR% ( 131 | if "%MVNW_VERBOSE%" == "true" ( 132 | echo Found %WRAPPER_JAR% 133 | ) 134 | ) else ( 135 | if not "%MVNW_REPOURL%" == "" ( 136 | SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" 137 | ) 138 | if "%MVNW_VERBOSE%" == "true" ( 139 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 140 | echo Downloading from: %WRAPPER_URL% 141 | ) 142 | 143 | powershell -Command "&{"^ 144 | "$webclient = new-object System.Net.WebClient;"^ 145 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 146 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 147 | "}"^ 148 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ 149 | "}" 150 | if "%MVNW_VERBOSE%" == "true" ( 151 | echo Finished downloading %WRAPPER_JAR% 152 | ) 153 | ) 154 | @REM End of extension 155 | 156 | @REM If specified, validate the SHA-256 sum of the Maven wrapper jar file 157 | SET WRAPPER_SHA_256_SUM="" 158 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 159 | IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B 160 | ) 161 | IF NOT %WRAPPER_SHA_256_SUM%=="" ( 162 | powershell -Command "&{"^ 163 | "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ 164 | "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ 165 | " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ 166 | " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ 167 | " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ 168 | " exit 1;"^ 169 | "}"^ 170 | "}" 171 | if ERRORLEVEL 1 goto error 172 | ) 173 | 174 | @REM Provide a "standardized" way to retrieve the CLI args that will 175 | @REM work with both Windows and non-Windows executions. 176 | set MAVEN_CMD_LINE_ARGS=%* 177 | 178 | %MAVEN_JAVA_EXE% ^ 179 | %JVM_CONFIG_MAVEN_PROPS% ^ 180 | %MAVEN_OPTS% ^ 181 | %MAVEN_DEBUG_OPTS% ^ 182 | -classpath %WRAPPER_JAR% ^ 183 | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ 184 | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 185 | if ERRORLEVEL 1 goto error 186 | goto end 187 | 188 | :error 189 | set ERROR_CODE=1 190 | 191 | :end 192 | @endlocal & set ERROR_CODE=%ERROR_CODE% 193 | 194 | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost 195 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 196 | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" 197 | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" 198 | :skipRcPost 199 | 200 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 201 | if "%MAVEN_BATCH_PAUSE%"=="on" pause 202 | 203 | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% 204 | 205 | cmd /C exit /B %ERROR_CODE% 206 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.2.2 9 | 10 | 11 | org.vaadin.marcus 12 | vaadin-ai 13 | 0.0.1-SNAPSHOT 14 | vaadin-ai 15 | Demo Vaadin Flow + Spring AI 16 | 17 | 21 18 | 24.3.5 19 | 0.8.0-SNAPSHOT 20 | 21 | 22 | 23 | spring-milestones 24 | Spring Milestones 25 | https://repo.spring.io/milestone 26 | 27 | false 28 | 29 | 30 | 31 | spring-snapshots 32 | Spring Snapshots 33 | https://repo.spring.io/snapshot 34 | 35 | false 36 | 37 | 38 | 39 | 40 | 41 | com.vaadin 42 | vaadin-spring-boot-starter 43 | 44 | 45 | org.springframework.ai 46 | spring-ai-openai-spring-boot-starter 47 | ${spring.ai.version} 48 | 49 | 50 | 51 | org.springframework.boot 52 | spring-boot-starter-test 53 | test 54 | 55 | 56 | 57 | 58 | 59 | com.vaadin 60 | vaadin-bom 61 | ${vaadin.version} 62 | pom 63 | import 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | org.springframework.boot 72 | spring-boot-maven-plugin 73 | 74 | 75 | org.graalvm.buildtools 76 | native-maven-plugin 77 | 78 | 79 | --initialize-at-run-time=io.netty 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | production 89 | 90 | 91 | 92 | com.vaadin 93 | vaadin-maven-plugin 94 | ${vaadin.version} 95 | 96 | 97 | frontend 98 | compile 99 | 100 | prepare-frontend 101 | build-frontend 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /src/main/java/org/vaadin/marcus/vaadinai/VaadinAiApplication.java: -------------------------------------------------------------------------------- 1 | package org.vaadin.marcus.vaadinai; 2 | 3 | import com.vaadin.flow.component.html.Paragraph; 4 | import com.vaadin.flow.component.messages.MessageInput; 5 | import com.vaadin.flow.component.orderedlayout.VerticalLayout; 6 | import com.vaadin.flow.router.Route; 7 | import org.springframework.ai.chat.ChatClient; 8 | import org.springframework.boot.SpringApplication; 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; 10 | 11 | // compile with ./mvnw -DskipTests -Pnative -Pproduction native:compile 12 | @SpringBootApplication 13 | public class VaadinAiApplication { 14 | 15 | @Route("") 16 | static class AiChat extends VerticalLayout { 17 | 18 | public AiChat(ChatClient chatClient) { 19 | var messageList = new VerticalLayout(); 20 | var messageInput = new MessageInput(); 21 | 22 | messageInput.addSubmitListener(e -> { 23 | messageList.add(new Paragraph("You: " + e.getValue())); 24 | messageList.add(new Paragraph("AI: " + chatClient.call(e.getValue()))); 25 | }); 26 | 27 | add(messageList, messageInput); 28 | } 29 | } 30 | 31 | public static void main(String[] args) { 32 | SpringApplication.run(VaadinAiApplication.class, args); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.ai.openai.api-key=${OPENAI_API_KEY} 2 | -------------------------------------------------------------------------------- /src/test/java/org/vaadin/marcus/vaadinai/VaadinAiApplicationTests.java: -------------------------------------------------------------------------------- 1 | package org.vaadin.marcus.vaadinai; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class VaadinAiApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | --------------------------------------------------------------------------------