first commit

This commit is contained in:
Mirco 2024-06-06 17:45:46 +02:00
commit abaff760ab
160 changed files with 24655 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
build/
.gradle/

6
.idea/compiler.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>

16
.idea/gradle.xml Normal file
View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

35
.idea/jarRepositories.xml Normal file
View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://maven.vaadin.com/vaadin-prereleases" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="https://maven.vaadin.com/vaadin-addons" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://repo.spring.io/milestone" />
</remote-repository>
</component>
</project>

5
.idea/misc.xml Normal file
View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK" />
</project>

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

73
.idea/workspace.xml Normal file
View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="cd657914-f421-422e-8fe7-ce4378fd5404" name="Changes" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
<ProjectState />
</projectState>
</component>
<component name="ExternalProjectsManager">
<system id="GRADLE">
<state>
<projects_view>
<tree_state>
<expand />
<select />
</tree_state>
</projects_view>
</state>
</system>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="PackageJsonUpdateNotifier">
<dismissed value="$PROJECT_DIR$/package.json" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 1
}</component>
<component name="ProjectId" id="2hV3Hk3pvRz782a69ZKSvDUKTKi" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_ADD_EXTERNAL_FILES": "true",
"Gradle.ModeratorElection [:MEApplication.main()].executor": "Run",
"Gradle.base-starter-spring-gradle [:DemoApplication.main()].executor": "Run",
"Gradle.base-starter-spring-gradle [:MEApplication.main()].executor": "Run",
"RunOnceActivity.ShowReadmeOnStart": "true",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "/home/zam/repo/JavaLearning/base-starter-spring-gradle"
}
}]]></component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="cd657914-f421-422e-8fe7-ce4378fd5404" name="Changes" comment="" />
<created>1717665331661</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1717665331661</updated>
</task>
<servers />
</component>
</project>

201
LICENSE Normal file
View file

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

41
build.gradle Normal file
View file

