From 3f7c410ccd13377669af6fd3ae3bc3c1502064f2 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 09:41:17 +0300 Subject: [PATCH 01/12] feat: add dashboard packages --- vaadin-dashboard-flow-parent/LICENSE | 202 ++++++++++++++++++ vaadin-dashboard-flow-parent/README.md | 20 ++ vaadin-dashboard-flow-parent/pom.xml | 17 ++ .../vaadin-dashboard-flow/pom.xml | 99 +++++++++ .../flow/component/dashboard/Dashboard.java | 30 +++ .../component/dashboard/DashboardWidget.java | 30 +++ .../tests/DashboardSerializableTest.java | 21 ++ .../dashboard/tests/DashboardTest.java | 19 ++ .../dashboard/tests/DashboardWidgetTest.java | 19 ++ 9 files changed, 457 insertions(+) create mode 100644 vaadin-dashboard-flow-parent/LICENSE create mode 100644 vaadin-dashboard-flow-parent/README.md create mode 100644 vaadin-dashboard-flow-parent/pom.xml create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow/pom.xml create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardSerializableTest.java create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardTest.java create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardWidgetTest.java diff --git a/vaadin-dashboard-flow-parent/LICENSE b/vaadin-dashboard-flow-parent/LICENSE new file mode 100644 index 00000000000..ee8485aeeb1 --- /dev/null +++ b/vaadin-dashboard-flow-parent/LICENSE @@ -0,0 +1,202 @@ + + 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 2000-2024 Vaadin Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vaadin-dashboard-flow-parent/README.md b/vaadin-dashboard-flow-parent/README.md new file mode 100644 index 00000000000..2b941eaee88 --- /dev/null +++ b/vaadin-dashboard-flow-parent/README.md @@ -0,0 +1,20 @@ +# Dashboard component for Vaadin Flow + +This project is the Component wrapper implementation of [``](https://github.com/vaadin/web-components/tree/main/packages/dashboard) +element for use from the server side with [Vaadin Flow](https://github.com/vaadin/flow). + +## Using the component in a Flow application + +To use the component in an application using maven, +add the following dependency to your `pom.xml`: +``` + + com.vaadin + vaadin-dashboard-flow + ${component.version} + +``` + +## License + +Apache License 2.0 diff --git a/vaadin-dashboard-flow-parent/pom.xml b/vaadin-dashboard-flow-parent/pom.xml new file mode 100644 index 00000000000..45d666a95ff --- /dev/null +++ b/vaadin-dashboard-flow-parent/pom.xml @@ -0,0 +1,17 @@ + + + 4.0.0 + + com.vaadin + vaadin-flow-components + 24.5-SNAPSHOT + + vaadin-dashboard-flow-parent + pom + Vaadin Dashboard Parent + Vaadin Dashboard Parent + + vaadin-dashboard-flow + + + diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/pom.xml b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/pom.xml new file mode 100644 index 00000000000..3c9778e08dc --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/pom.xml @@ -0,0 +1,99 @@ + + + 4.0.0 + + com.vaadin + vaadin-dashboard-flow-parent + 24.5-SNAPSHOT + + vaadin-dashboard-flow + jar + Vaadin Dashboard + Vaadin Dashboard + + + com.vaadin + vaadin-flow-components-base + ${project.version} + + + jakarta.servlet + jakarta.servlet-api + + + com.vaadin + flow-server + provided + + + junit + junit + test + + + org.mockito + mockito-core + test + + + com.vaadin + flow-test-generic + test + + + org.slf4j + slf4j-simple + test + + + jakarta.platform + jakarta.jakartaee-web-api + test + + + + + + biz.aQute.bnd + bnd-maven-plugin + + + org.apache.maven.plugins + maven-jar-plugin + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + + + attach-docs + + + with-docs + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + org.codehaus.mojo + build-helper-maven-plugin + + + + + + diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java new file mode 100644 index 00000000000..553732657a1 --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java @@ -0,0 +1,30 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.dashboard; + +import com.vaadin.flow.component.Component; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.JsModule; +import com.vaadin.flow.component.dependency.NpmPackage; + +/** + * @author Vaadin Ltd + */ +@Tag("vaadin-dashboard") +@JsModule("@vaadin/dashboard/src/vaadin-dashboard-widget.js") +@NpmPackage(value = "@vaadin/avatar", version = "24.5.0-alpha8") +public class Dashboard extends Component { +} diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java new file mode 100644 index 00000000000..2b36b6f10bd --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java @@ -0,0 +1,30 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.dashboard; + +import com.vaadin.flow.component.Component; +import com.vaadin.flow.component.Tag; +import com.vaadin.flow.component.dependency.JsModule; +import com.vaadin.flow.component.dependency.NpmPackage; + +/** + * @author Vaadin Ltd + */ +@Tag("vaadin-dashboard-widget") +@JsModule("@vaadin/dashboard/src/vaadin-dashboard.js") +@NpmPackage(value = "@vaadin/dashboard-widget", version = "24.5.0-alpha8") +public class DashboardWidget extends Component { +} diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardSerializableTest.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardSerializableTest.java new file mode 100644 index 00000000000..cecb3576e3c --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardSerializableTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.dashboard.tests; + +import com.vaadin.flow.testutil.ClassesSerializableTest; + +public class DashboardSerializableTest extends ClassesSerializableTest { +} diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardTest.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardTest.java new file mode 100644 index 00000000000..408330d07f5 --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardTest.java @@ -0,0 +1,19 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.dashboard.tests; + +public class DashboardTest { +} diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardWidgetTest.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardWidgetTest.java new file mode 100644 index 00000000000..ce716612e04 --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardWidgetTest.java @@ -0,0 +1,19 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.component.dashboard.tests; + +public class DashboardWidgetTest { +} From 2edaf8cf123989edaf63f4e436e7cde334bf80d9 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 11:54:10 +0300 Subject: [PATCH 02/12] chore: use correct license --- vaadin-dashboard-flow-parent/LICENSE | 205 +------------------------ vaadin-dashboard-flow-parent/README.md | 4 +- 2 files changed, 6 insertions(+), 203 deletions(-) diff --git a/vaadin-dashboard-flow-parent/LICENSE b/vaadin-dashboard-flow-parent/LICENSE index ee8485aeeb1..bb61b7d20cd 100644 --- a/vaadin-dashboard-flow-parent/LICENSE +++ b/vaadin-dashboard-flow-parent/LICENSE @@ -1,202 +1,3 @@ - - 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 2000-2024 Vaadin Ltd. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +This program is available under Vaadin Commercial License and Service Terms. +See https://vaadin.com/commercial-license-and-service-terms for the full +license. diff --git a/vaadin-dashboard-flow-parent/README.md b/vaadin-dashboard-flow-parent/README.md index 2b941eaee88..c50b30cacc9 100644 --- a/vaadin-dashboard-flow-parent/README.md +++ b/vaadin-dashboard-flow-parent/README.md @@ -17,4 +17,6 @@ add the following dependency to your `pom.xml`: ## License -Apache License 2.0 +This component is distributed under [Vaadin Commercial License and Service Terms](https://vaadin.com/commercial-license-and-service-terms). + +To purchase a license, visit http://vaadin.com/pricing From 4efddf52f5a7547d2a7995a881f0a5e59a3f390a Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 11:54:41 +0300 Subject: [PATCH 03/12] refactor: comment out npm package temporarily --- .../main/java/com/vaadin/flow/component/dashboard/Dashboard.java | 1 + .../com/vaadin/flow/component/dashboard/DashboardWidget.java | 1 + 2 files changed, 2 insertions(+) diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java index 553732657a1..1ea4d6a1394 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java @@ -26,5 +26,6 @@ @Tag("vaadin-dashboard") @JsModule("@vaadin/dashboard/src/vaadin-dashboard-widget.js") @NpmPackage(value = "@vaadin/avatar", version = "24.5.0-alpha8") +// @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") public class Dashboard extends Component { } diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java index 2b36b6f10bd..93917d6ee1e 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java @@ -26,5 +26,6 @@ @Tag("vaadin-dashboard-widget") @JsModule("@vaadin/dashboard/src/vaadin-dashboard.js") @NpmPackage(value = "@vaadin/dashboard-widget", version = "24.5.0-alpha8") +// @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") public class DashboardWidget extends Component { } From 5c9bd4197ba94b3b90fb27d95023ad3bdd78da36 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 11:55:14 +0300 Subject: [PATCH 04/12] refactor: add polymer legacy adapter --- .../java/com/vaadin/flow/component/dashboard/Dashboard.java | 2 ++ .../com/vaadin/flow/component/dashboard/DashboardWidget.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java index 1ea4d6a1394..542242e2dab 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java @@ -26,6 +26,8 @@ @Tag("vaadin-dashboard") @JsModule("@vaadin/dashboard/src/vaadin-dashboard-widget.js") @NpmPackage(value = "@vaadin/avatar", version = "24.5.0-alpha8") +@NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.6.0-alpha0") +@JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") // @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") public class Dashboard extends Component { } diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java index 93917d6ee1e..bbe7cf40378 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java @@ -26,6 +26,8 @@ @Tag("vaadin-dashboard-widget") @JsModule("@vaadin/dashboard/src/vaadin-dashboard.js") @NpmPackage(value = "@vaadin/dashboard-widget", version = "24.5.0-alpha8") +@NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.6.0-alpha0") +@JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") // @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") public class DashboardWidget extends Component { } From 3e133d93357ecb4205d8c98dda3b9e1ee1e97920 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 11:55:41 +0300 Subject: [PATCH 05/12] chore: remove incorrect npm package --- .../main/java/com/vaadin/flow/component/dashboard/Dashboard.java | 1 - .../com/vaadin/flow/component/dashboard/DashboardWidget.java | 1 - 2 files changed, 2 deletions(-) diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java index 542242e2dab..d3404b7db0f 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java @@ -25,7 +25,6 @@ */ @Tag("vaadin-dashboard") @JsModule("@vaadin/dashboard/src/vaadin-dashboard-widget.js") -@NpmPackage(value = "@vaadin/avatar", version = "24.5.0-alpha8") @NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.6.0-alpha0") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") // @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java index bbe7cf40378..7ce44ee9427 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java @@ -25,7 +25,6 @@ */ @Tag("vaadin-dashboard-widget") @JsModule("@vaadin/dashboard/src/vaadin-dashboard.js") -@NpmPackage(value = "@vaadin/dashboard-widget", version = "24.5.0-alpha8") @NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.6.0-alpha0") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") // @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") From 4f0733e52552d7e5f5a78c501387427771fcae84 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 11:56:19 +0300 Subject: [PATCH 06/12] fix: correct the inverted module names --- .../java/com/vaadin/flow/component/dashboard/Dashboard.java | 2 +- .../com/vaadin/flow/component/dashboard/DashboardWidget.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java index d3404b7db0f..0bc9baae76c 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java @@ -24,9 +24,9 @@ * @author Vaadin Ltd */ @Tag("vaadin-dashboard") -@JsModule("@vaadin/dashboard/src/vaadin-dashboard-widget.js") @NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.6.0-alpha0") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") +@JsModule("@vaadin/dashboard/src/vaadin-dashboard.js") // @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") public class Dashboard extends Component { } diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java index 7ce44ee9427..bc749172ab6 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java @@ -24,9 +24,9 @@ * @author Vaadin Ltd */ @Tag("vaadin-dashboard-widget") -@JsModule("@vaadin/dashboard/src/vaadin-dashboard.js") @NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.6.0-alpha0") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") +@JsModule("@vaadin/dashboard/src/vaadin-dashboard-widget.js") // @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") public class DashboardWidget extends Component { } From 6946ceda4640097508c90e2956808a426eb8c6c4 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 11:56:33 +0300 Subject: [PATCH 07/12] chore: add license to pom --- vaadin-dashboard-flow-parent/pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vaadin-dashboard-flow-parent/pom.xml b/vaadin-dashboard-flow-parent/pom.xml index 45d666a95ff..0ef86701e71 100644 --- a/vaadin-dashboard-flow-parent/pom.xml +++ b/vaadin-dashboard-flow-parent/pom.xml @@ -10,6 +10,15 @@ pom Vaadin Dashboard Parent Vaadin Dashboard Parent + + + Vaadin Commercial License and Service Terms + https://vaadin.com/commercial-license-and-service-terms + + + + ${maven.multiModuleProjectDirectory}/scripts/templates/vaadin-commercial-license-header.txt + vaadin-dashboard-flow From 9123a106f839c865ca2ca54cd9f48f6f6531d285 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 11:56:55 +0300 Subject: [PATCH 08/12] fix: add module to root level pom --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 24c9bdb9305..6beed8cc95b 100644 --- a/pom.xml +++ b/pom.xml @@ -56,6 +56,7 @@ vaadin-combo-box-flow-parent vaadin-context-menu-flow-parent vaadin-custom-field-flow-parent + vaadin-dashboard-flow-parent vaadin-date-picker-flow-parent vaadin-date-time-picker-flow-parent vaadin-details-flow-parent From a14f1d00b5a3020874dd465b39701ca5298d5741 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 12:01:54 +0300 Subject: [PATCH 09/12] chore: run formatter --- .../flow/component/dashboard/Dashboard.java | 15 ++++----------- .../flow/component/dashboard/DashboardWidget.java | 15 ++++----------- .../tests/DashboardSerializableTest.java | 15 ++++----------- .../component/dashboard/tests/DashboardTest.java | 15 ++++----------- .../dashboard/tests/DashboardWidgetTest.java | 15 ++++----------- 5 files changed, 20 insertions(+), 55 deletions(-) diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java index 0bc9baae76c..5afda2cfadb 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java @@ -1,17 +1,10 @@ -/* +/** * Copyright 2000-2024 Vaadin Ltd. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * This program is available under Vaadin Commercial License and Service Terms. * - * 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. + * See {@literal } for the full + * license. */ package com.vaadin.flow.component.dashboard; diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java index bc749172ab6..f3c03e035d5 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java @@ -1,17 +1,10 @@ -/* +/** * Copyright 2000-2024 Vaadin Ltd. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * This program is available under Vaadin Commercial License and Service Terms. * - * 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. + * See {@literal } for the full + * license. */ package com.vaadin.flow.component.dashboard; diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardSerializableTest.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardSerializableTest.java index cecb3576e3c..8eac521aa14 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardSerializableTest.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardSerializableTest.java @@ -1,17 +1,10 @@ -/* +/** * Copyright 2000-2024 Vaadin Ltd. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * This program is available under Vaadin Commercial License and Service Terms. * - * 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. + * See {@literal } for the full + * license. */ package com.vaadin.flow.component.dashboard.tests; diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardTest.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardTest.java index 408330d07f5..883a15383fb 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardTest.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardTest.java @@ -1,17 +1,10 @@ -/* +/** * Copyright 2000-2024 Vaadin Ltd. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * This program is available under Vaadin Commercial License and Service Terms. * - * 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. + * See {@literal } for the full + * license. */ package com.vaadin.flow.component.dashboard.tests; diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardWidgetTest.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardWidgetTest.java index ce716612e04..bea69c56ff2 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardWidgetTest.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardWidgetTest.java @@ -1,17 +1,10 @@ -/* +/** * Copyright 2000-2024 Vaadin Ltd. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * This program is available under Vaadin Commercial License and Service Terms. * - * 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. + * See {@literal } for the full + * license. */ package com.vaadin.flow.component.dashboard.tests; From 847a85a00c82078e6e277e6b7f907de0d08c5e85 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 14:45:14 +0300 Subject: [PATCH 10/12] feat: add packages for testbench and integration tests --- vaadin-dashboard-flow-parent/pom.xml | 14 ++ .../pom.xml | 150 ++++++++++++++++++ .../dashboard/tests/DashboardPage.java | 19 +++ .../dashboard/tests/DashboardIT.java | 19 +++ .../vite.config.ts | 23 +++ .../vaadin-dashboard-testbench/pom.xml | 51 ++++++ .../dashboard/testbench/DashboardElement.java | 19 +++ .../testbench/DashboardWidgetElement.java | 19 +++ 8 files changed, 314 insertions(+) create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/pom.xml create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/src/main/java/com/vaadin/flow/component/dashboard/tests/DashboardPage.java create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardIT.java create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/vite.config.ts create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/pom.xml create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/src/main/java/com/vaadin/flow/component/dashboard/testbench/DashboardElement.java create mode 100644 vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/src/main/java/com/vaadin/flow/component/dashboard/testbench/DashboardWidgetElement.java diff --git a/vaadin-dashboard-flow-parent/pom.xml b/vaadin-dashboard-flow-parent/pom.xml index 0ef86701e71..dd4c8c84672 100644 --- a/vaadin-dashboard-flow-parent/pom.xml +++ b/vaadin-dashboard-flow-parent/pom.xml @@ -21,6 +21,20 @@ vaadin-dashboard-flow + vaadin-dashboard-testbench + + + default + + + !release + + + + vaadin-dashboard-flow-integration-tests + + + diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/pom.xml b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/pom.xml new file mode 100644 index 00000000000..59155d632aa --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/pom.xml @@ -0,0 +1,150 @@ + + + 4.0.0 + + com.vaadin + vaadin-dashboard-flow-parent + 24.5-SNAPSHOT + + vaadin-dashboard-integration-tests + war + Vaadin Dashboard Integration Tests + Vaadin Dashboard Integration Tests + + + com.vaadin + vaadin-dev-server + + + com.vaadin + vaadin-testbench-core + test + + + com.vaadin + flow-client + + + com.vaadin + flow-data + + + com.vaadin + flow-html-components + + + com.vaadin + vaadin-lumo-theme + + + org.slf4j + slf4j-simple + + + com.vaadin + flow-test-util + test + + + com.vaadin + vaadin-flow-components-test-util + ${project.version} + test + + + com.vaadin + flow-lit-template + + + com.vaadin + flow-polymer-template + + + + + + maven-clean-plugin + + + + ${project.basedir} + + package*.json + pnpm* + vite.generated.ts + types.d.ts + tsconfig.json + frontend/routes.tsx + frontend/App.tsx + + + + ${project.basedir}/node_modules + ${project.basedir}/frontend/generated + + + + + + maven-failsafe-plugin + + + maven-resources-plugin + + + org.sonatype.plugins + nexus-staging-maven-plugin + + true + + + + org.codehaus.mojo + properties-maven-plugin + + + maven-install-plugin + + true + + + + + + + build-frontend + + + !skipFrontend + + + + + + com.vaadin + flow-maven-plugin + + + + + + run-jetty + + + !skipJetty + + + + + + org.eclipse.jetty + jetty-maven-plugin + + 5 + + + + + + + diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/src/main/java/com/vaadin/flow/component/dashboard/tests/DashboardPage.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/src/main/java/com/vaadin/flow/component/dashboard/tests/DashboardPage.java new file mode 100644 index 00000000000..c18f2554312 --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/src/main/java/com/vaadin/flow/component/dashboard/tests/DashboardPage.java @@ -0,0 +1,19 @@ +/** + * Copyright 2000-2024 Vaadin Ltd. + * + * This program is available under Vaadin Commercial License and Service Terms. + * + * See {@literal } for the full + * license. + */ +package com.vaadin.flow.component.dashboard.tests; + +import com.vaadin.flow.component.html.Div; +import com.vaadin.flow.router.Route; + +/** + * @author Vaadin Ltd + */ +@Route("vaadin-dashboard") +public class DashboardPage extends Div { +} diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardIT.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardIT.java new file mode 100644 index 00000000000..d97c9463a62 --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/src/test/java/com/vaadin/flow/component/dashboard/tests/DashboardIT.java @@ -0,0 +1,19 @@ +/** + * Copyright 2000-2024 Vaadin Ltd. + * + * This program is available under Vaadin Commercial License and Service Terms. + * + * See {@literal } for the full + * license. + */ +package com.vaadin.flow.component.dashboard.tests; + +import com.vaadin.flow.testutil.TestPath; +import com.vaadin.tests.AbstractComponentIT; + +/** + * @author Vaadin Ltd + */ +@TestPath("vaadin-dashboard") +public class DashboardIT extends AbstractComponentIT { +} diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/vite.config.ts b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/vite.config.ts new file mode 100644 index 00000000000..d8518d74ada --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/vite.config.ts @@ -0,0 +1,23 @@ +// @ts-ignore can not be resolved until NPM packages are installed +import { UserConfigFn } from 'vite'; +// @ts-ignore can not be resolved until Flow generates base Vite config +import { overrideVaadinConfig } from './vite.generated'; +// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; + +const customConfig: UserConfigFn = (env) => ({ + // Here you can add custom Vite parameters + // https://vitejs.dev/config/ + + // Use local version of web-components, disabled by default + // To use this un-comment the lines below and change the path to + // the absolute path of your web-components repo's node_modules + // folder + // DO NOT COMMIT THESE CHANGES! + /* + plugins: [ + useLocalWebComponents('/path/to/web-components/node_modules') + ] + */ +}); + +export default overrideVaadinConfig(customConfig); diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/pom.xml b/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/pom.xml new file mode 100644 index 00000000000..0c460dc5ac5 --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + vaadin-dashboard-flow-parent + com.vaadin + 24.5-SNAPSHOT + + vaadin-dashboard-testbench + jar + Vaadin Dashboard Testbench API + Vaadin Dashboard Testbench API + + + com.vaadin + vaadin-testbench-shared + provided + + + com.vaadin + vaadin-button-testbench + ${project.version} + + + + + + + + + attach-docs + + + with-docs + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + + + diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/src/main/java/com/vaadin/flow/component/dashboard/testbench/DashboardElement.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/src/main/java/com/vaadin/flow/component/dashboard/testbench/DashboardElement.java new file mode 100644 index 00000000000..3f86d9d7ba4 --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/src/main/java/com/vaadin/flow/component/dashboard/testbench/DashboardElement.java @@ -0,0 +1,19 @@ +/** + * Copyright 2000-2024 Vaadin Ltd. + * + * This program is available under Vaadin Commercial License and Service Terms. + * + * See {@literal } for the full + * license. + */ +package com.vaadin.flow.component.dashboard.testbench; + +import com.vaadin.testbench.TestBenchElement; +import com.vaadin.testbench.elementsbase.Element; + +/** + * @author Vaadin Ltd + */ +@Element("vaadin-dashboard") +public class DashboardElement extends TestBenchElement { +} diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/src/main/java/com/vaadin/flow/component/dashboard/testbench/DashboardWidgetElement.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/src/main/java/com/vaadin/flow/component/dashboard/testbench/DashboardWidgetElement.java new file mode 100644 index 00000000000..8dd67498b6e --- /dev/null +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/src/main/java/com/vaadin/flow/component/dashboard/testbench/DashboardWidgetElement.java @@ -0,0 +1,19 @@ +/** + * Copyright 2000-2024 Vaadin Ltd. + * + * This program is available under Vaadin Commercial License and Service Terms. + * + * See {@literal } for the full + * license. + */ +package com.vaadin.flow.component.dashboard.testbench; + +import com.vaadin.testbench.TestBenchElement; +import com.vaadin.testbench.elementsbase.Element; + +/** + * @author Vaadin Ltd + */ +@Element("vaadin-dashboard-widget") +public class DashboardWidgetElement extends TestBenchElement { +} From 9fe098a46eeed17161cde9673778b3ba0aa48ab3 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 15:11:04 +0300 Subject: [PATCH 11/12] fix: update polymer legacy adapter version --- .../java/com/vaadin/flow/component/dashboard/Dashboard.java | 2 +- .../com/vaadin/flow/component/dashboard/DashboardWidget.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java index 5afda2cfadb..9ac14d04e14 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/Dashboard.java @@ -17,7 +17,7 @@ * @author Vaadin Ltd */ @Tag("vaadin-dashboard") -@NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.6.0-alpha0") +@NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.5.0-alpha8") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/dashboard/src/vaadin-dashboard.js") // @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java index f3c03e035d5..9198a9d8dcf 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow/src/main/java/com/vaadin/flow/component/dashboard/DashboardWidget.java @@ -17,7 +17,7 @@ * @author Vaadin Ltd */ @Tag("vaadin-dashboard-widget") -@NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.6.0-alpha0") +@NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.5.0-alpha8") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/dashboard/src/vaadin-dashboard-widget.js") // @NpmPackage(value = "@vaadin/dashboard", version = "24.6.0-alpha0") From 082b822d5582d64a352f7cbebfd3f5921fa64736 Mon Sep 17 00:00:00 2001 From: ugur-vaadin Date: Thu, 15 Aug 2024 15:12:31 +0300 Subject: [PATCH 12/12] chore: remove unused dependency --- .../vaadin-dashboard-testbench/pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/pom.xml b/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/pom.xml index 0c460dc5ac5..462cb444062 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/pom.xml +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-testbench/pom.xml @@ -16,11 +16,6 @@ vaadin-testbench-shared provided - - com.vaadin - vaadin-button-testbench - ${project.version} -