├── .eslintrc ├── .github └── workflows │ ├── deploy.yml │ └── reuse-compliance.yml ├── .gitignore ├── .npmrc ├── .reuse └── dep5 ├── CONTRIBUTING.md ├── LICENSE.txt ├── LICENSES └── Apache-2.0.txt ├── README.md ├── karma-ci.conf.js ├── karma.conf.js ├── package.json ├── ui5.yaml └── webapp ├── .nojekyll ├── Component.js ├── controller ├── App.controller.js └── Home.controller.js ├── css └── style.css ├── i18n └── i18n.properties ├── index.html ├── manifest.json ├── model ├── formatter.js └── models.js ├── test.html ├── test ├── integration │ ├── AllJourneys.js │ ├── NavigationJourney.js │ ├── arrangements │ │ └── Startup.js │ ├── opaTests.qunit.html │ ├── opaTests.qunit.js │ └── pages │ │ ├── App.js │ │ └── Common.js ├── testsuite.qunit.html ├── testsuite.qunit.js └── unit │ ├── AllTests.js │ ├── controller │ ├── App.controller.js │ └── App.js │ ├── model │ └── formatter.js │ ├── unitTests.qunit.html │ └── unitTests.qunit.js └── view ├── App.view.xml └── Home.view.xml /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true 4 | }, 5 | "globals": { 6 | "sap": true, 7 | "jQuery": true 8 | }, 9 | "rules": { 10 | "block-scoped-var": 1, 11 | "brace-style": [2, "1tbs", { "allowSingleLine": true }], 12 | "consistent-this": 2, 13 | "no-div-regex": 2, 14 | "no-floating-decimal": 2, 15 | "no-self-compare": 2, 16 | "no-mixed-spaces-and-tabs": [2, true], 17 | "no-nested-ternary": 2, 18 | "no-unused-vars": [2, {"vars":"all", "args":"none"}], 19 | "radix": 2, 20 | "keyword-spacing": 2, 21 | "space-unary-ops": 2, 22 | "wrap-iife": [2, "any"], 23 | 24 | "camelcase": 1, 25 | "consistent-return": 1, 26 | "max-nested-callbacks": [1, 3], 27 | "new-cap": 1, 28 | "no-extra-boolean-cast": 1, 29 | "no-lonely-if": 1, 30 | "no-new": 1, 31 | "no-new-wrappers": 1, 32 | "no-redeclare": 1, 33 | "no-unused-expressions": 1, 34 | "no-use-before-define": [1, "nofunc"], 35 | "no-warning-comments": 1, 36 | "strict": 1, 37 | "valid-jsdoc": [1, { 38 | "requireReturn": false 39 | }], 40 | "default-case": 1, 41 | 42 | "dot-notation": 0, 43 | "eol-last": 0, 44 | "eqeqeq": 0, 45 | "no-trailing-spaces": 0, 46 | "no-underscore-dangle": 0, 47 | "quotes": 0, 48 | "key-spacing": 0, 49 | "comma-spacing": 0, 50 | "no-multi-spaces": 0, 51 | "no-shadow": 0, 52 | "no-irregular-whitespace": 0 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Deploy 4 | 5 | # Controls when the action will run. Triggers the workflow on push or pull request 6 | # events but only for the master branch 7 | on: 8 | push: 9 | branches: [ master ] 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - uses: actions/checkout@v4 22 | 23 | - name: Setup Node.js environment 24 | uses: actions/setup-node@v3 25 | with: 26 | node-version: "18.x" 27 | 28 | - run: npm install 29 | - run: npm run build 30 | 31 | - name: GitHub Pages action 32 | uses: peaceiris/actions-gh-pages@v3 33 | with: 34 | # Set a generated GITHUB_TOKEN for pushing to the remote branch. 35 | github_token: ${{ secrets.GITHUB_TOKEN }} 36 | # Set an input directory for deployment. 37 | publish_dir: dist 38 | -------------------------------------------------------------------------------- /.github/workflows/reuse-compliance.yml: -------------------------------------------------------------------------------- 1 | name: REUSE Compliance Check 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | test: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: REUSE Compliance Check 17 | uses: fsfe/reuse-action@v1.1 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | coverage -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | # Don't use package-lock.json to always have the latest dependencies 2 | package-lock=false 3 | -------------------------------------------------------------------------------- /.reuse/dep5: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: openui5-basic-template-app 3 | Upstream-Contact: SAP OpenUI5 4 | Source: https://github.com/SAP/openui5-basic-template-app 5 | Disclaimer: The code in this project may include calls to APIs (“API Calls”) of 6 | SAP or third-party products or services developed outside of this project 7 | (“External Products”). 8 | “APIs” means application programming interfaces, as well as their respective 9 | specifications and implementing code that allows software to communicate with 10 | other software. 11 | API Calls to External Products are not licensed under the open source license 12 | that governs this project. The use of such API Calls and related External 13 | Products are subject to applicable additional agreements with the relevant 14 | provider of the External Products. In no event shall the open source license 15 | that governs this project grant any rights in or to any External Products,or 16 | alter, expand or supersede any terms of the applicable additional agreements. 17 | If you have a valid license agreement with SAP for the use of a particular SAP 18 | External Product, then you may make use of any API Calls included in this 19 | project’s code for that SAP External Product, subject to the terms of such 20 | license agreement. If you do not have a valid license agreement for the use of 21 | a particular SAP External Product, then you may only make use of any API Calls 22 | in this project for that SAP External Product for your internal, non-productive 23 | and non-commercial test and evaluation of such API Calls. Nothing herein grants 24 | you any rights to use or access any SAP External Product, or provide any third 25 | parties the right to use of access any SAP External Product, through API Calls. 26 | 27 | Files: * 28 | Copyright: 2018-2024 SAP SE or an SAP affiliate company and openui5-basic-template-app contributors 29 | License: Apache-2.0 -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to openui5-basic-template-app 2 | 3 | In general the contributing guidelines of OpenUI5 also apply to this project. They can be found here: 4 | https://github.com/SAP/openui5/blob/master/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSES/Apache-2.0.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![REUSE status](https://api.reuse.software/badge/github.com/SAP/openui5-basic-template-app)](https://api.reuse.software/info/github.com/SAP/openui5-basic-template-app) 2 | ![OpenUI5 logo](http://openui5.org/images/OpenUI5_new_big_side.png) 3 | 4 | # DEPRECATED 5 | 6 | **⚠️ This project has been deprecated in favor of [OpenUI5 Sample App](https://github.com/SAP/openui5-sample-app).** 7 | 8 | # openui5-basic-template-app 9 | OpenUI5 basic template app using the UI5 Build and Development Tooling. You can use it as a starting point to build custom OpenUI5 apps. 10 | 11 | ## More information 12 | * [Live Demo](https://sap-archive.github.io/openui5-basic-template-app) 13 | * [Documentation](https://openui5.hana.ondemand.com/#/topic/7a4d93c0b0bb439b9d889ffc5b02eac9) 14 | * [UI5 Tooling](https://github.com/SAP/ui5-tooling) 15 | * [OpenUI5](https://github.com/SAP/openui5) 16 | 17 | ## Prerequisites 18 | The **UI5 build and development tooling command line interface (UI5 CLI)** has to be installed. 19 | For installation instructions please see [Installing the UI5 CLI](https://github.com/SAP/ui5-tooling#installing-the-ui5-cli). 20 | 21 | ## Setup 22 | 1. Clone the repository and navigate into it 23 | ```sh 24 | git clone https://github.com/SAP/openui5-basic-template-app.git 25 | cd openui5-basic-template-app 26 | ``` 27 | 1. Install all dependencies 28 | ```sh 29 | npm install 30 | ``` 31 | 32 | 1. Start a local server and run the application (http://localhost:8080/index.html) 33 | ```sh 34 | ui5 serve -o /index.html 35 | ``` 36 | 37 | ## Testing 38 | * Run ESLint code validation 39 | ```sh 40 | npm run lint 41 | ``` 42 | * Start a local server and execute the tests automatically after every change 43 | ```sh 44 | npm run watch 45 | ``` 46 | * Run ESLint, start a local server and run the tests in CI mode 47 | ```sh 48 | npm test 49 | ``` 50 | 51 | For more build and development options please see: [UI5 Build and Development Tooling](https://github.com/SAP/ui5-tooling) 52 | 53 | ## Support 54 | This repository is based on the [OpenUI5 template demo apps](https://openui5.hana.ondemand.com/#/demoapps) and updated regularly with our latest recommendations. 55 | If you found a bug, please create an [OpenUI5 issue](https://github.com/sap/openui5/issues). Thank you! 56 | -------------------------------------------------------------------------------- /karma-ci.conf.js: -------------------------------------------------------------------------------- 1 | /* global module require*/ 2 | 3 | module.exports = function(config) { 4 | "use strict"; 5 | 6 | require("./karma.conf")(config); 7 | 8 | config.set({ 9 | 10 | preprocessors: { 11 | '{webapp,webapp/!(test)}/*.js': ['coverage'] 12 | }, 13 | 14 | coverageReporter: { 15 | includeAllSources: true, 16 | reporters: [ 17 | { 18 | type: 'html', 19 | dir: 'coverage' 20 | }, 21 | { 22 | type: 'text' 23 | } 24 | ], 25 | check: { 26 | global: { 27 | statements: 80, 28 | branches: 80, 29 | functions: 70, 30 | lines: 80 31 | } 32 | } 33 | }, 34 | 35 | reporters: ['progress', 'coverage'], 36 | 37 | browserNoActivityTimeout: 30000, 38 | 39 | browsers: ['ChromeHeadless'], 40 | 41 | singleRun: true 42 | }); 43 | }; -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | /* global module*/ 2 | 3 | module.exports = function(config) { 4 | "use strict"; 5 | 6 | config.set({ 7 | 8 | frameworks: ['ui5'], 9 | 10 | reporters: ['progress'], 11 | 12 | logLevel: config.LOG_INFO, 13 | 14 | browserConsoleLogOptions: { 15 | level: 'warn' 16 | }, 17 | 18 | autoWatch: true, 19 | 20 | browsers: ['Chrome'], 21 | 22 | singleRun: false 23 | }); 24 | }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openui5-basic-template-app", 3 | "version": "0.1.0", 4 | "description": "Best-practice starting point for building a freestyle app", 5 | "private": true, 6 | "scripts": { 7 | "start": "ui5 serve", 8 | "lint": "eslint webapp", 9 | "karma": "karma start", 10 | "karma-ci": "karma start karma-ci.conf.js", 11 | "watch": "npm run karma", 12 | "test": "npm run lint && rimraf coverage && npm run karma-ci", 13 | "build": "rimraf dist && ui5 build --a" 14 | }, 15 | "devDependencies": { 16 | "@ui5/cli": "^3.6.1", 17 | "eslint": "^8.50.0", 18 | "karma": "^6.4.2", 19 | "karma-chrome-launcher": "^3.2.0", 20 | "karma-coverage": "^2.2.1", 21 | "karma-ui5": "^3.0.3", 22 | "rimraf": "^5.0.5" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ui5.yaml: -------------------------------------------------------------------------------- 1 | specVersion: '3.1' 2 | metadata: 3 | name: openui5-basic-template-app 4 | type: application 5 | framework: 6 | name: OpenUI5 7 | version: "1.119.0" 8 | libraries: 9 | - name: sap.m 10 | - name: sap.ui.core 11 | - name: sap.ui.layout 12 | - name: themelib_sap_horizon 13 | -------------------------------------------------------------------------------- /webapp/.nojekyll: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/Component.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/UIComponent", 3 | "sap/ui/Device", 4 | "./model/models" 5 | ], function(UIComponent, Device, models) { 6 | "use strict"; 7 | 8 | return UIComponent.extend("sap.ui.demo.basicTemplate.Component", { 9 | 10 | metadata: { 11 | manifest: "json" 12 | }, 13 | 14 | /** 15 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once. 16 | * @public 17 | * @override 18 | */ 19 | init: function() { 20 | // call the base component's init function 21 | UIComponent.prototype.init.apply(this, arguments); 22 | 23 | // set the device model 24 | this.setModel(models.createDeviceModel(), "device"); 25 | 26 | // create the views based on the url/hash 27 | this.getRouter().initialize(); 28 | } 29 | }); 30 | }); -------------------------------------------------------------------------------- /webapp/controller/App.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/mvc/Controller", 3 | "sap/ui/demo/basicTemplate/model/formatter" 4 | ], function(Controller, formatter) { 5 | "use strict"; 6 | 7 | return Controller.extend("sap.ui.demo.basicTemplate.controller.App", { 8 | 9 | formatter: formatter, 10 | 11 | onInit: function () { 12 | 13 | } 14 | }); 15 | }); -------------------------------------------------------------------------------- /webapp/controller/Home.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/mvc/Controller", 3 | "../model/formatter" 4 | ], function(Controller, formatter) { 5 | "use strict"; 6 | 7 | return Controller.extend("sap.ui.demo.basicTemplate.controller.Home", { 8 | 9 | formatter: formatter, 10 | 11 | onInit: function () { 12 | 13 | } 14 | }); 15 | }); -------------------------------------------------------------------------------- /webapp/css/style.css: -------------------------------------------------------------------------------- 1 | /* add your custom styles here */ -------------------------------------------------------------------------------- /webapp/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Basic Template 2 | appTitle=Basic Template 3 | appDescription=Blank app as starting point for your app development -------------------------------------------------------------------------------- /webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Basic Template 7 | 8 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /webapp/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.12.0", 3 | "sap.app": { 4 | "id": "sap.ui.demo.basicTemplate", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "resources": "resources.json", 13 | "ach": "ach" 14 | }, 15 | 16 | "sap.ui": { 17 | "technology": "UI5", 18 | "icons": { 19 | "icon": "", 20 | "favIcon": "", 21 | "phone": "", 22 | "phone@2": "", 23 | "tablet": "", 24 | "tablet@2": "" 25 | }, 26 | "deviceTypes": { 27 | "desktop": true, 28 | "tablet": true, 29 | "phone": true 30 | } 31 | }, 32 | 33 | "sap.ui5": { 34 | "rootView": { 35 | "viewName": "sap.ui.demo.basicTemplate.view.App", 36 | "type": "XML", 37 | "async": true, 38 | "id": "app" 39 | }, 40 | "dependencies": { 41 | "minUI5Version": "1.60.0", 42 | "libs": { 43 | "sap.ui.core": {}, 44 | "sap.m": {}, 45 | "sap.ui.layout": {} 46 | } 47 | }, 48 | "contentDensities": { 49 | "compact": true, 50 | "cozy": true 51 | }, 52 | "models": { 53 | "i18n": { 54 | "type": "sap.ui.model.resource.ResourceModel", 55 | "settings": { 56 | "bundleName": "sap.ui.demo.basicTemplate.i18n.i18n" 57 | } 58 | } 59 | }, 60 | "resources": { 61 | "css": [{ 62 | "uri": "css/style.css" 63 | }] 64 | }, 65 | "routing": { 66 | "config": { 67 | "routerClass": "sap.m.routing.Router", 68 | "viewType": "XML", 69 | "viewPath": "sap.ui.demo.basicTemplate.view", 70 | "controlId": "app", 71 | "controlAggregation": "pages", 72 | "async": true 73 | }, 74 | "routes": [ 75 | { 76 | "pattern": "", 77 | "name": "home", 78 | "target": ["home"] 79 | } 80 | ], 81 | "targets": { 82 | "home": { 83 | "viewName": "Home", 84 | "viewId": "home", 85 | "viewLevel": 1, 86 | "title": "{i18n>title}" 87 | } 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /webapp/model/formatter.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([], function () { 2 | "use strict"; 3 | return { 4 | 5 | }; 6 | }); -------------------------------------------------------------------------------- /webapp/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function(JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function() { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /webapp/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Testing Overview 5 | 6 | 7 | 8 | 9 |

Testing Overview

10 |

This is an overview page of various ways to test the generated app during development.
Choose one of the access points below to launch the app as a standalone application.

11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /webapp/test/integration/AllJourneys.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/test/Opa5", 3 | "./arrangements/Startup", 4 | "./NavigationJourney" 5 | ], function (Opa5, Startup) { 6 | "use strict"; 7 | 8 | Opa5.extendConfig({ 9 | arrangements: new Startup(), 10 | viewNamespace: "sap.ui.demo.basicTemplate.view.", 11 | autoWait: true 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /webapp/test/integration/NavigationJourney.js: -------------------------------------------------------------------------------- 1 | /*global QUnit*/ 2 | 3 | sap.ui.define([ 4 | "sap/ui/test/opaQunit", 5 | "./pages/App" 6 | ], function (opaTest) { 7 | "use strict"; 8 | 9 | QUnit.module("Navigation Journey"); 10 | 11 | opaTest("Should see the initial page of the app", function (Given, When, Then) { 12 | // Arrangements 13 | Given.iStartMyApp(); 14 | 15 | // Assertions 16 | Then.onTheAppPage.iShouldSeeTheApp(); 17 | 18 | //Cleanup 19 | Then.iTeardownMyApp(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /webapp/test/integration/arrangements/Startup.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/test/Opa5" 3 | ], function(Opa5) { 4 | "use strict"; 5 | 6 | return Opa5.extend("sap.ui.demo.basicTemplate.test.integration.arrangements.Startup", { 7 | 8 | iStartMyApp: function (oOptions) { 9 | oOptions = oOptions || {}; 10 | 11 | // start the app with a minimal delay to make tests fast but still async to discover basic timing issues 12 | oOptions.delay = oOptions.delay || 50; 13 | 14 | // start the app UI component 15 | this.iStartMyUIComponent({ 16 | componentConfig: { 17 | name: "sap.ui.demo.basicTemplate", 18 | async: true 19 | }, 20 | hash: oOptions.hash, 21 | autoWait: oOptions.autoWait 22 | }); 23 | } 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /webapp/test/integration/opaTests.qunit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Integration tests for Basic Template 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /webapp/test/integration/opaTests.qunit.js: -------------------------------------------------------------------------------- 1 | /* global QUnit */ 2 | QUnit.config.autostart = false; 3 | 4 | sap.ui.getCore().attachInit(function() { 5 | "use strict"; 6 | 7 | sap.ui.require([ 8 | "sap/ui/demo/basicTemplate/test/integration/AllJourneys" 9 | ], function() { 10 | QUnit.start(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /webapp/test/integration/pages/App.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/test/Opa5" 3 | ], function(Opa5) { 4 | "use strict"; 5 | var sViewName = "App"; 6 | Opa5.createPageObjects({ 7 | onTheAppPage: { 8 | 9 | actions: {}, 10 | 11 | assertions: { 12 | 13 | iShouldSeeTheApp: function () { 14 | return this.waitFor({ 15 | id: "app", 16 | viewName: sViewName, 17 | success: function () { 18 | Opa5.assert.ok(true, "The App view is displayed"); 19 | }, 20 | errorMessage: "Did not find the App view" 21 | }); 22 | } 23 | } 24 | } 25 | }); 26 | 27 | }); 28 | -------------------------------------------------------------------------------- /webapp/test/integration/pages/Common.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/test/Opa5" 3 | ], function(Opa5) { 4 | "use strict"; 5 | 6 | function getFrameUrl (sHash, sUrlParameters) { 7 | var sUrl = jQuery.sap.getResourcePath("sap/ui/demo/basicTemplate/app", ".html"); 8 | sHash = sHash || ""; 9 | sUrlParameters = sUrlParameters ? "?" + sUrlParameters : ""; 10 | 11 | if (sHash) { 12 | sHash = "#" + (sHash.indexOf("/") === 0 ? sHash.substring(1) : sHash); 13 | } else { 14 | sHash = ""; 15 | } 16 | 17 | return sUrl + sUrlParameters + sHash; 18 | } 19 | 20 | return Opa5.extend("sap.ui.demo.basicTemplate.test.integration.pages.Common", { 21 | 22 | iStartTheApp : function (oOptions) { 23 | oOptions = oOptions || {}; 24 | // Start the app with a minimal delay to make tests run fast but still async to discover basic timing issues 25 | this.iStartMyAppInAFrame(getFrameUrl(oOptions.hash)); 26 | }, 27 | 28 | iLookAtTheScreen : function () { 29 | return this; 30 | } 31 | 32 | }); 33 | 34 | }); -------------------------------------------------------------------------------- /webapp/test/testsuite.qunit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | QUnit test suite for Basic Template 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /webapp/test/testsuite.qunit.js: -------------------------------------------------------------------------------- 1 | window.suite = function () { 2 | "use strict"; 3 | 4 | var oSuite = new parent.jsUnitTestSuite(), 5 | sContextPath = location.pathname.substring(0, location.pathname.lastIndexOf("/") + 1); 6 | 7 | oSuite.addTestPage(sContextPath + "unit/unitTests.qunit.html"); 8 | oSuite.addTestPage(sContextPath + "integration/opaTests.qunit.html"); 9 | 10 | return oSuite; 11 | }; 12 | -------------------------------------------------------------------------------- /webapp/test/unit/AllTests.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "./model/formatter", 3 | "./controller/App" 4 | ], function() { 5 | "use strict"; 6 | }); 7 | -------------------------------------------------------------------------------- /webapp/test/unit/controller/App.controller.js: -------------------------------------------------------------------------------- 1 | /*global QUnit*/ 2 | 3 | sap.ui.define([ 4 | "sap/ui/demo/basicTemplate/controller/App.controller" 5 | ], function(Controller) { 6 | "use strict"; 7 | 8 | QUnit.module("App Controller"); 9 | 10 | QUnit.test("I should test the app controller", function (assert) { 11 | var oAppController = new Controller(); 12 | oAppController.onInit(); 13 | assert.ok(oAppController); 14 | }); 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /webapp/test/unit/controller/App.js: -------------------------------------------------------------------------------- 1 | /*global QUnit*/ 2 | 3 | sap.ui.define([ 4 | "sap/ui/demo/basicTemplate/controller/Home.controller" 5 | ], function(oController) { 6 | "use strict"; 7 | 8 | QUnit.module("App Controller"); 9 | 10 | QUnit.test("I should test the controller", function (assert) { 11 | var oAppController = new oController(); 12 | 13 | oAppController.onInit(); 14 | assert.ok(oAppController); 15 | }); 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /webapp/test/unit/model/formatter.js: -------------------------------------------------------------------------------- 1 | /*global QUnit*/ 2 | 3 | sap.ui.define([ 4 | "sap/ui/demo/basicTemplate/model/formatter" 5 | ], function() { 6 | "use strict"; 7 | 8 | QUnit.module("Formatters"); 9 | 10 | QUnit.test("I should test my formatters", function (assert) { 11 | assert.ok(true); 12 | }); 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /webapp/test/unit/unitTests.qunit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Unit tests for Basic Template 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /webapp/test/unit/unitTests.qunit.js: -------------------------------------------------------------------------------- 1 | /* global QUnit */ 2 | QUnit.config.autostart = false; 3 | 4 | sap.ui.getCore().attachInit(function () { 5 | "use strict"; 6 | 7 | sap.ui.require([ 8 | "sap/ui/demo/basicTemplate/test/unit/AllTests" 9 | ], function () { 10 | QUnit.start(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /webapp/view/App.view.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /webapp/view/Home.view.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | 11 | --------------------------------------------------------------------------------