@ -0,0 +1,41 @@
buildscript {
repositories {
mavenCentral()
maven { setUrl("https://maven.vaadin.com/vaadin-prereleases") }
maven { setUrl("https://repo.spring.io/milestone") }
}
}
plugins {
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'java'
id 'com.vaadin'
}
repositories {
mavenCentral()
maven { setUrl("https://maven.vaadin.com/vaadin-prereleases") }
maven { setUrl("https://repo.spring.io/milestone") }
maven { setUrl("https://maven.vaadin.com/vaadin-addons") }
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
implementation('com.vaadin:vaadin-spring-boot-starter')
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
dependencyManagement {
imports {
mavenBom "com.vaadin:vaadin-bom:$vaadinVersion"
}
}

View file

@ -0,0 +1 @@
export {}

View file

@ -0,0 +1,93 @@
import '@vaadin/polymer-legacy-adapter/style-modules.js';
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
import '@vaadin/common-frontend/ConnectionIndicator.js';
import '@vaadin/accordion/src/vaadin-accordion.js';
import '@vaadin/details/src/vaadin-details.js';
import '@vaadin/accordion/src/vaadin-accordion-panel.js';
import '@vaadin/app-layout/src/vaadin-app-layout.js';
import '@vaadin/button/src/vaadin-button.js';
import 'Frontend/generated/jar-resources/buttonFunctions.js';
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
import '@vaadin/avatar/src/vaadin-avatar.js';
import '@vaadin/avatar-group/src/vaadin-avatar-group.js';
import '@vaadin/checkbox/src/vaadin-checkbox.js';
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
import '@vaadin/combo-box/src/vaadin-combo-box.js';
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
import '@vaadin/confirm-dialog/src/vaadin-confirm-dialog.js';
import '@vaadin/context-menu/src/vaadin-context-menu.js';
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
import '@vaadin/custom-field/src/vaadin-custom-field.js';
import '@vaadin/date-picker/src/vaadin-date-picker.js';
import 'Frontend/generated/jar-resources/datepickerConnector.js';
import '@vaadin/date-time-picker/src/vaadin-date-time-picker.js';
import '@vaadin/time-picker/src/vaadin-time-picker.js';
import 'Frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js';
import '@vaadin/dialog/src/vaadin-dialog.js';
import 'Frontend/generated/jar-resources/dndConnector.js';
import '@vaadin/field-highlighter/src/vaadin-field-highlighter.js';
import '@vaadin/form-layout/src/vaadin-form-layout.js';
import '@vaadin/form-layout/src/vaadin-form-item.js';
import '@vaadin/grid/src/vaadin-grid-column-group.js';
import '@vaadin/grid/src/vaadin-grid.js';
import '@vaadin/grid/src/vaadin-grid-column.js';
import '@vaadin/grid/src/vaadin-grid-sorter.js';
import 'Frontend/generated/jar-resources/gridConnector.ts';
import '@vaadin/tooltip/src/vaadin-tooltip.js';
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
import '@vaadin/icon/src/vaadin-icon.js';
import '@vaadin/icons/vaadin-iconset.js';
import '@vaadin/list-box/src/vaadin-list-box.js';
import '@vaadin/item/src/vaadin-item.js';
import '@vaadin/login/src/vaadin-login-form.js';
import '@vaadin/login/src/vaadin-login-overlay.js';
import 'Frontend/generated/jar-resources/menubarConnector.js';
import '@vaadin/menu-bar/src/vaadin-menu-bar.js';
import '@vaadin/message-input/src/vaadin-message-input.js';
import 'Frontend/generated/jar-resources/messageListConnector.js';
import '@vaadin/message-list/src/vaadin-message-list.js';
import '@vaadin/notification/src/vaadin-notification.js';
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
import '@vaadin/scroller/src/vaadin-scroller.js';
import '@vaadin/progress-bar/src/vaadin-progress-bar.js';
import '@vaadin/radio-group/src/vaadin-radio-button.js';
import '@vaadin/radio-group/src/vaadin-radio-group.js';
import '@vaadin/select/src/vaadin-select.js';
import 'Frontend/generated/jar-resources/selectConnector.js';
import 'Frontend/generated/jar-resources/tooltip.ts';
import '@vaadin/side-nav/src/vaadin-side-nav.js';
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
import '@vaadin/split-layout/src/vaadin-split-layout.js';
import '@vaadin/tabs/src/vaadin-tab.js';
import '@vaadin/tabsheet/src/vaadin-tabsheet.js';
import '@vaadin/tabs/src/vaadin-tabs.js';
import 'Frontend/generated/jar-resources/vaadin-big-decimal-field.js';
import '@vaadin/email-field/src/vaadin-email-field.js';
import '@vaadin/integer-field/src/vaadin-integer-field.js';
import '@vaadin/number-field/src/vaadin-number-field.js';
import '@vaadin/password-field/src/vaadin-password-field.js';
import '@vaadin/text-area/src/vaadin-text-area.js';
import '@vaadin/text-field/src/vaadin-text-field.js';
import 'Frontend/generated/jar-resources/lit-renderer.ts';
import '@vaadin/grid/src/vaadin-grid-tree-toggle.js';
import '@vaadin/upload/src/vaadin-upload.js';
import '@vaadin/virtual-list/src/vaadin-virtual-list.js';
import 'Frontend/generated/jar-resources/virtualListConnector.js';
import '@vaadin/vaadin-lumo-styles/color-global.js';
import '@vaadin/vaadin-lumo-styles/typography-global.js';
import '@vaadin/vaadin-lumo-styles/sizing.js';
import '@vaadin/vaadin-lumo-styles/spacing.js';
import '@vaadin/vaadin-lumo-styles/style.js';
import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js';
const loadOnDemand = (key) => { return Promise.resolve(0); }
window.Vaadin = window.Vaadin || {};
window.Vaadin.Flow = window.Vaadin.Flow || {};
window.Vaadin.Flow.loadOnDemand = loadOnDemand;
window.Vaadin.Flow.resetFocus = () => {
let ae=document.activeElement;
while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement;
return !ae || ae.blur() || ae.focus() || true;
}

View file

@ -0,0 +1,91 @@
import '@vaadin/polymer-legacy-adapter/style-modules.js';
import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
import '@vaadin/common-frontend/ConnectionIndicator.js';
import '@vaadin/accordion/src/vaadin-accordion.js';
import '@vaadin/details/src/vaadin-details.js';
import '@vaadin/accordion/src/vaadin-accordion-panel.js';
import '@vaadin/app-layout/src/vaadin-app-layout.js';
import '@vaadin/button/src/vaadin-button.js';
import 'Frontend/generated/jar-resources/buttonFunctions.js';
import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
import '@vaadin/avatar/src/vaadin-avatar.js';
import '@vaadin/avatar-group/src/vaadin-avatar-group.js';
import '@vaadin/checkbox/src/vaadin-checkbox.js';
import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
import '@vaadin/combo-box/src/vaadin-combo-box.js';
import 'Frontend/generated/jar-resources/flow-component-renderer.js';
import 'Frontend/generated/jar-resources/comboBoxConnector.js';
import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js';
import '@vaadin/confirm-dialog/src/vaadin-confirm-dialog.js';
import '@vaadin/context-menu/src/vaadin-context-menu.js';
import 'Frontend/generated/jar-resources/contextMenuConnector.js';
import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js';
import '@vaadin/custom-field/src/vaadin-custom-field.js';
import '@vaadin/date-picker/src/vaadin-date-picker.js';
import 'Frontend/generated/jar-resources/datepickerConnector.js';
import '@vaadin/date-time-picker/src/vaadin-date-time-picker.js';
import '@vaadin/time-picker/src/vaadin-time-picker.js';
import 'Frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js';
import '@vaadin/dialog/src/vaadin-dialog.js';
import 'Frontend/generated/jar-resources/dndConnector.js';
import '@vaadin/field-highlighter/src/vaadin-field-highlighter.js';
import '@vaadin/form-layout/src/vaadin-form-layout.js';
import '@vaadin/form-layout/src/vaadin-form-item.js';
import '@vaadin/grid/src/vaadin-grid-column-group.js';
import '@vaadin/grid/src/vaadin-grid.js';
import '@vaadin/grid/src/vaadin-grid-column.js';
import '@vaadin/grid/src/vaadin-grid-sorter.js';
import 'Frontend/generated/jar-resources/gridConnector.ts';
import '@vaadin/tooltip/src/vaadin-tooltip.js';
import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js';
import '@vaadin/icon/src/vaadin-icon.js';
import '@vaadin/icons/vaadin-iconset.js';
import '@vaadin/list-box/src/vaadin-list-box.js';
import '@vaadin/item/src/vaadin-item.js';
import '@vaadin/login/src/vaadin-login-form.js';
import '@vaadin/login/src/vaadin-login-overlay.js';
import 'Frontend/generated/jar-resources/menubarConnector.js';
import '@vaadin/menu-bar/src/vaadin-menu-bar.js';
import '@vaadin/message-input/src/vaadin-message-input.js';
import 'Frontend/generated/jar-resources/messageListConnector.js';
import '@vaadin/message-list/src/vaadin-message-list.js';
import '@vaadin/notification/src/vaadin-notification.js';
import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
import '@vaadin/scroller/src/vaadin-scroller.js';
import '@vaadin/progress-bar/src/vaadin-progress-bar.js';
import '@vaadin/radio-group/src/vaadin-radio-button.js';
import '@vaadin/radio-group/src/vaadin-radio-group.js';
import '@vaadin/select/src/vaadin-select.js';
import 'Frontend/generated/jar-resources/selectConnector.js';
import 'Frontend/generated/jar-resources/tooltip.ts';
import '@vaadin/side-nav/src/vaadin-side-nav.js';
import '@vaadin/side-nav/src/vaadin-side-nav-item.js';
import '@vaadin/split-layout/src/vaadin-split-layout.js';
import '@vaadin/tabs/src/vaadin-tab.js';
import '@vaadin/tabsheet/src/vaadin-tabsheet.js';
import '@vaadin/tabs/src/vaadin-tabs.js';
import 'Frontend/generated/jar-resources/vaadin-big-decimal-field.js';
import '@vaadin/email-field/src/vaadin-email-field.js';
import '@vaadin/integer-field/src/vaadin-integer-field.js';
import '@vaadin/number-field/src/vaadin-number-field.js';
import '@vaadin/password-field/src/vaadin-password-field.js';
import '@vaadin/text-area/src/vaadin-text-area.js';
import '@vaadin/text-field/src/vaadin-text-field.js';
import 'Frontend/generated/jar-resources/lit-renderer.ts';
import '@vaadin/grid/src/vaadin-grid-tree-toggle.js';
import '@vaadin/upload/src/vaadin-upload.js';
import '@vaadin/virtual-list/src/vaadin-virtual-list.js';
import 'Frontend/generated/jar-resources/virtualListConnector.js';
import '@vaadin/vaadin-lumo-styles/sizing.js';
import '@vaadin/vaadin-lumo-styles/spacing.js';
import '@vaadin/vaadin-lumo-styles/style.js';
import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js';
const loadOnDemand = (key) => { return Promise.resolve(0); }
window.Vaadin = window.Vaadin || {};
window.Vaadin.Flow = window.Vaadin.Flow || {};
window.Vaadin.Flow.loadOnDemand = loadOnDemand;
window.Vaadin.Flow.resetFocus = () => {
let ae=document.activeElement;
while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement;
return !ae || ae.blur() || ae.focus() || true;
}

View file

@ -0,0 +1,75 @@
export interface FlowConfig {
imports?: () => void;
}
interface AppConfig {
productionMode: boolean;
appId: string;
uidl: any;
}
interface AppInitResponse {
appConfig: AppConfig;
pushScript?: string;
}
interface Router {
render: (ctx: NavigationParameters, shouldUpdateHistory: boolean) => Promise<void>;
}
interface HTMLRouterContainer extends HTMLElement {
onBeforeEnter?: (ctx: NavigationParameters, cmd: PreventAndRedirectCommands, router: Router) => void | Promise<any>;
onBeforeLeave?: (ctx: NavigationParameters, cmd: PreventCommands, router: Router) => void | Promise<any>;
serverConnected?: (cancel: boolean, url?: NavigationParameters) => void;
serverPaused?: () => void;
}
interface FlowRoute {
action: (params: NavigationParameters) => Promise<HTMLRouterContainer>;
path: string;
}
export interface NavigationParameters {
pathname: string;
search: string;
}
export interface PreventCommands {
prevent: () => any;
}
export interface PreventAndRedirectCommands extends PreventCommands {
redirect: (route: string) => any;
}
/**
* Client API for flow UI operations.
*/
export declare class Flow {
config: FlowConfig;
response?: AppInitResponse;
pathname: string;
container: HTMLRouterContainer;
private isActive;
private baseRegex;
private appShellTitle;
private navigation;
constructor(config?: FlowConfig);
/**
* Return a `route` object for vaadin-router in an one-element array.
*
* The `FlowRoute` object `path` property handles any route,
* and the `action` returns the flow container without updating the content,
* delaying the actual Flow server call to the `onBeforeEnter` phase.
*
* This is a specific API for its use with `vaadin-router`.
*/
get serverSideRoutes(): [FlowRoute];
loadingStarted(): void;
loadingFinished(): void;
private get action();
private flowLeave;
private flowNavigate;
private getFlowRoutePath;
private getFlowRouteQuery;
private flowInit;
private loadScript;
private injectAppIdScript;
private flowInitClient;
private flowInitUi;
private addConnectionIndicator;
private offlineStubAction;
private isFlowClientLoaded;
}
export {};

View file

@ -0,0 +1,356 @@
import { ConnectionIndicator, ConnectionState } from '@vaadin/common-frontend';
class FlowUiInitializationError extends Error {
}
// flow uses body for keeping references
const flowRoot = window.document.body;
const $wnd = window;
/**
* Client API for flow UI operations.
*/
export class Flow {
constructor(config) {
this.response = undefined;
this.pathname = '';
// flag used to inform Testbench whether a server route is in progress
this.isActive = false;
this.baseRegex = /^\//;
this.navigation = '';
flowRoot.$ = flowRoot.$ || [];
this.config = config || {};
// TB checks for the existence of window.Vaadin.Flow in order
// to consider that TB needs to wait for `initFlow()`.
$wnd.Vaadin = $wnd.Vaadin || {};
$wnd.Vaadin.Flow = $wnd.Vaadin.Flow || {};
$wnd.Vaadin.Flow.clients = {
TypeScript: {
isActive: () => this.isActive
}
};
// Regular expression used to remove the app-context
const elm = document.head.querySelector('base');
this.baseRegex = new RegExp(`^${
// IE11 does not support document.baseURI
(document.baseURI || (elm && elm.href) || '/').replace(/^https?:\/\/[^/]+/i, '')}`);
this.appShellTitle = document.title;
// Put a vaadin-connection-indicator in the dom
this.addConnectionIndicator();
}
/**
* Return a `route` object for vaadin-router in an one-element array.
*
* The `FlowRoute` object `path` property handles any route,
* and the `action` returns the flow container without updating the content,
* delaying the actual Flow server call to the `onBeforeEnter` phase.
*
* This is a specific API for its use with `vaadin-router`.
*/
get serverSideRoutes() {
return [
{
path: '(.*)',
action: this.action
}
];
}
loadingStarted() {
// Make Testbench know that server request is in progress
this.isActive = true;
$wnd.Vaadin.connectionState.loadingStarted();
}
loadingFinished() {
// Make Testbench know that server request has finished
this.isActive = false;
$wnd.Vaadin.connectionState.loadingFinished();
if ($wnd.Vaadin.listener) {
// Listeners registered, do not register again.
return;
}
$wnd.Vaadin.listener = {};
// Listen for click on router-links -> 'link' navigation trigger
// and on <a> nodes -> 'client' navigation trigger.
// Use capture phase to detect prevented / stopped events.
document.addEventListener('click', (_e) => {
if (_e.target) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (_e.target.hasAttribute('router-link')) {
this.navigation = 'link';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
}
else if (_e.composedPath().some((node) => node.nodeName === 'A')) {
this.navigation = 'client';
}
}
}, {
capture: true
});
}
get action() {
// Return a function which is bound to the flow instance, thus we can use
// the syntax `...serverSideRoutes` in vaadin-router.
return async (params) => {
// Store last action pathname so as we can check it in events
this.pathname = params.pathname;
if ($wnd.Vaadin.connectionState.online) {
try {
await this.flowInit();
}
catch (error) {
if (error instanceof FlowUiInitializationError) {
// error initializing Flow: assume connection lost
$wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;
return this.offlineStubAction();
}
else {
throw error;
}
}
}
else {
// insert an offline stub
return this.offlineStubAction();
}
// When an action happens, navigation will be resolved `onBeforeEnter`
this.container.onBeforeEnter = (ctx, cmd) => this.flowNavigate(ctx, cmd);
// For covering the 'server -> client' use case
this.container.onBeforeLeave = (ctx, cmd) => this.flowLeave(ctx, cmd);
return this.container;
};
}
// Send a remote call to `JavaScriptBootstrapUI` to check
// whether navigation has to be cancelled.
async flowLeave(ctx, cmd) {
// server -> server, viewing offline stub, or browser is offline
const { connectionState } = $wnd.Vaadin;
if (this.pathname === ctx.pathname || !this.isFlowClientLoaded() || connectionState.offline) {
return Promise.resolve({});
}
// 'server -> client'
return new Promise((resolve) => {
this.loadingStarted();
// The callback to run from server side to cancel navigation
this.container.serverConnected = (cancel) => {
resolve(cmd && cancel ? cmd.prevent() : {});
this.loadingFinished();
};
// Call server side to check whether we can leave the view
flowRoot.$server.leaveNavigation(this.getFlowRoutePath(ctx), this.getFlowRouteQuery(ctx));
});
}
// Send the remote call to `JavaScriptBootstrapUI` to render the flow
// route specified by the context
async flowNavigate(ctx, cmd) {
if (this.response) {
return new Promise((resolve) => {
this.loadingStarted();
// The callback to run from server side once the view is ready
this.container.serverConnected = (cancel, redirectContext) => {
if (cmd && cancel) {
resolve(cmd.prevent());
}
else if (cmd && cmd.redirect && redirectContext) {
resolve(cmd.redirect(redirectContext.pathname));
}
else {
this.container.style.display = '';
resolve(this.container);
}
this.loadingFinished();
};
this.container.serverPaused = () => {
this.loadingFinished();
};
// Call server side to navigate to the given route
flowRoot.$server.connectClient(this.getFlowRoutePath(ctx), this.getFlowRouteQuery(ctx), this.appShellTitle, history.state, this.navigation);
// Default to history navigation trigger.
// Link and client cases are handled by click listener in loadingFinished().
this.navigation = 'history';
});
}
else {
// No server response => offline or erroneous connection
return Promise.resolve(this.container);
}
}
getFlowRoutePath(context) {
return decodeURIComponent(context.pathname).replace(this.baseRegex, '');
}
getFlowRouteQuery(context) {
return (context.search && context.search.substring(1)) || '';
}
// import flow client modules and initialize UI in server side.
async flowInit() {
// Do not start flow twice
if (!this.isFlowClientLoaded()) {
// show flow progress indicator
this.loadingStarted();
// Initialize server side UI
this.response = await this.flowInitUi();
const { pushScript, appConfig } = this.response;
if (typeof pushScript === 'string') {
await this.loadScript(pushScript);
}
const { appId } = appConfig;
// Load bootstrap script with server side parameters
const bootstrapMod = await import('./FlowBootstrap');
await bootstrapMod.init(this.response);
// Load custom modules defined by user
if (typeof this.config.imports === 'function') {
this.injectAppIdScript(appId);
await this.config.imports();
}
// we use a custom tag for the flow app container
const tag = `flow-container-${appId.toLowerCase()}`;
const serverCreatedContainer = document.querySelector(tag);
if (serverCreatedContainer) {
this.container = serverCreatedContainer;
}
else {
this.container = document.createElement(tag);
this.container.id = appId;
}
flowRoot.$[appId] = this.container;
// Load flow-client module
const clientMod = await import('./FlowClient');
await this.flowInitClient(clientMod);
// hide flow progress indicator
this.loadingFinished();
}
// It might be that components created from server expect that their content has been rendered.
// Appending eagerly the container we avoid these kind of errors.
// Note that the client router will move this container to the outlet if the navigation succeed
if (this.container && !this.container.isConnected) {
this.container.style.display = 'none';
document.body.appendChild(this.container);
}
return this.response;
}
async loadScript(url) {
return new Promise((resolve, reject) => {
const script = document.createElement('script');
script.onload = () => resolve();
script.onerror = reject;
script.src = url;
document.body.appendChild(script);
});
}
injectAppIdScript(appId) {
const appIdWithoutHashCode = appId.substring(0, appId.lastIndexOf('-'));
const scriptAppId = document.createElement('script');
scriptAppId.type = 'module';
scriptAppId.setAttribute('data-app-id', appIdWithoutHashCode);
document.body.append(scriptAppId);
}
// After the flow-client javascript module has been loaded, this initializes flow UI
// in the browser.
async flowInitClient(clientMod) {
clientMod.init();
// client init is async, we need to loop until initialized
return new Promise((resolve) => {
const intervalId = setInterval(() => {
// client `isActive() == true` while initializing or processing
const initializing = Object.keys($wnd.Vaadin.Flow.clients)
.filter((key) => key !== 'TypeScript')
.reduce((prev, id) => prev || $wnd.Vaadin.Flow.clients[id].isActive(), false);
if (!initializing) {
clearInterval(intervalId);
resolve();
}
}, 5);
});
}
// Returns the `appConfig` object
async flowInitUi() {
// appConfig was sent in the index.html request
const initial = $wnd.Vaadin && $wnd.Vaadin.TypeScript && $wnd.Vaadin.TypeScript.initial;
if (initial) {
$wnd.Vaadin.TypeScript.initial = undefined;
return Promise.resolve(initial);
}
// send a request to the `JavaScriptBootstrapHandler`
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
const httpRequest = xhr;
const requestPath = `?v-r=init&location=${encodeURIComponent(this.getFlowRoutePath(location))}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`;
httpRequest.open('GET', requestPath);
httpRequest.onerror = () => reject(new FlowUiInitializationError(`Invalid server response when initializing Flow UI.
${httpRequest.status}
${httpRequest.responseText}`));
httpRequest.onload = () => {
const contentType = httpRequest.getResponseHeader('content-type');
if (contentType && contentType.indexOf('application/json') !== -1) {
resolve(JSON.parse(httpRequest.responseText));
}
else {
httpRequest.onerror();
}
};
httpRequest.send();
});
}
// Create shared connection state store and connection indicator
addConnectionIndicator() {
// add connection indicator to DOM
ConnectionIndicator.create();
// Listen to browser online/offline events and update the loading indicator accordingly.
// Note: if flow-client is loaded, it instead handles the state transitions.
$wnd.addEventListener('online', () => {
if (!this.isFlowClientLoaded()) {
// Send an HTTP HEAD request for sw.js to verify server reachability.
// We do not expect sw.js to be cached, so the request goes to the
// server rather than being served from local cache.
// Require network-level failure to revert the state to CONNECTION_LOST
// (HTTP error code is ok since it still verifies server's presence).
$wnd.Vaadin.connectionState.state = ConnectionState.RECONNECTING;
const http = new XMLHttpRequest();
http.open('HEAD', 'sw.js');
http.onload = () => {
$wnd.Vaadin.connectionState.state = ConnectionState.CONNECTED;
};
http.onerror = () => {
$wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;
};
// Postpone request to reduce potential net::ERR_INTERNET_DISCONNECTED
// errors that sometimes occurs even if browser says it is online
setTimeout(() => http.send(), 50);
}
});
$wnd.addEventListener('offline', () => {
if (!this.isFlowClientLoaded()) {
$wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;
}
});
}
async offlineStubAction() {
const offlineStub = document.createElement('iframe');
const offlineStubPath = './offline-stub.html';
offlineStub.setAttribute('src', offlineStubPath);
offlineStub.setAttribute('style', 'width: 100%; height: 100%; border: 0');
this.response = undefined;
let onlineListener;
const removeOfflineStubAndOnlineListener = () => {
if (onlineListener !== undefined) {
$wnd.Vaadin.connectionState.removeStateChangeListener(onlineListener);
onlineListener = undefined;
}
};
offlineStub.onBeforeEnter = (ctx, _cmds, router) => {
onlineListener = () => {
if ($wnd.Vaadin.connectionState.online) {
removeOfflineStubAndOnlineListener();
router.render(ctx, false);
}
};
$wnd.Vaadin.connectionState.addStateChangeListener(onlineListener);
};
offlineStub.onBeforeLeave = (_ctx, _cmds, _router) => {
removeOfflineStubAndOnlineListener();
};
return offlineStub;
}
isFlowClientLoaded() {
return this.response !== undefined;
}
}
//# sourceMappingURL=Flow.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
export const init: (appInitResponse: any) => void;

View file

@ -0,0 +1,262 @@
/* This is a copy of the regular `BootstrapHandler.js` in the flow-server
module, but with the following modifications:
- The main function is exported as an ES module for lazy initialization.
- Application configuration is passed as a parameter instead of using
replacement placeholders as in the regular bootstrapping.
- It reuses `Vaadin.Flow.clients` if exists.
- Fixed lint errors.
*/
const init = function (appInitResponse) {
window.Vaadin = window.Vaadin || {};
window.Vaadin.Flow = window.Vaadin.Flow || {};
var apps = {};
var widgetsets = {};
var log;
if (typeof window.console === undefined || !window.location.search.match(/[&?]debug(&|$)/)) {
/* If no console.log present, just use a no-op */
log = function () {};
} else if (typeof window.console.log === 'function') {
/* If it's a function, use it with apply */
log = function () {
window.console.log.apply(window.console, arguments);
};
} else {
/* In IE, its a native function for which apply is not defined, but it works
without a proper 'this' reference */
log = window.console.log;
}
var isInitializedInDom = function (appId) {
var appDiv = document.getElementById(appId);
if (!appDiv) {
return false;
}
for (var i = 0; i < appDiv.childElementCount; i++) {
var className = appDiv.childNodes[i].className;
/* If the app div contains a child with the class
'v-app-loading' we have only received the HTML
but not yet started the widget set
(UIConnector removes the v-app-loading div). */
if (className && className.indexOf('v-app-loading') != -1) {
return false;
}
}
return true;
};
/*
* Needed for Testbench compatibility, but prevents any Vaadin 7 app from
* bootstrapping unless the legacy vaadinBootstrap.js file is loaded before
* this script.
*/
window.Vaadin = window.Vaadin || {};
window.Vaadin.Flow = window.Vaadin.Flow || {};
/*
* Needed for wrapping custom javascript functionality in the components (i.e. connectors)
*/
window.Vaadin.Flow.tryCatchWrapper = function (originalFunction, component) {
return function () {
try {
// eslint-disable-next-line
const result = originalFunction.apply(this, arguments);
return result;
} catch (error) {
console.error(
`There seems to be an error in ${component}:
${error.message}
Please submit an issue to https://github.com/vaadin/flow-components/issues/new/choose`
);
}
};
};
if (!window.Vaadin.Flow.initApplication) {
window.Vaadin.Flow.clients = window.Vaadin.Flow.clients || {};
window.Vaadin.Flow.initApplication = function (appId, config) {
var testbenchId = appId.replace(/-\d+$/, '');
if (apps[appId]) {
if (
window.Vaadin &&
window.Vaadin.Flow &&
window.Vaadin.Flow.clients &&
window.Vaadin.Flow.clients[testbenchId] &&
window.Vaadin.Flow.clients[testbenchId].initializing
) {
throw new Error('Application ' + appId + ' is already being initialized');
}
if (isInitializedInDom(appId)) {
throw new Error('Application ' + appId + ' already initialized');
}
}
log('init application', appId, config);
window.Vaadin.Flow.clients[testbenchId] = {
isActive: function () {
return true;
},
initializing: true,
productionMode: mode
};
var getConfig = function (name) {
var value = config[name];
return value;
};
/* Export public data */
var app = {
getConfig: getConfig
};
apps[appId] = app;
if (!window.name) {
window.name = appId + '-' + Math.random();
}
var widgetset = 'client';
widgetsets[widgetset] = {
pendingApps: []
};
if (widgetsets[widgetset].callback) {
log('Starting from bootstrap', appId);
widgetsets[widgetset].callback(appId);
} else {
log('Setting pending startup', appId);
widgetsets[widgetset].pendingApps.push(appId);
}
return app;
};
window.Vaadin.Flow.getAppIds = function () {
var ids = [];
for (var id in apps) {
if (Object.prototype.hasOwnProperty.call(apps, id)) {
ids.push(id);
}
}
return ids;
};
window.Vaadin.Flow.getApp = function (appId) {
return apps[appId];
};
window.Vaadin.Flow.registerWidgetset = function (widgetset, callback) {
log('Widgetset registered', widgetset);
var ws = widgetsets[widgetset];
if (ws && ws.pendingApps) {
ws.callback = callback;
for (var i = 0; i < ws.pendingApps.length; i++) {
var appId = ws.pendingApps[i];
log('Starting from register widgetset', appId);
callback(appId);
}
ws.pendingApps = null;
}
};
window.Vaadin.Flow.getBrowserDetailsParameters = function () {
var params = {};
/* Screen height and width */
params['v-sh'] = window.screen.height;
params['v-sw'] = window.screen.width;
/* Browser window dimensions */
params['v-wh'] = window.innerHeight;
params['v-ww'] = window.innerWidth;
/* Body element dimensions */
params['v-bh'] = document.body.clientHeight;
params['v-bw'] = document.body.clientWidth;
/* Current time */
var date = new Date();
params['v-curdate'] = date.getTime();
/* Current timezone offset (including DST shift) */
var tzo1 = date.getTimezoneOffset();
/* Compare the current tz offset with the first offset from the end
of the year that differs --- if less that, we are in DST, otherwise
we are in normal time */
var dstDiff = 0;
var rawTzo = tzo1;
for (var m = 12; m > 0; m--) {
date.setUTCMonth(m);
var tzo2 = date.getTimezoneOffset();
if (tzo1 != tzo2) {
dstDiff = tzo1 > tzo2 ? tzo1 - tzo2 : tzo2 - tzo1;
rawTzo = tzo1 > tzo2 ? tzo1 : tzo2;
break;
}
}
/* Time zone offset */
params['v-tzo'] = tzo1;
/* DST difference */
params['v-dstd'] = dstDiff;
/* Time zone offset without DST */
params['v-rtzo'] = rawTzo;
/* DST in effect? */
params['v-dston'] = tzo1 != rawTzo;
/* Time zone id (if available) */
try {
params['v-tzid'] = Intl.DateTimeFormat().resolvedOptions().timeZone;
} catch (err) {
params['v-tzid'] = '';
}
/* Window name */
if (window.name) {
params['v-wn'] = window.name;
}
/* Detect touch device support */
var supportsTouch = false;
try {
document.createEvent('TouchEvent');
supportsTouch = true;
} catch (e) {
/* Chrome and IE10 touch detection */
supportsTouch = 'ontouchstart' in window || typeof navigator.msMaxTouchPoints !== 'undefined';
}
params['v-td'] = supportsTouch;
/* Device Pixel Ratio */
params['v-pr'] = window.devicePixelRatio;
if (navigator.platform) {
params['v-np'] = navigator.platform;
}
/* Stringify each value (they are parsed on the server side) */
Object.keys(params).forEach(function (key) {
var value = params[key];
if (typeof value !== 'undefined') {
params[key] = value.toString();
}
});
return params;
};
}
log('Flow bootstrap loaded');
if (appInitResponse.appConfig.productionMode && typeof window.__gwtStatsEvent != 'function') {
window.Vaadin.Flow.gwtStatsEvents = [];
window.__gwtStatsEvent = function (event) {
window.Vaadin.Flow.gwtStatsEvents.push(event);
return true;
};
}
var config = appInitResponse.appConfig;
var mode = appInitResponse.appConfig.productionMode;
window.Vaadin.Flow.initApplication(config.appId, config);
};
export { init };

View file

@ -0,0 +1 @@
export const init: () => void;

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,14 @@
function disableOnClickListener({currentTarget: button}) {
if (button.hasAttribute('disableOnClick')) {
button.disabled = true;
}
}
window.Vaadin.Flow.button = {
initDisableOnClick: (button) => {
if (!button.__hasDisableOnClickListener) {
button.addEventListener('click', disableOnClickListener);
button.__hasDisableOnClickListener = true;
}
}
}

View file

@ -0,0 +1,284 @@
import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js';
import { timeOut } from '@polymer/polymer/lib/utils/async.js';
import { ComboBoxPlaceholder } from '@vaadin/combo-box/src/vaadin-combo-box-placeholder.js';
(function () {
const tryCatchWrapper = function (callback) {
return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Combo Box');
};
window.Vaadin.Flow.comboBoxConnector = {
initLazy: (comboBox) =>
tryCatchWrapper(function (comboBox) {
// Check whether the connector was already initialized for the ComboBox
if (comboBox.$connector) {
return;
}
comboBox.$connector = {};
// holds pageIndex -> callback pairs of subsequent indexes (current active range)
const pageCallbacks = {};
let cache = {};
let lastFilter = '';
const placeHolder = new window.Vaadin.ComboBoxPlaceholder();
const serverFacade = (() => {
// Private variables
let lastFilterSentToServer = '';
let dataCommunicatorResetNeeded = false;
// Public methods
const needsDataCommunicatorReset = () => (dataCommunicatorResetNeeded = true);
const getLastFilterSentToServer = () => lastFilterSentToServer;
const requestData = (startIndex, endIndex, params) => {
const count = endIndex - startIndex;
const filter = params.filter;
comboBox.$server.setRequestedRange(startIndex, count, filter);
lastFilterSentToServer = filter;
if (dataCommunicatorResetNeeded) {
comboBox.$server.resetDataCommunicator();
dataCommunicatorResetNeeded = false;
}
};
return {
needsDataCommunicatorReset,
getLastFilterSentToServer,
requestData
};
})();
const clearPageCallbacks = (pages = Object.keys(pageCallbacks)) => {
// Flush and empty the existing requests
pages.forEach((page) => {
pageCallbacks[page]([], comboBox.size);
delete pageCallbacks[page];
// Empty the comboBox's internal cache without invoking observers by filling
// the filteredItems array with placeholders (comboBox will request for data when it
// encounters a placeholder)
const pageStart = parseInt(page) * comboBox.pageSize;
const pageEnd = pageStart + comboBox.pageSize;
const end = Math.min(pageEnd, comboBox.filteredItems.length);
for (let i = pageStart; i < end; i++) {
comboBox.filteredItems[i] = placeHolder;
}
});
};
comboBox.dataProvider = function (params, callback) {
if (params.pageSize != comboBox.pageSize) {
throw 'Invalid pageSize';
}
if (comboBox._clientSideFilter) {
// For clientside filter we first make sure we have all data which we also
// filter based on comboBox.filter. While later we only filter clientside data.
if (cache[0]) {
performClientSideFilter(cache[0], params.filter, callback);
return;
} else {
// If client side filter is enabled then we need to first ask all data
// and filter it on client side, otherwise next time when user will
// input another filter, eg. continue to type, the local cache will be only
// what was received for the first filter, which may not be the whole
// data from server (keep in mind that client side filter is enabled only
// when the items count does not exceed one page).
params.filter = '';
}
}
const filterChanged = params.filter !== lastFilter;
if (filterChanged) {
cache = {};
lastFilter = params.filter;
this._filterDebouncer = Debouncer.debounce(this._filterDebouncer, timeOut.after(500), () => {
if (serverFacade.getLastFilterSentToServer() === params.filter) {
// Fixes the case when the filter changes
// to something else and back to the original value
// within debounce timeout, and the
// DataCommunicator thinks it doesn't need to send data
serverFacade.needsDataCommunicatorReset();
}
if (params.filter !== lastFilter) {
throw new Error("Expected params.filter to be '" + lastFilter + "' but was '" + params.filter + "'");
}
// Remove the debouncer before clearing page callbacks.
// This makes sure that they are executed.
this._filterDebouncer = undefined;
// Call the method again after debounce.
clearPageCallbacks();
comboBox.dataProvider(params, callback);
});
return;
}
// Postpone the execution of new callbacks if there is an active debouncer.
// They will be executed when the page callbacks are cleared within the debouncer.
if (this._filterDebouncer) {
pageCallbacks[params.page] = callback;
return;
}
if (cache[params.page]) {
// This may happen after skipping pages by scrolling fast
commitPage(params.page, callback);
} else {
pageCallbacks[params.page] = callback;
const maxRangeCount = Math.max(params.pageSize * 2, 500); // Max item count in active range
const activePages = Object.keys(pageCallbacks).map((page) => parseInt(page));
const rangeMin = Math.min(...activePages);
const rangeMax = Math.max(...activePages);
if (activePages.length * params.pageSize > maxRangeCount) {
if (params.page === rangeMin) {
clearPageCallbacks([String(rangeMax)]);
} else {
clearPageCallbacks([String(rangeMin)]);
}
comboBox.dataProvider(params, callback);
} else if (rangeMax - rangeMin + 1 !== activePages.length) {
// Wasn't a sequential page index, clear the cache so combo-box will request for new pages
clearPageCallbacks();
} else {
// The requested page was sequential, extend the requested range
const startIndex = params.pageSize * rangeMin;
const endIndex = params.pageSize * (rangeMax + 1);
serverFacade.requestData(startIndex, endIndex, params);
}
}
};
comboBox.$connector.clear = tryCatchWrapper((start, length) => {
const firstPageToClear = Math.floor(start / comboBox.pageSize);
const numberOfPagesToClear = Math.ceil(length / comboBox.pageSize);
for (let i = firstPageToClear; i < firstPageToClear + numberOfPagesToClear; i++) {
delete cache[i];
}
});
comboBox.$connector.filter = tryCatchWrapper(function (item, filter) {
filter = filter ? filter.toString().toLowerCase() : '';
return comboBox._getItemLabel(item, comboBox.itemLabelPath).toString().toLowerCase().indexOf(filter) > -1;
});
comboBox.$connector.set = tryCatchWrapper(function (index, items, filter) {
if (filter != serverFacade.getLastFilterSentToServer()) {
return;
}
if (index % comboBox.pageSize != 0) {
throw 'Got new data to index ' + index + ' which is not aligned with the page size of ' + comboBox.pageSize;
}
if (index === 0 && items.length === 0 && pageCallbacks[0]) {
// Makes sure that the dataProvider callback is called even when server
// returns empty data set (no items match the filter).
cache[0] = [];
return;
}
const firstPageToSet = index / comboBox.pageSize;
const updatedPageCount = Math.ceil(items.length / comboBox.pageSize);
for (let i = 0; i < updatedPageCount; i++) {
let page = firstPageToSet + i;
let slice = items.slice(i * comboBox.pageSize, (i + 1) * comboBox.pageSize);
cache[page] = slice;
}
});
comboBox.$connector.updateData = tryCatchWrapper(function (items) {
const itemsMap = new Map(items.map((item) => [item.key, item]));
comboBox.filteredItems = comboBox.filteredItems.map((item) => {
return itemsMap.get(item.key) || item;
});
});
comboBox.$connector.updateSize = tryCatchWrapper(function (newSize) {
if (!comboBox._clientSideFilter) {
// FIXME: It may be that this size set is unnecessary, since when
// providing data to combobox via callback we may use data's size.
// However, if this size reflect the whole data size, including
// data not fetched yet into client side, and combobox expect it
// to be set as such, the at least, we don't need it in case the
// filter is clientSide only, since it'll increase the height of
// the popup at only at first user filter to this size, while the
// filtered items count are less.
comboBox.size = newSize;
}
});
comboBox.$connector.reset = tryCatchWrapper(function () {
clearPageCallbacks();
cache = {};
comboBox.clearCache();
});
comboBox.$connector.confirm = tryCatchWrapper(function (id, filter) {
if (filter != serverFacade.getLastFilterSentToServer()) {
return;
}
// We're done applying changes from this batch, resolve pending
// callbacks
let activePages = Object.getOwnPropertyNames(pageCallbacks);
for (let i = 0; i < activePages.length; i++) {
let page = activePages[i];
if (cache[page]) {
commitPage(page, pageCallbacks[page]);
}
}
// Let server know we're done
comboBox.$server.confirmUpdate(id);
});
const commitPage = tryCatchWrapper(function (page, callback) {
let data = cache[page];
if (comboBox._clientSideFilter) {
performClientSideFilter(data, comboBox.filter, callback);
} else {
// Remove the data if server-side filtering, but keep it for client-side
// filtering
delete cache[page];
// FIXME: It may be that we ought to provide data.length instead of
// comboBox.size and remove updateSize function.
callback(data, comboBox.size);
}
});
// Perform filter on client side (here) using the items from specified page
// and submitting the filtered items to specified callback.
// The filter used is the one from combobox, not the lastFilter stored since
// that may not reflect user's input.
const performClientSideFilter = tryCatchWrapper(function (page, filter, callback) {
let filteredItems = page;
if (filter) {
filteredItems = page.filter((item) => comboBox.$connector.filter(item, filter));
}
callback(filteredItems, filteredItems.length);
});
// Prevent setting the custom value as the 'value'-prop automatically
comboBox.addEventListener(
'custom-value-set',
tryCatchWrapper((e) => e.preventDefault())
);
})(comboBox)
};
})();
window.Vaadin.ComboBoxPlaceholder = ComboBoxPlaceholder;

View file

@ -0,0 +1,142 @@
(function () {
function tryCatchWrapper(callback) {
return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Context Menu');
}
function getContainer(appId, nodeId) {
try {
return window.Vaadin.Flow.clients[appId].getByNodeId(nodeId);
} catch (error) {
console.error('Could not get node %s from app %s', nodeId, appId);
console.error(error);
}
}
/**
* Initializes the connector for a context menu element.
*
* @param {HTMLElement} contextMenu
* @param {string} appId
*/
function initLazy(contextMenu, appId) {
if (contextMenu.$connector) {
return;
}
contextMenu.$connector = {
/**
* Generates and assigns the items to the context menu.
*
* @param {number} nodeId
*/
generateItems: tryCatchWrapper((nodeId) => {
const items = generateItemsTree(appId, nodeId);
contextMenu.items = items;
})
};
}
/**
* Generates an items tree compatible with the context-menu web component
* by traversing the given Flow DOM tree of context menu item nodes
* whose root node is identified by the `nodeId` argument.
*
* The app id is required to access the store of Flow DOM nodes.
*
* @param {string} appId
* @param {number} nodeId
*/
function generateItemsTree(appId, nodeId) {
const container = getContainer(appId, nodeId);
if (!container) {
return;
}
return Array.from(container.children).map((child) => {
const item = {
component: child,
checked: child._checked,
keepOpen: child._keepOpen,
className: child.className,
theme: child.__theme
};
// Do not hardcode tag name to allow `vaadin-menu-bar-item`
if (child._hasVaadinItemMixin && child._containerNodeId) {
item.children = generateItemsTree(appId, child._containerNodeId);
}
child._item = item;
return item;
});
}
/**
* Sets the checked state for a context menu item.
*
* This method is supposed to be called when the context menu item is closed,
* so there is no need for triggering a re-render eagarly.
*
* @param {HTMLElement} component
* @param {boolean} checked
*/
function setChecked(component, checked) {
if (component._item) {
component._item.checked = checked;
// Set the attribute in the connector to show the checkmark
// without having to re-render the whole menu while opened.
if (component._item.keepOpen) {
component.toggleAttribute('menu-item-checked', checked);
}
}
}
/**
* Sets the keep open state for a context menu item.
*
* @param {HTMLElement} component
* @param {boolean} keepOpen
*/
function setKeepOpen(component, keepOpen) {
if (component._item) {
component._item.keepOpen = keepOpen;
}
}
/**
* Sets the theme for a context menu item.
*
* This method is supposed to be called when the context menu item is closed,
* so there is no need for triggering a re-render eagarly.
*
* @param {HTMLElement} component
* @param {string | undefined | null} theme
*/
function setTheme(component, theme) {
if (component._item) {
component._item.theme = theme;
}
}
window.Vaadin.Flow.contextMenuConnector = {
initLazy(...args) {
return tryCatchWrapper(initLazy)(...args);
},
generateItemsTree(...args) {
return tryCatchWrapper(generateItemsTree)(...args);
},
setChecked(...args) {
return tryCatchWrapper(setChecked)(...args);
},
setKeepOpen(...args) {
return tryCatchWrapper(setKeepOpen)(...args);
},
setTheme(...args) {
return tryCatchWrapper(setTheme)(...args);
}
};
})();

View file

@ -0,0 +1,74 @@
import * as Gestures from '@vaadin/component-base/src/gestures.js';
(function () {
function tryCatchWrapper(callback) {
return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Context Menu Target');
}
function init(target) {
if (target.$contextMenuTargetConnector) {
return;
}
target.$contextMenuTargetConnector = {
openOnHandler: tryCatchWrapper(function (e) {
// used by Grid to prevent context menu on selection column click
if (target.preventContextMenu && target.preventContextMenu(e)) {
return;
}
e.preventDefault();
e.stopPropagation();
this.$contextMenuTargetConnector.openEvent = e;
let detail = {};
if (target.getContextMenuBeforeOpenDetail) {
detail = target.getContextMenuBeforeOpenDetail(e);
}
target.dispatchEvent(
new CustomEvent('vaadin-context-menu-before-open', {
detail: detail
})
);
}),
updateOpenOn: tryCatchWrapper(function (eventType) {
this.removeListener();
this.openOnEventType = eventType;
customElements.whenDefined('vaadin-context-menu').then(
tryCatchWrapper(() => {
if (Gestures.gestures[eventType]) {
Gestures.addListener(target, eventType, this.openOnHandler);
} else {
target.addEventListener(eventType, this.openOnHandler);
}
})
);
}),
removeListener: tryCatchWrapper(function () {
if (this.openOnEventType) {
if (Gestures.gestures[this.openOnEventType]) {
Gestures.removeListener(target, this.openOnEventType, this.openOnHandler);
} else {
target.removeEventListener(this.openOnEventType, this.openOnHandler);
}
}
}),
openMenu: tryCatchWrapper(function (contextMenu) {
contextMenu.open(this.openEvent);
}),
removeConnector: tryCatchWrapper(function () {
this.removeListener();
target.$contextMenuTargetConnector = undefined;
})
};
}
window.Vaadin.Flow.contextMenuTargetConnector = {
init(...args) {
return tryCatchWrapper(init)(...args);
}
};
})();

View file

@ -0,0 +1,187 @@
import dateFnsFormat from 'date-fns/format';
import dateFnsParse from 'date-fns/parse';
import dateFnsIsValid from 'date-fns/isValid';
import { extractDateParts, parseDate as _parseDate } from '@vaadin/date-picker/src/vaadin-date-picker-helper.js';
(function () {
const tryCatchWrapper = function (callback) {
return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Date Picker');
};
window.Vaadin.Flow.datepickerConnector = {
initLazy: (datepicker) =>
tryCatchWrapper(function (datepicker) {
// Check whether the connector was already initialized for the datepicker
if (datepicker.$connector) {
return;
}
datepicker.$connector = {};
const createLocaleBasedDateFormat = function (locale) {
try {
// Check whether the locale is supported or not
new Date().toLocaleDateString(locale);
} catch (e) {
console.warn('The locale is not supported, using default format setting (ISO 8601).');
return 'yyyy-MM-dd';
}
// format test date and convert to date-fns pattern
const testDate = new Date(Date.UTC(1234, 4, 6));
let pattern = testDate.toLocaleDateString(locale, { timeZone: 'UTC' });
pattern = pattern
// escape date-fns pattern letters by enclosing them in single quotes
.replace(/([a-zA-Z]+)/g, "'$1'")
// insert date placeholder
.replace('06', 'dd')
.replace('6', 'd')
// insert month placeholder
.replace('05', 'MM')
.replace('5', 'M')
// insert year placeholder
.replace('1234', 'yyyy');
const isValidPattern = pattern.includes('d') && pattern.includes('M') && pattern.includes('y');
if (!isValidPattern) {
console.warn('The locale is not supported, using default format setting (ISO 8601).');
return 'yyyy-MM-dd';
}
return pattern;
};
const createFormatterAndParser = tryCatchWrapper(function (formats) {
if (!formats || formats.length === 0) {
throw new Error('Array of custom date formats is null or empty');
}
function getShortYearFormat(format) {
if (format.includes('yyyy') && !format.includes('yyyyy')) {
return format.replace('yyyy', 'yy');
}
if (format.includes('YYYY') && !format.includes('YYYYY')) {
return format.replace('YYYY', 'YY');
}
return undefined;
}
function isFormatWithYear(format) {
return format.includes('y') || format.includes('Y');
}
function isShortYearFormat(format) {
// Format is long if it includes a four-digit year.
return !format.includes('yyyy') && !format.includes('YYYY');
}
function getExtendedFormats(formats) {
return formats.reduce((acc, format) => {
// We first try to match the date with the shorter version,
// as short years are supported with the long date format.
if (isFormatWithYear(format) && !isShortYearFormat(format)) {
acc.push(getShortYearFormat(format));
}
acc.push(format);
return acc;
}, []);
}
function correctFullYear(date) {
// The last parsed date check handles the case where a four-digit year is parsed, then formatted
// as a two-digit year, and then parsed again. In this case we want to keep the century of the
// originally parsed year, instead of using the century of the reference date.
// Do not apply any correction if the previous parse attempt was failed.
if (datepicker.$connector._lastParseStatus === 'error') {
return;
}
// Update century if the last parsed date is the same except the century.
if (datepicker.$connector._lastParseStatus === 'successful') {
if (
datepicker.$connector._lastParsedDate.day === date.getDate() &&
datepicker.$connector._lastParsedDate.month === date.getMonth() &&
datepicker.$connector._lastParsedDate.year % 100 === date.getFullYear() % 100
) {
date.setFullYear(datepicker.$connector._lastParsedDate.year);
}
return;
}
// Update century if this is the first parse after overlay open.
const currentValue = _parseDate(datepicker.value);
if (
dateFnsIsValid(currentValue) &&
currentValue.getDate() === date.getDate() &&
currentValue.getMonth() === date.getMonth() &&
currentValue.getFullYear() % 100 === date.getFullYear() % 100
) {
date.setFullYear(currentValue.getFullYear());
}
}
function formatDate(dateParts) {
const format = formats[0];
const date = _parseDate(`${dateParts.year}-${dateParts.month + 1}-${dateParts.day}`);
return dateFnsFormat(date, format);
}
function doParseDate(dateString, format, referenceDate) {
// When format does not contain a year, then current year should be used.
const refDate = isFormatWithYear(format) ? referenceDate : new Date();
const date = dateFnsParse(dateString, format, refDate);
if (dateFnsIsValid(date)) {
if (isFormatWithYear(format) && isShortYearFormat(format)) {
correctFullYear(date);
}
return {
day: date.getDate(),
month: date.getMonth(),
year: date.getFullYear()
};
}
}
function parseDate(dateString) {
const referenceDate = _getReferenceDate();
for (let format of getExtendedFormats(formats)) {
const parsedDate = doParseDate(dateString, format, referenceDate);
if (parsedDate) {
datepicker.$connector._lastParseStatus = 'successful';
datepicker.$connector._lastParsedDate = parsedDate;
return parsedDate;
}
}
datepicker.$connector._lastParseStatus = 'error';
return false;
}
return {
formatDate: formatDate,
parseDate: parseDate
};
});
function _getReferenceDate() {
const { referenceDate } = datepicker.i18n;
return referenceDate ? new Date(referenceDate.year, referenceDate.month, referenceDate.day) : new Date();
}
datepicker.$connector.updateI18n = tryCatchWrapper(function (locale, i18n) {
// Either use custom formats specified in I18N, or create format from locale
const hasCustomFormats = i18n && i18n.dateFormats && i18n.dateFormats.length > 0;
if (i18n && i18n.referenceDate) {
i18n.referenceDate = extractDateParts(new Date(i18n.referenceDate));
}
const usedFormats = hasCustomFormats ? i18n.dateFormats : [createLocaleBasedDateFormat(locale)];
const formatterAndParser = createFormatterAndParser(usedFormats);
// Merge current web component I18N settings with new I18N settings and the formatting and parsing functions
datepicker.i18n = Object.assign({}, datepicker.i18n, i18n, formatterAndParser);
});
datepicker.addEventListener('opened-changed', () => (datepicker.$connector._lastParseStatus = undefined));
})(datepicker)
};
})();

View file

@ -0,0 +1,110 @@
window.Vaadin = window.Vaadin || {};
window.Vaadin.Flow = window.Vaadin.Flow || {};
window.Vaadin.Flow.dndConnector = {
__ondragenterListener: function (event) {
// TODO filter by data type
// TODO prevent dropping on itself (by default)
const effect = event.currentTarget['__dropEffect'];
if (!event.currentTarget.hasAttribute('disabled')) {
if (effect) {
event.dataTransfer.dropEffect = effect;
}
if (effect !== 'none') {
/* #7108: if drag moves on top of drop target's children, first another ondragenter event
* is fired and then a ondragleave event. This happens again once the drag
* moves on top of another children, or back on top of the drop target element.
* Thus need to "cancel" the following ondragleave, to not remove class name.
* Drop event will happen even when dropped to a child element. */
if (event.currentTarget.classList.contains('v-drag-over-target')) {
event.currentTarget['__skip-leave'] = true;
} else {
event.currentTarget.classList.add('v-drag-over-target');
}
// enables browser specific pseudo classes (at least FF)
event.preventDefault();
event.stopPropagation(); // don't let parents know
}
}
},
__ondragoverListener: function (event) {
// TODO filter by data type
// TODO filter by effectAllowed != dropEffect due to Safari & IE11 ?
if (!event.currentTarget.hasAttribute('disabled')) {
const effect = event.currentTarget['__dropEffect'];
if (effect) {
event.dataTransfer.dropEffect = effect;
}
// allows the drop && don't let parents know
event.preventDefault();
event.stopPropagation();
}
},
__ondragleaveListener: function (event) {
if (event.currentTarget['__skip-leave']) {
event.currentTarget['__skip-leave'] = false;
} else {
event.currentTarget.classList.remove('v-drag-over-target');
}
// #7109 need to stop or any parent drop target might not get highlighted,
// as ondragenter for it is fired before the child gets dragleave.
event.stopPropagation();
},
__ondropListener: function (event) {
const effect = event.currentTarget['__dropEffect'];
if (effect) {
event.dataTransfer.dropEffect = effect;
}
event.currentTarget.classList.remove('v-drag-over-target');
// prevent browser handling && don't let parents know
event.preventDefault();
event.stopPropagation();
},
updateDropTarget: function (element) {
if (element['__active']) {
element.addEventListener('dragenter', this.__ondragenterListener, false);
element.addEventListener('dragover', this.__ondragoverListener, false);
element.addEventListener('dragleave', this.__ondragleaveListener, false);
element.addEventListener('drop', this.__ondropListener, false);
} else {
element.removeEventListener('dragenter', this.__ondragenterListener, false);
element.removeEventListener('dragover', this.__ondragoverListener, false);
element.removeEventListener('dragleave', this.__ondragleaveListener, false);
element.removeEventListener('drop', this.__ondropListener, false);
element.classList.remove('v-drag-over-target');
}
},
/** DRAG SOURCE METHODS: */
__dragstartListener: function (event) {
event.stopPropagation();
event.dataTransfer.setData('text/plain', '');
if (event.currentTarget.hasAttribute('disabled')) {
event.preventDefault();
} else {
if (event.currentTarget['__effectAllowed']) {
event.dataTransfer.effectAllowed = event.currentTarget['__effectAllowed'];
}
event.currentTarget.classList.add('v-dragged');
}
},
__dragendListener: function (event) {
event.currentTarget.classList.remove('v-dragged');
},
updateDragSource: function (element) {
if (element['draggable']) {
element.addEventListener('dragstart', this.__dragstartListener, false);
element.addEventListener('dragend', this.__dragendListener, false);
} else {
element.removeEventListener('dragstart', this.__dragstartListener, false);
element.removeEventListener('dragend', this.__dragendListener, false);
}
}
};

View file

@ -0,0 +1,67 @@
import { noChange } from 'lit';
import { directive, PartType } from 'lit/directive.js';
import { AsyncDirective } from 'lit/async-directive.js';
class FlowComponentDirective extends AsyncDirective {
constructor(partInfo) {
super(partInfo);
if (partInfo.type !== PartType.CHILD) {
throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`);
}
}
update(part, [appid, nodeid]) {
this.updateContent(part, appid, nodeid);
return noChange;
}
updateContent(part, appid, nodeid) {
const { parentNode, startNode } = part;
const hasNewNodeId = nodeid !== undefined && nodeid !== null;
const newNode = hasNewNodeId ? this.getNewNode(appid, nodeid) : null;
const oldNode = this.getOldNode(part);
clearTimeout(this.__nodeRetryTimeout);
if (hasNewNodeId && !newNode) {
// If the node is not found, try again later.
this.__nodeRetryTimeout = setTimeout(() => this.updateContent(part, appid, nodeid));
} else if (oldNode === newNode) {
return;
} else if (oldNode && newNode) {
parentNode.replaceChild(newNode, oldNode);
} else if (oldNode) {
parentNode.removeChild(oldNode);
} else if (newNode) {
startNode.after(newNode);
}
}
getNewNode(appid, nodeid) {
return window.Vaadin.Flow.clients[appid].getByNodeId(nodeid);
}
getOldNode(part) {
const { startNode, endNode } = part;
if (startNode.nextSibling === endNode) {
return;
}
return startNode.nextSibling;
}
disconnected() {
clearTimeout(this.__nodeRetryTimeout);
}
}
/**
* Renders the given flow component node.
*
* WARNING: This directive is not intended for public use.
*
* @param {string} appid
* @param {number} nodeid
* @private
*/
export const flowComponentDirective = directive(FlowComponentDirective);

View file

@ -0,0 +1,208 @@
import '@polymer/polymer/lib/elements/dom-if.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js';
import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js';
import { idlePeriod } from '@polymer/polymer/lib/utils/async.js';
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
import { flowComponentDirective } from './flow-component-directive.js';
import { render, html as litHtml } from 'lit';
/**
* Returns the requested node in a form suitable for Lit template interpolation.
* @param {string} appid
* @param {number} nodeid
* @returns {any} a Lit directive
*/
function getNode(appid, nodeid) {
return flowComponentDirective(appid, nodeid);
}
/**
* Sets the nodes defined by the given node ids as the child nodes of the
* given root element.
* @param {string} appid
* @param {number[]} nodeIds
* @param {Element} root
*/
function setChildNodes(appid, nodeIds, root) {
render(litHtml`${nodeIds.map(id => flowComponentDirective(appid, id))}`, root);
}
/**
* SimpleElementBindingStrategy::addChildren uses insertBefore to add child
* elements to the container. When the children are manually placed under
* another element, the call to insertBefore can occasionally fail due to
* an invalid reference node.
*
* This is a temporary workaround which patches the container's native API
* to not fail when called with invalid arguments.
*/
function patchVirtualContainer(container) {
const originalInsertBefore = container.insertBefore;
container.insertBefore = function (newNode, referenceNode) {
if (referenceNode && referenceNode.parentNode === this) {
return originalInsertBefore.call(this, newNode, referenceNode);
} else {
return originalInsertBefore.call(this, newNode, null);
}
};
}
window.Vaadin ||= {};
window.Vaadin.FlowComponentHost ||= { patchVirtualContainer, getNode, setChildNodes };
class FlowComponentRenderer extends PolymerElement {
static get template() {
return html`
<style>
:host {
animation: 1ms flow-component-renderer-appear;
}
@keyframes flow-component-renderer-appear {
to {
opacity: 1;
}
}
</style>
<slot></slot>
`;
}
static get is() {
return 'flow-component-renderer';
}
static get properties() {
return {
nodeid: Number,
appid: String,
};
}
static get observers() {
return ['_attachRenderedComponentIfAble(appid, nodeid)'];
}
ready() {
super.ready();
this.addEventListener('click', function (event) {
if (
this.firstChild &&
typeof this.firstChild.click === 'function' &&
event.target === this
) {
event.stopPropagation();
this.firstChild.click();
}
});
this.addEventListener('animationend', this._onAnimationEnd);
}
_asyncAttachRenderedComponentIfAble() {
this._debouncer = Debouncer.debounce(this._debouncer, idlePeriod, () =>
this._attachRenderedComponentIfAble()
);
}
_attachRenderedComponentIfAble() {
if (this.appid == null) {
return;
}
if (this.nodeid == null) {
if (this.firstChild) {
this.removeChild(this.firstChild);
}
return;
}
const renderedComponent = this._getRenderedComponent();
if (this.firstChild) {
if (!renderedComponent) {
this._asyncAttachRenderedComponentIfAble();
} else if (this.firstChild !== renderedComponent) {
this.replaceChild(renderedComponent, this.firstChild);
this._defineFocusTarget();
this.onComponentRendered();
} else {
this._defineFocusTarget();
this.onComponentRendered();
}
} else {
if (renderedComponent) {
this.appendChild(renderedComponent);
this._defineFocusTarget();
this.onComponentRendered();
} else {
this._asyncAttachRenderedComponentIfAble();
}
}
}
_getRenderedComponent() {
try {
return window.Vaadin.Flow.clients[this.appid].getByNodeId(this.nodeid);
} catch (error) {
console.error(
'Could not get node %s from app %s',
this.nodeid,
this.appid
);
console.error(error);
}
return null;
}
onComponentRendered() {
// subclasses can override this method to execute custom logic on resize
}
/* Setting the `focus-target` attribute to the first focusable descendant
starting from the firstChild necessary for the focus to be delegated
within the flow-component-renderer when used inside a vaadin-grid cell */
_defineFocusTarget() {
var focusable = this._getFirstFocusableDescendant(this.firstChild);
if (focusable !== null) {
focusable.setAttribute('focus-target', 'true');
}
}
_getFirstFocusableDescendant(node) {
if (this._isFocusable(node)) {
return node;
}
if (node.hasAttribute && (node.hasAttribute('disabled') || node.hasAttribute('hidden'))) {
return null;
}
if (!node.children) {
return null;
}
for (var i = 0; i < node.children.length; i++) {
var focusable = this._getFirstFocusableDescendant(node.children[i]);
if (focusable !== null) {
return focusable;
}
}
return null;
}
_isFocusable(node) {
if (
node.hasAttribute &&
typeof node.hasAttribute === 'function' &&
(node.hasAttribute('disabled') || node.hasAttribute('hidden'))
) {
return false;
}
return node.tabIndex === 0;
}
_onAnimationEnd(e) {
// ShadyCSS applies scoping suffixes to animation names
// To ensure that child is attached once element is unhidden
// for when it was filtered out from, eg, ComboBox
// https://github.com/vaadin/vaadin-flow-components/issues/437
if (e.animationName.indexOf('flow-component-renderer-appear') === 0) {
this._attachRenderedComponentIfAble();
}
}
}
window.customElements.define(FlowComponentRenderer.is, FlowComponentRenderer);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
export * from './Flow';

View file

@ -0,0 +1,2 @@
export * from './Flow';
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/frontend/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './Flow';\n"]}

View file

@ -0,0 +1,110 @@
/* eslint-disable no-restricted-syntax */
/* eslint-disable max-params */
import { html, render } from 'lit';
type RenderRoot = HTMLElement & { __litRenderer?: Renderer; _$litPart$?: any };
type ItemModel = { item: any; index: number };
type Renderer = ((root: RenderRoot, rendererOwner: HTMLElement, model: ItemModel) => void) & { __rendererId?: string };
type Component = HTMLElement & { [key: string]: Renderer | undefined };
const _window = window as any;
_window.Vaadin = _window.Vaadin || {};
/**
* Assigns the component a renderer function which uses Lit to render
* the given template expression inside the render root element.
*
* @param component The host component to which the renderer runction is to be set
* @param rendererName The name of the renderer function
* @param templateExpression The content of the template literal passed to Lit for rendering.
* @param returnChannel A channel to the server.
* Calling it will end up invoking a handler in the server-side LitRenderer.
* @param clientCallables A list of function names that can be called from within the template literal.
* @param propertyNamespace LitRenderer-specific namespace for properties.
* Needed to avoid property name collisions between renderers.
*/
_window.Vaadin.setLitRenderer = (
component: Component,
rendererName: string,
templateExpression: string,
returnChannel: (name: string, itemKey: string, args: any[]) => void,
clientCallables: string[],
propertyNamespace: string,
) => {
// Dynamically created function that renders the templateExpression
// inside the given root element using Lit
const renderFunction = Function(`
"use strict";
const [render, html, returnChannel] = arguments;
return (root, model, itemKey) => {
const { item, index } = model;
${clientCallables
.map((clientCallable) => {
// Map all the client-callables as inline functions so they can be accessed from the template literal
return `
const ${clientCallable} = (...args) => {
if (itemKey !== undefined) {
returnChannel('${clientCallable}', itemKey, args[0] instanceof Event ? [] : [...args]);
}
}`;
})
.join('')}
render(html\`${templateExpression}\`, root)
}
`)(render, html, returnChannel);
const renderer: Renderer = (root, _, model) => {
const { item } = model;
// Clean up the root element of any existing content
// (and Lit's _$litPart$ property) from other renderers
// TODO: Remove once https://github.com/vaadin/web-components/issues/2235 is done
if (root.__litRenderer !== renderer) {
root.innerHTML = '';
delete root._$litPart$;
root.__litRenderer = renderer;
}
// Map a new item that only includes the properties defined by
// this specific LitRenderer instance. The renderer instance specific
// "propertyNamespace" prefix is stripped from the property name at this point:
//
// item: { key: "2", lr_3_lastName: "Tyler"}
// ->
// mappedItem: { lastName: "Tyler" }
const mappedItem: { [key: string]: any } = {};
for (const key in item) {
if (key.startsWith(propertyNamespace)) {
mappedItem[key.replace(propertyNamespace, '')] = item[key];
}
}
renderFunction(root, { ...model, item: mappedItem }, item.key);
};
renderer.__rendererId = propertyNamespace;
component[rendererName] = renderer;
};
/**
* Removes the renderer function with the given name from the component
* if the propertyNamespace matches the renderer's id.
*
* @param component The host component whose renderer function is to be removed
* @param rendererName The name of the renderer function
* @param rendererId The rendererId of the function to be removed
*/
_window.Vaadin.unsetLitRenderer = (component: Component, rendererName: string, rendererId: string) => {
// The check for __rendererId property is necessary since the renderer function
// may get overridden by another renderer, for example, by one coming from
// vaadin-template-renderer. We don't want LitRenderer registration cleanup to
// unintentionally remove the new renderer.
if (component[rendererName]?.__rendererId === rendererId) {
component[rendererName] = undefined;
}
};

View file

@ -0,0 +1,135 @@
/*
* Copyright 2000-2023 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
import './contextMenuConnector.js';
(function () {
const tryCatchWrapper = function (callback) {
return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Menu Bar');
};
/**
* Initializes the connector for a menu bar element.
*
* @param {HTMLElement} menubar
* @param {string} appId
*/
function initLazy(menubar, appId) {
if (menubar.$connector) {
return;
}
const observer = new MutationObserver((records) => {
const hasChangedAttributes = records.some((entry) => {
const oldValue = entry.oldValue;
const newValue = entry.target.getAttribute(entry.attributeName);
return oldValue !== newValue;
});
if (hasChangedAttributes) {
menubar.$connector.generateItems();
}
});
menubar.$connector = {
/**
* Generates and assigns the items to the menu bar.
*
* When the method is called without providing a node id,
* the previously generated items tree will be used.
* That can be useful if you only want to sync the disabled and hidden properties of root items.
*
* @param {number | undefined} nodeId
*/
generateItems: tryCatchWrapper((nodeId) => {
if (!menubar.shadowRoot) {
// workaround for https://github.com/vaadin/flow/issues/5722
setTimeout(() => menubar.$connector.generateItems(nodeId));
return;
}
if (!menubar._container) {
// Menu-bar defers first buttons render to avoid re-layout
// See https://github.com/vaadin/web-components/issues/7271
queueMicrotask(() => menubar.$connector.generateItems(nodeId));
return;
}
if (nodeId) {
menubar.__generatedItems = window.Vaadin.Flow.contextMenuConnector.generateItemsTree(appId, nodeId);
}
let items = menubar.__generatedItems || [];
items.forEach((item) => {
// Propagate disabled state from items to parent buttons
item.disabled = item.component.disabled;
// Saving item to component because `_item` can be reassigned to a new value
// when the component goes to the overflow menu
item.component._rootItem = item;
});
// Observe for hidden and disabled attributes in case they are changed by Flow.
// When a change occurs, the observer will re-generate items on top of the existing tree
// to sync the new attribute values with the corresponding properties in the items array.
items.forEach((item) => {
observer.observe(item.component, {
attributeFilter: ['hidden', 'disabled'],
attributeOldValue: true
});
});
// Remove hidden items entirely from the array. Just hiding them
// could cause the overflow button to be rendered without items.
//
// The items-prop needs to be set even when all items are visible
// to update the disabled state and re-render buttons.
items = items.filter((item) => !item.component.hidden);
menubar.items = items;
// Propagate click events from the menu buttons to the item components
menubar._buttons.forEach((button) => {
if (button.item && button.item.component) {
button.addEventListener('click', (e) => {
if (e.composedPath().indexOf(button.item.component) === -1) {
button.item.component.click();
e.stopPropagation();
}
});
}
});
})
};
}
function setClassName(component) {
const item = component._rootItem || component._item;
if (item) {
item.className = component.className;
}
}
window.Vaadin.Flow.menubarConnector = {
initLazy(...args) {
return tryCatchWrapper(initLazy)(...args);
},
setClassName(...args) {
return tryCatchWrapper(setClassName)(...args);
}
};
})();

View file

@ -0,0 +1,41 @@
/*
* Copyright 2000-2023 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
(function () {
const tryCatchWrapper = function (callback) {
return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Message List');
};
window.Vaadin.Flow.messageListConnector = {
setItems: (list, items, locale) =>
tryCatchWrapper(function (list, items, locale) {
const formatter = new Intl.DateTimeFormat(locale, {
year: 'numeric',
month: 'short',
day: 'numeric',
hour: 'numeric',
minute: 'numeric'
});
list.items = items.map((item) =>
item.time
? Object.assign(item, {
time: formatter.format(new Date(item.time))
})
: item
);
})(list, items, locale)
};
})();

View file

@ -0,0 +1,36 @@
(function () {
const tryCatchWrapper = function (callback) {
return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Select');
};
window.Vaadin.Flow.selectConnector = {
initLazy: (select) =>
tryCatchWrapper(function (select) {
const _findListBoxElement = tryCatchWrapper(function () {
for (let i = 0; i < select.childElementCount; i++) {
const child = select.children[i];
if ('VAADIN-SELECT-LIST-BOX' === child.tagName.toUpperCase()) {
return child;
}
}
});
// do not init this connector twice for the given select
if (select.$connector) {
return;
}
select.$connector = {};
select.renderer = tryCatchWrapper(function (root) {
const listBox = _findListBoxElement();
if (listBox) {
if (root.firstChild) {
root.removeChild(root.firstChild);
}
root.appendChild(listBox);
}
});
})(select)
};
})();

View file

@ -0,0 +1,150 @@
import stripCssComments from 'strip-css-comments';
// Safari 15 - 16.3, polyfilled
const polyfilledSafari = CSSStyleSheet.toString().includes('document.createElement');
const createLinkReferences = (css, target) => {
// Unresolved urls are written as '@import url(text);' or '@import "text";' to the css
// media query can be present on @media tag or on @import directive after url
// Note that with Vite production build there is no space between @import and "text"
// [0] is the full match
// [1] matches the media query
// [2] matches the url
// [3] matches the quote char surrounding in '@import "..."'
// [4] matches the url in '@import "..."'
// [5] matches media query on @import statement
const importMatcher =
/(?:@media\s(.+?))?(?:\s{)?\@import\s*(?:url\(\s*['"]?(.+?)['"]?\s*\)|(["'])((?:\\.|[^\\])*?)\3)([^;]*);(?:})?/g;
// Only cleanup if comment exist
if (/\/\*(.|[\r\n])*?\*\//gm.exec(css) != null) {
// clean up comments
css = stripCssComments(css);
}
var match;
var styleCss = css;
// For each external url import add a link reference
while ((match = importMatcher.exec(css)) !== null) {
styleCss = styleCss.replace(match[0], '');
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = match[2] || match[4];
const media = match[1] || match[5];
if (media) {
link.media = media;
}
// For target document append to head else append to target
if (target === document) {
document.head.appendChild(link);
} else {
target.appendChild(link);
}
}
return styleCss;
};
const addAdoptedStyleSafariPolyfill = (sheet, target, first) => {
if (first) {
target.adoptedStyleSheets = [sheet, ...target.adoptedStyleSheets];
} else {
target.adoptedStyleSheets = [...target.adoptedStyleSheets, sheet];
}
return () => {
target.adoptedStyleSheets = target.adoptedStyleSheets.filter((ss) => ss !== sheet);
};
};
const addAdoptedStyle = (cssText, target, first) => {
const sheet = new CSSStyleSheet();
sheet.replaceSync(cssText);
if (polyfilledSafari) {
return addAdoptedStyleSafariPolyfill(sheet, target, first);
}
if (first) {
target.adoptedStyleSheets.splice(0, 0, sheet);
} else {
target.adoptedStyleSheets.push(sheet);
}
return () => {
target.adoptedStyleSheets.splice(target.adoptedStyleSheets.indexOf(sheet), 1);
};
};
const addStyleTag = (cssText, referenceComment) => {
const styleTag = document.createElement('style');
styleTag.type = 'text/css';
styleTag.textContent = cssText;
let beforeThis = undefined;
if (referenceComment) {
const comments = Array.from(document.head.childNodes).filter(elem => elem.nodeType === Node.COMMENT_NODE);
const container = comments.find(comment => comment.data.trim() === referenceComment);
if (container) {
beforeThis = container;
}
}
document.head.insertBefore(styleTag, beforeThis);
return () => {
styleTag.remove();
};
};
// target: Document | ShadowRoot
export const injectGlobalCss = (css, referenceComment, target, first) => {
if (target === document) {
const hash = getHash(css);
if (window.Vaadin.theme.injectedGlobalCss.indexOf(hash) !== -1) {
return;
}
window.Vaadin.theme.injectedGlobalCss.push(hash);
}
const cssText = createLinkReferences(css, target);
// We avoid mixing style tags and adoptedStyleSheets to make override order clear
if (target === document) {
return addStyleTag(cssText, referenceComment);
}
return addAdoptedStyle(cssText, target, first);
};
window.Vaadin = window.Vaadin || {};
window.Vaadin.theme = window.Vaadin.theme || {};
window.Vaadin.theme.injectedGlobalCss = [];
/**
* Calculate a 32 bit FNV-1a hash
* Found here: https://gist.github.com/vaiorabbit/5657561
* Ref.: http://isthe.com/chongo/tech/comp/fnv/
*
* @param {string} str the input value
* @returns {string} 32 bit (as 8 byte hex string)
*/
function hashFnv32a(str) {
/*jshint bitwise:false */
let i,
l,
hval = 0x811c9dc5;
for (i = 0, l = str.length; i < l; i++) {
hval ^= str.charCodeAt(i);
hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24);
}
// Convert to 8 digit hex string
return ('0000000' + (hval >>> 0).toString(16)).substr(-8);
}
/**
* Calculate a 64 bit hash for the given input.
* Double hash is used to significantly lower the collision probability.
*
* @param {string} input value to get hash for
* @returns {string} 64 bit (as 16 byte hex string)
*/
function getHash(input) {
let h1 = hashFnv32a(input); // returns 32 bit (as 8 byte hex string)
return h1 + hashFnv32a(h1 + input);
}

View file

@ -0,0 +1,23 @@
import { Tooltip } from '@vaadin/tooltip/src/vaadin-tooltip.js';
const _window = window as any;
_window.Vaadin ||= {};
_window.Vaadin.Flow ||= {};
_window.Vaadin.Flow.tooltip ||= {};
Object.assign(_window.Vaadin.Flow.tooltip, {
setDefaultHideDelay: (hideDelay: number) => Tooltip.setDefaultHideDelay(hideDelay),
setDefaultFocusDelay: (focusDelay: number) => Tooltip.setDefaultFocusDelay(focusDelay),
setDefaultHoverDelay: (hoverDelay: number) => Tooltip.setDefaultHoverDelay(hoverDelay)
});
const { defaultHideDelay, defaultFocusDelay, defaultHoverDelay } = _window.Vaadin.Flow.tooltip;
if (defaultHideDelay) {
Tooltip.setDefaultHideDelay(defaultHideDelay);
}
if (defaultFocusDelay) {
Tooltip.setDefaultFocusDelay(defaultFocusDelay);
}
if (defaultHoverDelay) {
Tooltip.setDefaultHoverDelay(defaultHoverDelay);
}

View file

@ -0,0 +1,71 @@
/*
* Copyright 2000-2023 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
(function () {
let memoizedTemplate;
customElements.whenDefined('vaadin-text-field').then(() => {
class BigDecimalFieldElement extends customElements.get('vaadin-text-field') {
static get template() {
if (!memoizedTemplate) {
memoizedTemplate = super.template.cloneNode(true);
memoizedTemplate.innerHTML += `<style>
:host {
width: 8em;
}
:host([dir="rtl"]) [part="input-field"] {
direction: ltr;
}
:host([dir="rtl"]) [part="input-field"] ::slotted(input) {
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em) !important;
}
</style>`;
}
return memoizedTemplate;
}
static get is() {
return 'vaadin-big-decimal-field';
}
static get properties() {
return {
_decimalSeparator: {
type: String,
value: '.',
observer: '__decimalSeparatorChanged'
}
};
}
ready() {
super.ready();
this.inputElement.setAttribute('inputmode', 'decimal');
}
__decimalSeparatorChanged(separator, oldSeparator) {
this.allowedCharPattern = '[-+\\d' + separator + ']';
if (this.value && oldSeparator) {
this.value = this.value.split(oldSeparator).join(separator);
}
}
}
customElements.define(BigDecimalFieldElement.is, BigDecimalFieldElement);
});
})();

View file

@ -0,0 +1,16 @@
import { ServerMessage } from "./vaadin-dev-tools";
export interface Product {
name: string;
version: string;
}
export interface ProductAndMessage {
message: string;
messageHtml?: string;
product: Product;
}
export declare const findAll: (element: Element | ShadowRoot | Document, tags: string[]) => Element[];
export declare const licenseCheckOk: (data: Product) => void;
export declare const licenseCheckFailed: (data: ProductAndMessage) => void;
export declare const licenseCheckNoKey: (data: ProductAndMessage) => void;
export declare const handleLicenseMessage: (message: ServerMessage) => boolean;
export declare const licenseInit: () => void;

View file

@ -0,0 +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};

View file

@ -0,0 +1,3 @@
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
accordion please pick <code>vaadin-accordion</code> instead.`,notAccessibleDescription:e`If you wish to style all panel headings of current accordion please pick
<code>vaadin-accordion</code> 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};

View file

@ -0,0 +1,3 @@
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
<code>vaadin-accordion</code> instead.`,notAccessibleDescription:e`If you wish to style all panels of current accordion please pick
<code>vaadin-accordion</code> instead.`,elements:[{selector:"vaadin-accordion-panel",displayName:"Panel",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{l as default};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +1,3 @@
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
<code>vaadin-board</code> instead.`,notAccessibleDescription:r`If you wish to style all rows of current board please pick
<code>vaadin-board</code> 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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +1,3 @@
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
pick <code>vaadin-side-nav</code> instead.`,notAccessibleDescription:t`If you wish to style all items of current SideNav component please pick
<code>vaadin-side-nav</code> 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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +1,2 @@
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
<code>vaadin-tabs</code> instead.`,notAccessibleDescription:a`If you wish to style all tabs please pick <code>vaadin-tabs</code> 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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +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};

View file

@ -0,0 +1,35 @@
import { LitElement, PropertyValues, TemplateResult } from 'lit';
import { ComponentReference } from './component-util.js';
import './shim.js';
import { Shim } from './shim.js';
export interface PickerOptions {
infoTemplate: TemplateResult;
pickCallback: (component: ComponentReference) => void;
}
export type PickerProvider = () => ComponentPicker;
/**
* When active, shows a component picker that allows the user to select an element with a server side counterpart.
*/
export declare class ComponentPicker extends LitElement {
active: boolean;
options?: PickerOptions;
components: ComponentReference[];
selected: number;
highlighted?: HTMLElement;
overlayElement: HTMLElement;
shim: Shim;
static styles: import("lit").CSSResult[];
constructor();
connectedCallback(): void;
disconnectedCallback(): void;
render(): TemplateResult<1> | null;
open(options: PickerOptions): void;
close(): void;
update(changedProperties: PropertyValues): void;
mouseMoveEvent(e: MouseEvent): void;
shimKeydown(e: CustomEvent): void;
shimMove(e: CustomEvent): void;
shimClick(_e: CustomEvent): void;
pickSelectedComponent(): void;
highlight(componentRef: ComponentReference | undefined): void;
}

View file

@ -0,0 +1,9 @@
export type ComponentReference = {
nodeId: number;
uiId: number;
element?: HTMLElement;
highlightElement?: HTMLElement;
};
export declare function getComponents(element: HTMLElement): ComponentReference[];
export declare function getComponent(element: HTMLElement): ComponentReference;
export declare function deepContains(container: HTMLElement, node: Node): boolean;

View file

@ -0,0 +1,15 @@
export declare enum ConnectionStatus {
ACTIVE = "active",
INACTIVE = "inactive",
UNAVAILABLE = "unavailable",
ERROR = "error"
}
export declare abstract class Connection {
static HEARTBEAT_INTERVAL: number;
status: ConnectionStatus;
onHandshake(): void;
onConnectionError(_: string): void;
onStatusChange(_: ConnectionStatus): void;
setActive(yes: boolean): void;
setStatus(status: ConnectionStatus): void;
}

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