├── .cdsprettier.json ├── .cdsrc.json ├── .gitignore ├── LICENSE ├── LICENSES └── Apache-2.0.txt ├── README.md ├── REUSE.toml ├── _i18n ├── i18n.properties └── i18n_en.properties ├── app ├── featureShowcase │ ├── capabilities.cds │ ├── field-control.cds │ ├── labels.cds │ ├── layouts_ChartDataEntities.cds │ ├── layouts_ChildEntities1.cds │ ├── layouts_ChildEntities2.cds │ ├── layouts_ChildEntities3.cds │ ├── layouts_GrandChildEntities.cds │ ├── layouts_RootEntities.cds │ ├── layouts_RootEntityVariants.cds │ ├── layouts_contacts.cds │ ├── package.json │ ├── ui5.yaml │ ├── value-helps.cds │ └── webapp │ │ ├── Component.js │ │ ├── ext │ │ ├── CustomActions.js │ │ ├── CustomColumn-DateRangeLR.fragment.xml │ │ ├── CustomColumn-ProcessFlow.fragment.xml │ │ ├── CustomController.js │ │ ├── CustomField-DatePicker.fragment.xml │ │ ├── CustomField-DateRange.fragment.xml │ │ ├── CustomFilter-Rating.fragment.xml │ │ ├── CustomFilter-Rating.js │ │ ├── CustomHeaderFacet-Edit.fragment.xml │ │ ├── CustomHeaderFacet-ProcessFlow.fragment.xml │ │ ├── CustomSection.fragment.xml │ │ ├── CustomSubSection.fragment.xml │ │ ├── SideContent.fragment.xml │ │ ├── SideContent.js │ │ ├── SideContentTable.fragment.xml │ │ ├── controller │ │ │ ├── CustomObjectPage.controller.js │ │ │ └── data.json │ │ └── view │ │ │ └── CustomObjectPage.view.xml │ │ ├── i18n │ │ ├── customI18N.properties │ │ ├── customI18N_en.properties │ │ ├── customI18N_en_US.properties │ │ ├── i18n.properties │ │ ├── i18n_en.properties │ │ └── i18n_en_US.properties │ │ ├── manifest.json │ │ └── utils │ │ └── locate-reuse-libs.js ├── featureShowcaseNavigationTarget │ ├── annotations.cds │ ├── package.json │ ├── ui5.yaml │ └── webapp │ │ ├── Component.js │ │ ├── i18n │ │ ├── i18n.properties │ │ ├── i18n_en.properties │ │ └── i18n_en_US.properties │ │ ├── manifest.json │ │ └── utils │ │ └── locate-reuse-libs.js ├── media │ ├── bigBen.png │ ├── brandenburgGate.png │ ├── camera.png │ ├── consulting.png │ ├── crate.png │ ├── drink.png │ ├── gift.png │ └── null.png └── services.cds ├── db ├── common.cds ├── data │ ├── sap.common-Countries.csv │ ├── sap.common-Countries.texts.csv │ ├── sap.common-Criticality.csv │ ├── sap.common-Currencies.csv │ ├── sap.common-Currencies.text.csv │ ├── sap.common-Regions.csv │ ├── sap.common-UnitOfMeasureCodeList.csv │ ├── sap.fe.featureShowcase-ChartDataEntities.csv │ ├── sap.fe.featureShowcase-ChildEntities1.csv │ ├── sap.fe.featureShowcase-ChildEntities2.csv │ ├── sap.fe.featureShowcase-ChildEntities3.csv │ ├── sap.fe.featureShowcase-Contacts.csv │ ├── sap.fe.featureShowcase-GrandChildEntities.csv │ ├── sap.fe.featureShowcase-RootEntities.csv │ ├── sap.fe.featureShowcase-RootEntityVariants.csv │ └── sap.fe.featureShowcase-Singleton.csv └── schema.cds ├── package-lock.json ├── package.json ├── readmeImages └── app-screenshot.png └── srv ├── service.cds └── service.js /.cdsprettier.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.cdsrc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CAP feature-showcase 2 | _out 3 | *.db 4 | connection.properties 5 | default-*.json 6 | gen/ 7 | node_modules/ 8 | target/ 9 | 10 | # Web IDE, App Studio 11 | .che/ 12 | .gen/ 13 | 14 | # MTA 15 | *_mta_build_tmp 16 | *.mtar 17 | mta_archives/ 18 | 19 | # Other 20 | .DS_Store 21 | *.orig 22 | *.log 23 | 24 | *.iml 25 | *.flattened-pom.xml 26 | 27 | # IDEs 28 | .vscode 29 | .idea -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /REUSE.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | SPDX-PackageName = "fiori-elements-feature-showcase" 3 | SPDX-PackageSupplier = "s.engelhardt@sap.com" 4 | SPDX-PackageDownloadLocation = "https://github.com/sap-samples/fiori-elements-feature-showcase" 5 | SPDX-PackageComment = "The code in this project may include calls to APIs (“API Calls”) of\n SAP or third-party products or services developed outside of this project\n (“External Products”).\n “APIs” means application programming interfaces, as well as their respective\n specifications and implementing code that allows software to communicate with\n other software.\n API Calls to External Products are not licensed under the open source license\n that governs this project. The use of such API Calls and related External\n Products are subject to applicable additional agreements with the relevant\n provider of the External Products. In no event shall the open source license\n that governs this project grant any rights in or to any External Products,or\n alter, expand or supersede any terms of the applicable additional agreements.\n If you have a valid license agreement with SAP for the use of a particular SAP\n External Product, then you may make use of any API Calls included in this\n project’s code for that SAP External Product, subject to the terms of such\n license agreement. If you do not have a valid license agreement for the use of\n a particular SAP External Product, then you may only make use of any API Calls\n in this project for that SAP External Product for your internal, non-productive\n and non-commercial test and evaluation of such API Calls. Nothing herein grants\n you any rights to use or access any SAP External Product, or provide any third\n parties the right to use of access any SAP External Product, through API Calls." 6 | 7 | [[annotations]] 8 | path = "**" 9 | precedence = "aggregate" 10 | SPDX-FileCopyrightText = "2021 SAP SE or an SAP affiliate company and [YOUR REPO NAME] contributors" 11 | SPDX-License-Identifier = "Apache-2.0" 12 | -------------------------------------------------------------------------------- /_i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | RootEntities=Root entity 2 | RootEntities.typeNamePlural=Root entities 3 | 4 | location=Location 5 | integerValue=Integer value 6 | targetValue=Target value 7 | forecastValue=Forecast value 8 | dimensions=Dimension 9 | field=Field 10 | contact=Contact 11 | 12 | sumIntegerValue=Sum of integer values 13 | sumTargetValue=Sum of target values 14 | 15 | connectedField=Connected fields 16 | 17 | changeCriticality=Change Criticality (Bound) 18 | unboundAction=Show input (Unbound) 19 | subSection=Subsection 20 | customSubSection=Custom subsection 21 | customSection=Custom section 22 | customHeaderFacet=Custom header facet 23 | customColumn=Custom column 24 | customFilter=Rating filter 25 | 26 | inboundNavigation=IBN 27 | formAction=Action on form 28 | formActionEmphasized=Emphasized action on form 29 | 30 | ToggleSideContent=Toggle side content 31 | CustomActionOPTableToolbar=Custom action 32 | CustomActionOPHeader=Custom action 33 | CustomActionOPFooter=Custom action 34 | CustomActionSection=Custom action 35 | CustomActionLRGlobal=Custom action 36 | CustomActionLR=Custom action 37 | validityPeriodLR=Custom column 38 | validityPeriodOP=Custom field 39 | 40 | generalData=General data 41 | address=Address 42 | plainText=Plain text 43 | ratingIndicator=Rating indicator 44 | progressIndicator=Progress indicator 45 | areaChart=Area micro chart 46 | lineChart=Line micro chart 47 | harveyChart=Harvey micro chart 48 | columnChart=Column micro chart 49 | stackedBarChart=Stacked bar micro chart 50 | comparisonChart=Comparison micro chart 51 | bulletChart=Bullet micro chart 52 | radialChart=Radial micro chart 53 | ThisIsAMicroChart=This is a micro chart 54 | 55 | childEntities1=Child entity 1 (1..n) 56 | childEntities1.typeNamePlural=Child 1 entities 57 | ChildEntity2=Association (1..1) 58 | ChildEntity2.typeNamePlural=Association entities 59 | childEntities3=Child entities for custom object page (1..n) 60 | chartEntities=Child entities for chart (1..n) 61 | grandChildren=Grand child entities (1..n) 62 | chart=Chart 63 | 64 | chartDataCollection=Micro chart data (collection facet) 65 | chartData=Chart data 66 | advancedChartData=Calculated values 67 | 68 | collectionSection=Collection facet 69 | showWhenInEdit=Section visible in edit 70 | 71 | image=Image 72 | fieldWithPrice=Property with currency 73 | fieldWithUoM=Property with unit 74 | fieldWithCriticality=Property with criticality 75 | fieldWithPerCent=Percentage property 76 | fieldWithToolTip=Field with tool tip 77 | adminData=Admin data (field group) 78 | dataFieldWithURL=URL property 79 | contactQuickView=Contact with quick view 80 | 81 | stringProperty=String property 82 | integerProperty=Integer property 83 | decimalProperty=Decimal property 84 | booleanProperty=Boolean property 85 | 86 | variant1ChildEntities1=SelectionVariant (All entities) 87 | variant2ChildEntities1=SelectionVariant (Positive criticality) 88 | variant3ChildEntities1=SelectionVariant (Negative criticality) 89 | variant4ChildEntities1=SelectionVariant (Critical criticality) 90 | 91 | newProgress=New value for progress 92 | newCriticality=New value for criticality 93 | inputValue=Input value 94 | 95 | SVariant1=SelectionVariant (Criticality between 0 and 2) 96 | SVariant2=SelectionVariant (Positive criticality) 97 | SelectionPresentationVariant=SelectionPresentationVariant (Criticality larger 0) 98 | 99 | variant3RootEntityVariants=View with other entity set (Criticality between 0 and 3) 100 | variant1ForRootEntityVariants=SelectionVariant (Criticality between 0 and 2) 101 | variant2ForRootEntityVariants=SelectionVariant (Positive criticality) 102 | 103 | semanticKeyField=Field with semantic key 104 | locationSubSection=Fields depending on each other 105 | description=Description 106 | communication=Communication 107 | email=E-Mail 108 | telephone=Telephone 109 | 110 | timeAndDate=Time and Date 111 | date=Date 112 | dateTo=To Date 113 | time=Time 114 | timeStamp=Time stamp 115 | 116 | macroField=Macro field 117 | resetEntities=Reset all data 118 | criticalAction=Critical action 119 | country=Country 120 | criticality=Criticality 121 | fieldWithURL=URL 122 | stars=Stars 123 | currencyForFieldWithPrice=Currency 124 | region=Region 125 | description2=Second description 126 | MultiInputField=Multi input field 127 | 128 | MultiInputFieldWithVH=Multi input with value help and input filter -------------------------------------------------------------------------------- /_i18n/i18n_en.properties: -------------------------------------------------------------------------------- 1 | RootEntities=Root entity 2 | RootEntities.typeNamePlural=Root entities 3 | 4 | location=Location 5 | integerValue=Integer value 6 | targetValue=Target value 7 | forecastValue=Forecast value 8 | dimensions=Dimension 9 | field=Field 10 | contact=Contact 11 | 12 | sumIntegerValue=Sum of integer values 13 | sumTargetValue=Sum of target values 14 | 15 | connectedField=Connected fields 16 | 17 | changeCriticality=Change Criticality (Bound) 18 | unboundAction=Show input (Unbound) 19 | subSection=Subsection 20 | customSubSection=Custom subsection 21 | customSection=Custom section 22 | customHeaderFacet=Custom header facet 23 | customColumn=Custom column 24 | customFilter=Rating filter 25 | 26 | inboundNavigation=IBN 27 | formAction=Action on form 28 | formActionEmphasized=Emphasized action on form 29 | 30 | ToggleSideContent=Toggle side content 31 | CustomActionOPTableToolbar=Custom action 32 | CustomActionOPHeader=Custom action 33 | CustomActionOPFooter=Custom action 34 | CustomActionSection=Custom action 35 | CustomActionLRGlobal=Custom action 36 | CustomActionLR=Custom action 37 | validityPeriodLR=Custom column 38 | validityPeriodOP=Custom field 39 | 40 | generalData=General data 41 | address=Address 42 | plainText=Plain text 43 | ratingIndicator=Rating indicator 44 | progressIndicator=Progress indicator 45 | areaChart=Area micro chart 46 | lineChart=Line micro chart 47 | harveyChart=Harvey micro chart 48 | columnChart=Column micro chart 49 | stackedBarChart=Stacked bar micro chart 50 | comparisonChart=Comparison micro chart 51 | bulletChart=Bullet micro chart 52 | radialChart=Radial micro chart 53 | ThisIsAMicroChart=This is a micro chart 54 | 55 | childEntities1=Child entity 1 (1..n) 56 | childEntities1.typeNamePlural=Child 1 entities 57 | ChildEntity2=Association (1..1) 58 | ChildEntity2.typeNamePlural=Association entities 59 | childEntities3=Child entities for custom object page (1..n) 60 | chartEntities=Child entities for chart (1..n) 61 | grandChildren=Grand child entities (1..n) 62 | chart=Chart 63 | 64 | chartDataCollection=Micro chart data (collection facet) 65 | chartData=Chart data 66 | advancedChartData=Calculated values 67 | 68 | collectionSection=Collection facet 69 | showWhenInEdit=Section visible in edit 70 | 71 | image=Image 72 | fieldWithPrice=Property with currency 73 | fieldWithUoM=Property with unit 74 | fieldWithCriticality=Property with criticality 75 | fieldWithPerCent=Percentage property 76 | fieldWithToolTip=Field with tool tip 77 | adminData=Admin data (field group) 78 | dataFieldWithURL=URL property 79 | contactQuickView=Contact with quick view 80 | 81 | stringProperty=String property 82 | integerProperty=Integer property 83 | decimalProperty=Decimal property 84 | booleanProperty=Boolean property 85 | 86 | variant1ChildEntities1=SelectionVariant (All entities) 87 | variant2ChildEntities1=SelectionVariant (Positive criticality) 88 | variant3ChildEntities1=SelectionVariant (Negative criticality) 89 | variant4ChildEntities1=SelectionVariant (Critical criticality) 90 | 91 | newProgress=New value for progress 92 | newCriticality=New value for criticality 93 | inputValue=Input value 94 | 95 | SVariant1=SelectionVariant (Criticality between 0 and 2) 96 | SVariant2=SelectionVariant (Positive criticality) 97 | SelectionPresentationVariant=SelectionPresentationVariant (Criticality larger 0) 98 | 99 | variant3RootEntityVariants=View with other entity set (Criticality between 0 and 3) 100 | variant1ForRootEntityVariants=SelectionVariant (Criticality between 0 and 2) 101 | variant2ForRootEntityVariants=SelectionVariant (Positive criticality) 102 | 103 | semanticKeyField=Field with semantic key 104 | locationSubSection=Fields depending on each other 105 | description=Description 106 | communication=Communication 107 | email=E-Mail 108 | telephone=Telephone 109 | 110 | timeAndDate=Time and Date 111 | date=Date 112 | dateTo=To Date 113 | time=Time 114 | timeStamp=Time stamp 115 | 116 | macroField=Macro field 117 | resetEntities=Reset all data 118 | criticalAction=Critical action 119 | country=Country 120 | criticality=Criticality 121 | fieldWithURL=URL 122 | stars=Stars 123 | currencyForFieldWithPrice=Currency 124 | region=Region 125 | description2=Second description 126 | MultiInputField=Multi input field 127 | 128 | MultiInputFieldWithVH=Multi input with value help and input filter -------------------------------------------------------------------------------- /app/featureShowcase/capabilities.cds: -------------------------------------------------------------------------------- 1 | using service1 from '../../srv/service'; 2 | 3 | annotate service1.RootEntities with @odata.draft.enabled; //Search-Term: #Draft 4 | 5 | annotate service1.RootEntityVariants with @odata.draft.enabled; //Annotation has to exists, without no entites would be visible on view with other entity set of List Report 6 | 7 | annotate service1.RootEntities with @( 8 | //Disables the delete option dependent of the fields value 9 | Capabilities.DeleteRestrictions : { 10 | Deletable : deletePossible, //Search-Term: #DynamicCRUD 11 | }, 12 | /* Capabilities.UpdateRestrictions : { 13 | Updatable : updatePossible, //UpdateRestrictions are ignored in determining if the edit button is visible or not, but it still affects wheather the fields are editable or not 14 | }, */ 15 | UI.UpdateHidden : updateHidden,//Search-Term: #DynamicCRUD 16 | 17 | UI.CreateHidden: { $edmJson: { $Path: '/service1.EntityContainer/Singleton/createHidden' } }, //Search-Term: #DynamicCRUD 18 | 19 | Capabilities.FilterRestrictions : { 20 | FilterExpressionRestrictions : [ 21 | { 22 | //Search-Term: #SemanticDateFilter 23 | Property : 'validFrom', 24 | AllowedExpressions : 'SingleRange' //Other option: SingleValue 25 | }, 26 | ], 27 | // RequiredProperties : [ 28 | // stringProperty //Search-Term: #RequiredFilter 29 | // ] 30 | }, 31 | ) { 32 | validTo @UI.DateTimeStyle : 'short' 33 | }; 34 | 35 | annotate service1 with @( 36 | Capabilities.FilterFunctions : [ 37 | 'tolower' //Search-Term: #CaseInsensitiveFiltering 38 | ], 39 | ); 40 | 41 | annotate service1.ChartDataEntities with @( 42 | //Search-Term: #ChartSection 43 | Aggregation.ApplySupported : { 44 | Transformations : [ 45 | 'aggregate', 46 | 'topcount', 47 | 'bottomcount', 48 | 'identity', 49 | 'concat', 50 | 'groupby', 51 | 'filter', 52 | 'expand', 53 | 'top', 54 | 'skip', 55 | 'orderby', 56 | 'search' 57 | ], 58 | Rollup : #None, 59 | PropertyRestrictions : true, 60 | GroupableProperties : [ 61 | dimensions, 62 | criticality_code 63 | ], 64 | AggregatableProperties : [ 65 | {Property : integerValue}, 66 | ], 67 | } 68 | ); 69 | 70 | annotate service1.ChartDataEntities with { 71 | //Search-Term: #ChartSection 72 | criticality @( 73 | UI.ValueCriticality : [ 74 | { 75 | Value : 0, 76 | Criticality : #Neutral 77 | }, 78 | { 79 | Value : 1, 80 | Criticality : #Negative 81 | }, 82 | { 83 | Value : 2, 84 | Criticality : #Critical 85 | }, 86 | { 87 | Value : 3, 88 | Criticality : #Positive 89 | } 90 | ] 91 | ); 92 | 93 | integerValue @( 94 | Measures.ISOCurrency : uom_code, 95 | Core.Immutable : true, 96 | ); 97 | }; -------------------------------------------------------------------------------- /app/featureShowcase/field-control.cds: -------------------------------------------------------------------------------- 1 | using service1 from '../../srv/service'; 2 | 3 | // 4 | // annotations that control the behavior of fields and actions 5 | // 6 | 7 | annotate service1.RootEntities { 8 | ID @UI.Hidden @readonly @mandatory @UI.ExcludeFromNavigationContext; 9 | stringProperty @Core.Immutable @mandatory @UI.ExcludeFromNavigationContext; //Search-Term: #CreationDialog 10 | uom @UI.Hidden; 11 | 12 | association2one @( 13 | //Search-Term: #Navigation 14 | //Semantic Object annotation in order to show the links to the semantic object apps in the quick view facet 15 | Common.SemanticObject : 'FeatureShowcaseChildEntity2', 16 | Common.SemanticObjectMapping : [ 17 | { 18 | // Semantic object mapping is done, to set filter values when navigation to the semantic object map 19 | // No logical sensen behind the connection - just to demonstrate 20 | $Type : 'Common.SemanticObjectMappingType', 21 | LocalProperty : integerValue, 22 | SemanticObjectProperty : 'field3', 23 | }, 24 | ], 25 | ); 26 | 27 | fieldWithURLtext @UI.HiddenFilter @HTML5.LinkTarget : '_blank'; //Search-Term: #HideFilter, #Link 28 | 29 | /** Search-Term: #FilterDefault 30 | For a default filter value in the list report. Does not support complex values */ 31 | //stringProperty @Common.FilterDefaultValue : 'Root entity 4'; 32 | 33 | region @UI.HiddenFilter; //Filter not available in the list report 34 | deletePossible @UI.Hidden; 35 | updateHidden @UI.Hidden; 36 | fieldWithURL @UI.Hidden; 37 | 38 | email @mandatory; 39 | }; 40 | 41 | annotate service1.RootEntities actions { 42 | //Search-Terms: #SideEffect, #ParameterDefaultValue 43 | changeProgress @( 44 | //Update the UI after action 45 | Common.SideEffects : { 46 | TargetProperties : ['in/integerValue'] 47 | }, 48 | Core.OperationAvailable: {$edmJson: {$If: [{$Ge: [{$Path: 'in/integerValue'}, 0]}, true, false]}} 49 | ) 50 | } 51 | 52 | 53 | annotate service1.ChildEntities1 { 54 | ID @UI.Hidden @readonly @mandatory; 55 | parent @UI.Hidden; 56 | field @Core.Immutable @mandatory; 57 | }; 58 | 59 | annotate service1.criticalAction with @( 60 | Common.IsActionCritical : true //Search-Term: #CriticalAction 61 | ); 62 | 63 | annotate service1.GrandChildEntities { 64 | ID @UI.Hidden @readonly @mandatory; 65 | parent @UI.Hidden; 66 | }; 67 | 68 | annotate service1.ChildEntities2 { 69 | ID @UI.Hidden @readonly @mandatory; 70 | }; 71 | 72 | annotate service1.ChartDataEntities { 73 | ID @UI.Hidden @readonly @mandatory; 74 | parent @UI.Hidden @Core.Immutable; 75 | 76 | areaChartDeviationLowerBoundValue @UI.HiddenFilter; 77 | areaChartDeviationUpperBoundValue @UI.HiddenFilter; 78 | areaChartToleranceLowerBoundValue @UI.HiddenFilter; 79 | areaChartToleranceUpperBoundValue @UI.HiddenFilter; 80 | } -------------------------------------------------------------------------------- /app/featureShowcase/labels.cds: -------------------------------------------------------------------------------- 1 | using { sap.fe.featureShowcase as schema } from '../../db/schema'; 2 | 3 | // 4 | // annotations that control rendering of fields and labels 5 | // 6 | 7 | annotate schema.RootEntities with{ 8 | childEntities1 @title : '{i18n>childEntities1}'; 9 | stringProperty @title : '{i18n>semanticKeyField}'; 10 | integerValue @title : '{i18n>integerValue}'; 11 | forecastValue @title : '{i18n>forecastValue}'; 12 | targetValue @title : '{i18n>targetValue}'; 13 | dimensions @title : '{i18n>dimensions}'; 14 | starsValue @title : '{i18n>stars}'; 15 | isoCurrency @title : '{i18n>currencyForFieldWithPrice}'; 16 | fieldWithCriticality @title : '{i18n>fieldWithCriticality}'; 17 | contact @title : '{i18n>contact}'; 18 | validFrom @title : '{i18n>date}'; 19 | validTo @title : '{i18n>dateTo}'; 20 | time @title : '{i18n>time}'; 21 | timeStamp @title : '{i18n>timeStamp}'; 22 | 23 | fieldWithPrice @title : '{i18n>fieldWithPrice}' @(Measures.ISOCurrency: isoCurrency_code ); //Search-Term: #Units 24 | fieldWithUoM @title : '{i18n>fieldWithUoM}' @(Measures.Unit : uom_code); //Search-Term: #Units 25 | imageUrl @title : '{i18n>image}' @UI.IsImageURL; //Displaying the image instead of the link //Search-Term: #Image 26 | 27 | association2one @title : '{i18n>ChildEntity2}' @Common.Text : association2one.stringProperty @Common.TextArrangement : #TextOnly; 28 | criticality_code @title : '{i18n>criticality}' @Common.Text : criticality.name @Common.TextArrangement : #TextFirst; //Search-Term: #DisplayTextAndID 29 | country @title : '{i18n>country}' @Common.Text : country.name @Common.TextArrangement : #TextFirst; 30 | 31 | description @title : '{i18n>description}' @UI.MultiLineText; //Search-Term: #MultiLineText 32 | description_customGrowing @title : '{i18n>description2}' @UI.MultiLineText @UI.Placeholder : 'max.mustermann@sap.com'; 33 | region @title : '{i18n>region}' @UI.Placeholder : 'Select a region'; //Search-Term: #Placeholder 34 | email @title : '{i18n>email}' @Communication.IsEmailAddress; //Search-Term: #CommunicationFields 35 | telephone @title : '{i18n>telephone}' @Communication.IsPhoneNumber; //Search-Term: #CommunicationFields 36 | }; 37 | 38 | annotate schema.ChildEntities1 with @title : '{i18n>childEntities1}' { 39 | field @title : '{i18n>field}'; 40 | booleanProperty @title : '{i18n>booleanProperty}'; 41 | fieldWithPerCent @title : '{i18n>fieldWithPerCent}' @(Measures.Unit : '%'); //Search-Term: #Units 42 | criticalityValue @title : '{i18n>criticality}' @Common.Text : criticalityValue.name @Common.TextArrangement : #TextFirst; 43 | }; 44 | 45 | annotate schema.GrandChildEntities with @title : '{i18n>grandChildren}' { 46 | field @title : '{i18n>field}' 47 | }; 48 | 49 | annotate schema.ChildEntities2 with @title : '{i18n>ChildEntity2}' { 50 | integerProperty @title : '{i18n>integerProperty}'; 51 | decimalProperty @title : '{i18n>decimalProperty}'; 52 | stringProperty @title : '{i18n>stringProperty}' @UI.MultiLineText; //MultiLineText for Descriptions (line break) 53 | }; 54 | 55 | annotate schema.ChildEntities3 with @title : '{i18n>childEntities3}' { 56 | field @title : '{i18n>stringProperty}' 57 | }; 58 | 59 | annotate schema.ChartDataEntities with { 60 | integerValue @title : '{i18n>integerValue}'; 61 | forecastValue @title : '{i18n>forecastValue}'; 62 | targetValue @title : '{i18n>targetValue}'; 63 | dimensions @title : '{i18n>dimensions}'; 64 | integerValueWithUoM @Measures.Unit : uom_code; 65 | }; 66 | 67 | annotate schema.UnitOfMeasureCodeList with { 68 | code @title : '{i18n>unitCode}' @Common.Text : name @Common.TextArrangement : #TextOnly 69 | }; 70 | 71 | annotate schema.Contacts with { 72 | ID @title : '{i18n>name}' @Common.Text : name @Common.TextArrangement : #TextOnly 73 | }; 74 | 75 | -------------------------------------------------------------------------------- /app/featureShowcase/layouts_ChartDataEntities.cds: -------------------------------------------------------------------------------- 1 | using service1 as service from '../../srv/service'; 2 | 3 | annotate service.ChartDataEntities with @( 4 | UI.LineItem : [ 5 | { 6 | $Type : 'UI.DataField', 7 | Value : integerValue, 8 | }, 9 | { 10 | $Type : 'UI.DataField', 11 | Value : forecastValue, 12 | }, 13 | { 14 | $Type : 'UI.DataField', 15 | Value : targetValue, 16 | }, 17 | { 18 | $Type : 'UI.DataField', 19 | Value : dimensions, 20 | }, 21 | ], 22 | UI.LineItem.@UI.Criticality : criticality_code, 23 | //Search-Term: #ChartSection 24 | UI.Chart : { 25 | Title : '{i18n>chart}', 26 | ChartType : #Column, 27 | Measures : [maxAmount], 28 | Dimensions : [dimensions], 29 | MeasureAttributes : [ 30 | { 31 | $Type : 'UI.ChartMeasureAttributeType', 32 | Measure : maxAmount, 33 | Role : #Axis1 34 | }, 35 | ], 36 | DimensionAttributes : [ 37 | { 38 | $Type : 'UI.ChartDimensionAttributeType', 39 | Dimension : dimensions, 40 | Role : #Category 41 | }, 42 | { 43 | $Type : 'UI.ChartDimensionAttributeType', 44 | Dimension : criticality_code, 45 | Role : #Category 46 | }, 47 | ], 48 | Actions : [ 49 | { 50 | $Type : 'UI.DataFieldForAction', 51 | Action : 'service1.EntityContainer/unboundAction', 52 | Label : '{i18n>unboundAction}', 53 | }, 54 | ] 55 | }, 56 | UI.Chart #areaChart : { 57 | //Search-Term: #microChartArea 58 | Title : '{i18n>areaChart}', 59 | Description : '{i18n>ThisIsAMicroChart}', 60 | ChartType : #Area, 61 | Dimensions : [dimensions], 62 | Measures : [integerValue], 63 | MeasureAttributes : [ 64 | { 65 | $Type : 'UI.ChartMeasureAttributeType', 66 | Measure : integerValue, 67 | Role : #Axis1, 68 | DataPoint : '@UI.DataPoint#areaChart', 69 | }, 70 | ], 71 | }, 72 | UI.Chart #lineChart : { 73 | //SearchTerm: #microChartLine 74 | Title : '{i18n>lineChart}', 75 | Description : '{i18n>ThisIsAMicroChart}', 76 | ChartType : #Line, 77 | Measures : [ 78 | integerValueWithUoM, 79 | targetValue, 80 | ], 81 | Dimensions : [ 82 | dimensions, 83 | dimensions 84 | ], 85 | MeasureAttributes : [ 86 | { 87 | $Type : 'UI.ChartMeasureAttributeType', 88 | Measure : integerValueWithUoM, 89 | Role : #Axis2, 90 | DataPoint : '@UI.DataPoint#lineChartWidth', 91 | }, 92 | { 93 | $Type : 'UI.ChartMeasureAttributeType', 94 | Measure : targetValue, 95 | Role : #Axis2, 96 | DataPoint : '@UI.DataPoint#lineChartDepth', 97 | }, 98 | ], 99 | }, 100 | UI.Chart #columnChart : { 101 | //Search-Term: #microChartColumn 102 | Title : '{i18n>columnChart}', 103 | Description : '{i18n>ThisIsAMicroChart}', 104 | ChartType : #Column, 105 | Measures : [integerValue], 106 | Dimensions : [dimensions], 107 | MeasureAttributes : [ 108 | { 109 | $Type : 'UI.ChartMeasureAttributeType', 110 | Measure : integerValue, 111 | Role : #Axis1, 112 | DataPoint : '@UI.DataPoint#dataPointForChart', 113 | } 114 | ] 115 | }, 116 | UI.Chart #stackedBarChart : { 117 | //Search-Term: #microChartStackedBar 118 | Title : '{i18n>stackedBarChart}', 119 | Description : '{i18n>ThisIsAMicroChart}', 120 | ChartType : #BarStacked, 121 | Measures : [integerValue], 122 | Dimensions : [dimensions], 123 | MeasureAttributes : [ 124 | { 125 | $Type : 'UI.ChartMeasureAttributeType', 126 | Measure : integerValue, 127 | Role : #Axis1, 128 | DataPoint : '@UI.DataPoint#dataPointForChart', 129 | } 130 | ] 131 | }, 132 | UI.Chart #comparisonChart : { 133 | //Search-Term: #microChartComparision 134 | Title : '{i18n>comparisonChart}', 135 | Description : '{i18n>ThisIsAMicroChart}', 136 | ChartType : #Bar, 137 | Measures : [integerValue], 138 | Dimensions : [dimensions], 139 | MeasureAttributes : [ 140 | { 141 | $Type : 'UI.ChartMeasureAttributeType', 142 | Measure : integerValue, 143 | Role : #Axis1, 144 | DataPoint : '@UI.DataPoint#dataPointForChart', 145 | } 146 | ] 147 | }, 148 | 149 | ); 150 | 151 | annotate service.ChartDataEntities with @( 152 | UI.DataPoint #areaChart : { 153 | //Search-Term: #microChartArea 154 | Value : integerValue, 155 | TargetValue : targetValue, 156 | CriticalityCalculation : { 157 | ImprovementDirection : #Target, 158 | ToleranceRangeLowValue : areaChartToleranceLowerBoundValue, 159 | ToleranceRangeHighValue : areaChartDeviationUpperBoundValue, 160 | DeviationRangeLowValue : areaChartDeviationLowerBoundValue, 161 | DeviationRangeHighValue : areaChartDeviationUpperBoundValue, 162 | }, 163 | }, 164 | UI.DataPoint #lineChartWidth : { 165 | //Search-Term: #microChartLine 166 | Value : integerValueWithUoM, 167 | Criticality : criticality_code, 168 | }, 169 | UI.DataPoint #lineChartDepth : { 170 | //Search-Term: #microChartLine 171 | Value : targetValue, 172 | Criticality : criticality_code, 173 | }, 174 | UI.DataPoint #dataPointForChart : { 175 | //Search-Terms: #microChartColumn, #microChartStackedBar, #microChartComparision 176 | Value : integerValue, 177 | Criticality : criticality_code 178 | }, 179 | ); 180 | 181 | annotate service.ChartDataEntities with @( 182 | //Search-Term: #ChartSection 183 | Analytics.AggregatedProperties : [ 184 | { 185 | Name : 'minAmount', 186 | AggregationMethod : 'min', 187 | AggregatableProperty : 'integerValue', 188 | ![@Common.Label] : 'Minimal Net Amount' 189 | }, 190 | { 191 | Name : 'maxAmount', 192 | AggregationMethod : 'max', 193 | AggregatableProperty : 'integerValue', 194 | ![@Common.Label] : 'Maximal Net Amount' 195 | }, 196 | { 197 | Name : 'avgAmount', 198 | AggregationMethod : 'average', 199 | AggregatableProperty : 'integerValue', 200 | ![@Common.Label] : 'Average Net Amount' 201 | } 202 | ], 203 | ); -------------------------------------------------------------------------------- /app/featureShowcase/layouts_ChildEntities1.cds: -------------------------------------------------------------------------------- 1 | using service1 as service from '../../srv/service'; 2 | using service1.GrandChildEntities as grandChildren from './layouts_GrandChildEntities'; 3 | 4 | /** 5 | UI.LineItem 6 | */ 7 | annotate service.ChildEntities1 with @( 8 | UI.LineItem : [ 9 | { 10 | $Type : 'UI.DataField', 11 | Value : field, 12 | }, 13 | { 14 | $Type : 'UI.DataField', 15 | Value : fieldWithPerCent, 16 | }, 17 | { 18 | $Type : 'UI.DataField', 19 | Value : booleanProperty, 20 | Criticality : criticalityValue_code, 21 | }, 22 | ], 23 | ); 24 | 25 | /** 26 | UI.HeaderInfo 27 | */ 28 | annotate service.ChildEntities1 with @( 29 | UI.HeaderInfo : { 30 | TypeName : '{i18n>childEntities1}', 31 | TypeNamePlural : '{i18n>childEntities1.typeNamePlural}', //Search-Term: #OPTableTitle 32 | Title : { 33 | Value : '{i18n>childEntities1}', 34 | }, 35 | Description : { 36 | //Search-Term: #ODataConcat 37 | Value : {$edmJson: { 38 | $Apply : [ 39 | 'Using odata.concat - Field: ', 40 | {$Path: 'field'}, 41 | ], 42 | $Function : 'odata.concat' 43 | }}, 44 | }, 45 | ImageUrl : '', 46 | TypeImageUrl : 'sap-icon://blank-tag', 47 | }, 48 | ); 49 | 50 | /** 51 | UI.HeaderFacets 52 | */ 53 | annotate service.ChildEntities1 with @( 54 | UI.HeaderFacets : [ 55 | { 56 | $Type : 'UI.ReferenceFacet', 57 | Target : '@UI.DataPoint#fieldWithPercent', 58 | ID : 'FacetWithPercent' 59 | }, 60 | ], 61 | ); 62 | 63 | /** 64 | UI.Facets 65 | */ 66 | annotate service.ChildEntities1 with @( 67 | UI.Facets : [ 68 | { 69 | $Type : 'UI.ReferenceFacet', 70 | Target : 'grandChildren/@UI.LineItem', 71 | Label : '{i18n>grandChildren}' 72 | }, 73 | ], 74 | ); 75 | 76 | /** 77 | UI.DataPoint 78 | */ 79 | annotate service.ChildEntities1 with @( 80 | UI.DataPoint #fieldWithPercent : { 81 | Value : fieldWithPerCent, 82 | Title : '{i18n>fieldWithPerCent}', 83 | Visualization : #Number, 84 | }, 85 | ); 86 | 87 | /** 88 | UI.PresentationVariant 89 | */ 90 | annotate service.ChildEntities1 with @( 91 | UI.PresentationVariant : { 92 | SortOrder : [ 93 | { 94 | Property : field, 95 | Descending : false, 96 | }, 97 | ], 98 | Visualizations : ['@UI.LineItem'], 99 | }, 100 | ); 101 | /** 102 | UI.SelectionVariant 103 | */ 104 | annotate service.ChildEntities1 with @( 105 | //If more then 3 variants are enabled, they are displayed as a dropdown menu 106 | UI.SelectionVariant #variant1 : { 107 | Text : '{i18n>variant1ChildEntities1}', 108 | SelectOptions : [ 109 | { 110 | PropertyName : criticalityValue_code, 111 | Ranges : [ 112 | { 113 | Sign : #I, 114 | High : 5, 115 | Option : #BT, 116 | Low : 0, 117 | }, 118 | ], 119 | }, 120 | ], 121 | }, 122 | UI.SelectionVariant #variant2 : { 123 | Text : '{i18n>variant2ChildEntities1}', 124 | SelectOptions : [ 125 | { 126 | PropertyName : criticalityValue_code, 127 | Ranges : [ 128 | { 129 | Sign : #I, 130 | Option : #EQ, 131 | Low : 3, 132 | }, 133 | ], 134 | }, 135 | ], 136 | }, 137 | UI.SelectionVariant #variant3 : { 138 | Text : '{i18n>variant3ChildEntities1}', 139 | SelectOptions : [ 140 | { 141 | PropertyName : criticalityValue_code, 142 | Ranges : [ 143 | { 144 | Sign : #I, 145 | Option : #EQ, 146 | Low : 2, 147 | }, 148 | ], 149 | }, 150 | ], 151 | }, 152 | UI.SelectionVariant #variant4 : { 153 | Text : '{i18n>variant4ChildEntities1}', 154 | SelectOptions : [ 155 | { 156 | PropertyName : criticalityValue_code, 157 | Ranges : [ 158 | { 159 | Sign : #I, 160 | Option : #EQ, 161 | Low : 1, 162 | }, 163 | ], 164 | }, 165 | ], 166 | }, 167 | ); -------------------------------------------------------------------------------- /app/featureShowcase/layouts_ChildEntities2.cds: -------------------------------------------------------------------------------- 1 | using service1 as service from '../../srv/service'; 2 | 3 | /** 4 | UI.FieldGroup 5 | */ 6 | annotate service1.ChildEntities2 with @( 7 | UI.FieldGroup #data : { 8 | Data : [ 9 | {Value : stringProperty, @Common.FieldControl : #ReadOnly}, 10 | {Value : integerProperty, @Common.FieldControl : #ReadOnly}, 11 | {Value : decimalProperty, @Common.FieldControl : #ReadOnly}, 12 | {Value : country_code, @Common.FieldControl : #ReadOnly} 13 | ], 14 | }, 15 | ) { 16 | country @Common.Text : country.name @Common.TextArrangement #TextFirst; 17 | }; 18 | 19 | /** 20 | UI.HeaderInfo 21 | Search-Term: #QuickView 22 | */ 23 | annotate service1.ChildEntities2 with @( 24 | //Header Info is also displayed in a quick view facet 25 | UI.HeaderInfo : { 26 | TypeName : '{i18n>ChildEntity2}', 27 | TypeNamePlural : '{i18n>ChildEntity2.typeNamePlural}', 28 | Title : { 29 | $Type : 'UI.DataField', 30 | Value : '{i18n>ChildEntity2}', 31 | }, 32 | Description : { 33 | $Type : 'UI.DataField', 34 | Value : stringProperty, 35 | }, 36 | ImageUrl : '', 37 | TypeImageUrl : 'sap-icon://blank-tag', 38 | }, 39 | ); 40 | 41 | /** 42 | UI.QuickViewFacets 43 | Search-Term: #QuickView 44 | */ 45 | annotate service1.ChildEntities2 with @( 46 | /* 47 | When a semantic object for the entity is defined, the related apps will be shown 48 | below the quick view facet on the panel. 49 | */ 50 | UI.QuickViewFacets : [ 51 | { 52 | $Type : 'UI.ReferenceFacet', 53 | Target : '@UI.FieldGroup#data', 54 | Label : '{i18n>ChildEntity2}', 55 | } 56 | ], 57 | ); -------------------------------------------------------------------------------- /app/featureShowcase/layouts_ChildEntities3.cds: -------------------------------------------------------------------------------- 1 | using service1 as service from '../../srv/service'; 2 | 3 | /** 4 | UI.LineItem 5 | */ 6 | annotate service1.ChildEntities3 with @( 7 | UI.LineItem : [ 8 | { 9 | $Type : 'UI.DataField', 10 | Value : field, 11 | }, 12 | ], 13 | ); -------------------------------------------------------------------------------- /app/featureShowcase/layouts_GrandChildEntities.cds: -------------------------------------------------------------------------------- 1 | using service1 as service from '../../srv/service'; 2 | 3 | /** 4 | UI.LineItem 5 | */ 6 | annotate service1.GrandChildEntities with @( 7 | UI.LineItem : [ 8 | { 9 | $Type : 'UI.DataField', 10 | Value : field, 11 | }, 12 | ], 13 | ); -------------------------------------------------------------------------------- /app/featureShowcase/layouts_RootEntityVariants.cds: -------------------------------------------------------------------------------- 1 | using service1 as service from '../../srv/service'; 2 | 3 | /** 4 | UI.LineItem 5 | */ 6 | annotate service1.RootEntityVariants with @( 7 | UI.LineItem : [ 8 | { 9 | $Type : 'UI.DataField', 10 | Value : stringProperty, 11 | ![@UI.Importance] : #High, 12 | }, 13 | { 14 | $Type : 'UI.DataField', 15 | Value : fieldWithPrice, 16 | ![@UI.Importance] : #High, 17 | }, 18 | { 19 | $Type : 'UI.DataField', 20 | Value : fieldWithUoM, 21 | ![@UI.Importance] : #High, 22 | }, 23 | { 24 | $Type : 'UI.DataField', 25 | Value : fieldWithCriticality, 26 | Criticality : criticality_code, 27 | CriticalityRepresentation : #WithIcon, 28 | ![@UI.Importance] : #High, 29 | }, 30 | ], 31 | ); 32 | 33 | /** 34 | UI.SelectionVariant 35 | */ 36 | annotate service1.RootEntityVariants with @( 37 | UI.SelectionVariant #variant3 : { 38 | Text : '{i18n>variant3RootEntityVariants}', 39 | SelectOptions : [ 40 | { 41 | PropertyName : criticality_code, 42 | Ranges : [ 43 | { 44 | Sign : #I, 45 | High : 3, 46 | Option : #BT, 47 | Low : 0, 48 | }, 49 | ], 50 | }, 51 | ], 52 | }, 53 | UI.SelectionVariant #variant1 : { 54 | Text : '{i18n>variant1ForRootEntityVariants}', 55 | SelectOptions : [ 56 | { 57 | PropertyName : criticality_code, 58 | Ranges : [ 59 | { 60 | Sign : #I, 61 | High : 2, 62 | Option : #BT, 63 | Low : 0, 64 | }, 65 | ], 66 | }, 67 | ], 68 | }, 69 | UI.SelectionVariant #variant2 : { 70 | Text : '{i18n>variant2ForRootEntityVariants}', 71 | SelectOptions : [ 72 | { 73 | PropertyName : criticality_code, 74 | Ranges : [ 75 | { 76 | Sign : #I, 77 | Option : #EQ, 78 | Low : 3, 79 | }, 80 | ], 81 | }, 82 | ], 83 | }, 84 | ); 85 | 86 | /** 87 | UI.SelectionPresentationVariant 88 | */ 89 | annotate service1.RootEntityVariants with @( 90 | UI.SelectionPresentationVariant #SelectionPresentationVariant : { 91 | Text : '{i18n>SPV for RootEntityVariants}', 92 | SelectionVariant : { 93 | SelectOptions : [ 94 | { 95 | PropertyName : criticality_code, 96 | Ranges : [ 97 | { 98 | Sign : #I, 99 | High : 2, 100 | Option : #BT, 101 | Low : 0, 102 | }, 103 | ], 104 | }, 105 | ], 106 | }, 107 | PresentationVariant : { 108 | SortOrder : [ 109 | { 110 | Property : fieldWithPrice, 111 | Descending : false, 112 | }, 113 | ], 114 | }, 115 | }, 116 | ); 117 | -------------------------------------------------------------------------------- /app/featureShowcase/layouts_contacts.cds: -------------------------------------------------------------------------------- 1 | using service1 as service from '../../srv/service'; 2 | 3 | /** 4 | Communication 5 | Search-Term: #Contact 6 | */ 7 | annotate service1.Contacts with @( 8 | Communication.Contact : { 9 | fn : name, //full name 10 | kind : #org, 11 | tel : [{ 12 | uri : phone, 13 | type : #preferred 14 | }], 15 | adr : [{ 16 | building : building, 17 | country : country.name, 18 | street : street, 19 | locality : city, 20 | code : postCode, 21 | type : #preferred 22 | }], 23 | }, 24 | //Search-Term: #AddressFacet 25 | Communication.Address : { 26 | building : building, 27 | street : street, 28 | locality : city, 29 | code : postCode, 30 | country : country.name, 31 | label : addressLabel, 32 | type : #preferred, 33 | } 34 | ); -------------------------------------------------------------------------------- /app/featureShowcase/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "featureShowcase", 3 | "version": "0.0.1", 4 | "description": "A SAP Fiori application.", 5 | "keywords": [ 6 | "ui5", 7 | "openui5", 8 | "sapui5" 9 | ], 10 | "main": "webapp/index.html", 11 | "scripts": { 12 | "deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf" 13 | }, 14 | "devDependencies": { 15 | "@ui5/cli": "^2.11.1", 16 | "@ui5/fs": "^2.0.6", 17 | "@ui5/logger": "^2.0.1", 18 | "@sap/ux-ui5-tooling": "1", 19 | "rimraf": "3.0.2", 20 | "@sap/ux-specification": "latest" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/featureShowcase/ui5.yaml: -------------------------------------------------------------------------------- 1 | specVersion: '2.4' 2 | metadata: 3 | name: 'featureShowcase' 4 | type: application 5 | server: 6 | customMiddleware: 7 | - name: fiori-tools-proxy 8 | afterMiddleware: compression 9 | configuration: 10 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted 11 | backend: 12 | - path: /srv1 13 | url: http://localhost:4004 14 | ui5: 15 | path: 16 | - /resources 17 | - /test-resources 18 | url: https://ui5.sap.com 19 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version 20 | - name: fiori-tools-appreload 21 | afterMiddleware: compression 22 | configuration: 23 | port: 35729 24 | path: webapp 25 | -------------------------------------------------------------------------------- /app/featureShowcase/value-helps.cds: -------------------------------------------------------------------------------- 1 | using { sap.fe.featureShowcase as schema } from '../../db/schema'; 2 | 3 | // 4 | // annotations for value helps 5 | // Search-Term: #ValueHelps 6 | // 7 | 8 | annotate schema.RootEntities with{ 9 | uom @Common.ValueListWithFixedValues; //Instead of dialog box, the value help is a dropdown 10 | criticality_code @(Common : { 11 | ValueListWithFixedValues: true, 12 | // Search-Term: #RadioButtons | Render Value help with radio buttons 13 | ValueListWithFixedValues.@Common.ValueListShowValuesImmediately, 14 | ValueList : { 15 | Label : '{i18n>criticality}', 16 | CollectionPath : 'Criticality', 17 | Parameters : [ 18 | { 19 | $Type : 'Common.ValueListParameterInOut', 20 | ValueListProperty : 'code', 21 | LocalDataProperty : criticality_code 22 | }, 23 | ] 24 | } 25 | }); 26 | 27 | //To have a Value help when editing and to show the name instead of the UUID 28 | contact @(Common : { 29 | Text : contact.name, 30 | TextArrangement : #TextOnly, 31 | ValueList : { 32 | Label : '{i18n>customer}', //Title of the value help dialog 33 | CollectionPath : 'Contacts', //Entities of the value help. Refers to an entity name from the CAP service 34 | Parameters : [ 35 | { 36 | $Type : 'Common.ValueListParameterInOut', 37 | ValueListProperty : 'ID', //Binding between ID and contact_ID, that everything works 38 | LocalDataProperty : contact_ID 39 | }, 40 | { 41 | $Type : 'Common.ValueListParameterDisplayOnly', //Displays additional information from the entity set of the value help 42 | ValueListProperty : 'country_code', 43 | }, 44 | { 45 | $Type : 'Common.ValueListParameterDisplayOnly', 46 | ValueListProperty : 'city', 47 | } 48 | 49 | ] 50 | } 51 | }); 52 | association2one @(Common : { 53 | ValueListWithFixedValues: true, 54 | ValueList : { 55 | Label : '{i18n>ChildEntity2}', 56 | CollectionPath : 'ChildEntities2', 57 | Parameters : [ 58 | { 59 | $Type : 'Common.ValueListParameterInOut', 60 | ValueListProperty : 'ID', 61 | LocalDataProperty : association2one_ID 62 | }, 63 | { 64 | $Type : 'Common.ValueListParameterDisplayOnly', 65 | ValueListProperty : 'stringProperty', 66 | }, 67 | { 68 | $Type : 'Common.ValueListParameterDisplayOnly', 69 | ValueListProperty : 'integerProperty', 70 | }, 71 | { 72 | $Type : 'Common.ValueListParameterDisplayOnly', 73 | ValueListProperty : 'decimalProperty', 74 | }, 75 | { 76 | $Type : 'Common.ValueListParameterDisplayOnly', 77 | ValueListProperty : 'country_code', 78 | } 79 | 80 | ] 81 | } 82 | }); 83 | //Search-Term: #DependentFilter 84 | region @(Common : { 85 | Text : region.name, 86 | TextArrangement : #TextFirst, 87 | ValueListWithFixedValues: true, 88 | ValueList : { 89 | Label : '{i18n>Region}', 90 | CollectionPath : 'Regions', 91 | Parameters : [ 92 | { 93 | $Type : 'Common.ValueListParameterInOut', 94 | ValueListProperty : 'code', 95 | LocalDataProperty : region_code 96 | }, 97 | { 98 | $Type : 'Common.ValueListParameterOut', 99 | ValueListProperty : 'name', 100 | LocalDataProperty : region.name, 101 | }, 102 | //To only show the connected values 103 | { 104 | $Type : 'Common.ValueListParameterFilterOnly', 105 | ValueListProperty : 'country_code', 106 | }, 107 | { 108 | $Type : 'Common.ValueListParameterIn', //Input parameter used for filtering 109 | LocalDataProperty : country_code, 110 | ValueListProperty : 'country_code', 111 | }, 112 | 113 | ] 114 | } 115 | }); 116 | }; 117 | 118 | annotate schema.AssignedRegions with { 119 | //Search-Term: #MultiValueWithDependentFilter 120 | region @(Common : { 121 | Text : region.name, 122 | TextArrangement : #TextFirst, 123 | ValueListWithFixedValues: true, 124 | ValueList : { 125 | Label : '{i18n>Region}', 126 | CollectionPath : 'Regions', 127 | Parameters : [ 128 | { 129 | $Type : 'Common.ValueListParameterInOut', 130 | ValueListProperty : 'code', 131 | LocalDataProperty : region_code 132 | }, 133 | { 134 | $Type : 'Common.ValueListParameterIn', //Input parameter used for filtering 135 | LocalDataProperty : root.country_code, 136 | ValueListProperty : 'country_code', 137 | }, 138 | 139 | ] 140 | } 141 | }); 142 | } -------------------------------------------------------------------------------- /app/featureShowcase/webapp/Component.js: -------------------------------------------------------------------------------- 1 | sap.ui.define(['sap/fe/core/AppComponent'], function(AppComponent) { 2 | 'use strict'; 3 | 4 | return AppComponent.extend("sap.fe.featureShowcase.mainApp.Component", { 5 | metadata: { 6 | manifest: "json" 7 | } 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomActions.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/m/MessageBox", 3 | "sap/ui/core/library" 4 | ], function(MessageBox, coreLibrary) { 5 | "use strict"; 6 | //Search-Term: CustomActions 7 | return { 8 | messageBox: function() { 9 | MessageBox.alert("Button pressed"); 10 | }, 11 | enabled : function() { 12 | return true; 13 | }, 14 | enabledForSingleSelect: function(oBindingContext, aSelectedContexts) { 15 | if (aSelectedContexts && aSelectedContexts.length === 1) { 16 | return true; 17 | } 18 | return false; 19 | } 20 | }; 21 | }); -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomColumn-DateRangeLR.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomColumn-ProcessFlow.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomController.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/library" 3 | ], function(coreLibrary) { 4 | "use strict"; 5 | 6 | return { 7 | //Search-Term: #EditFlowAPI 8 | onChangeCriticality: function(oEvent) { 9 | let sActionName = "service1.changeCriticality"; 10 | let mParameters = { 11 | contexts: oEvent.getSource().getBindingContext(), 12 | model: oEvent.getSource().getModel(), 13 | label: 'Confirm', 14 | invocationGrouping: true 15 | }; 16 | this.editFlow.invokeAction(sActionName, mParameters); //SAP Fiori elements EditFlow API 17 | }, 18 | 19 | //Function for Micro Process Flow in Custom Column 20 | itemPressColumn: function(oEvent) { 21 | const oPopover = itemPress(oEvent); 22 | const thisHelp = this; 23 | const closeSideContent = function() { 24 | thisHelp.showSideContent("childEntities1Section",false); 25 | }; 26 | 27 | oPopover.attachBeforeClose(closeSideContent); 28 | this.showSideContent("childEntities1Section",true); 29 | oPopover.openBy(oEvent.getParameter("item")); 30 | }, 31 | //Function for Micro Process Flow in Custom Header Facet 32 | itemPressHeader: function(oEvent) { 33 | const oPopover = itemPress(oEvent); 34 | oPopover.openBy(oEvent.getParameter("item")); 35 | } 36 | }; 37 | 38 | function itemPress(oEvent) { 39 | const oItem = oEvent.getSource(), 40 | aCustomData = oItem.getCustomData(), 41 | sTitle = aCustomData[0].getValue(), 42 | sIcon = aCustomData[1].getValue(), 43 | sSubTitle = aCustomData[2].getValue(), 44 | sDescription = aCustomData[3].getValue(); 45 | 46 | let colorState; 47 | switch (oItem.getState()) { 48 | case "Error" : colorState= coreLibrary.IconColor.Negative; break; 49 | case "Warning" : colorState= coreLibrary.IconColor.Critical; break; 50 | case "Success" : colorState= coreLibrary.IconColor.Positive; break; 51 | } 52 | const oPopover = new sap.m.Popover({ 53 | contentWidth: "300px", 54 | title: "Order status", 55 | content: [ 56 | new sap.m.HBox({ 57 | items: [ 58 | new sap.ui.core.Icon({ 59 | src: sIcon, 60 | color: colorState 61 | }).addStyleClass("sapUiSmallMarginBegin sapUiSmallMarginEnd"), 62 | new sap.m.FlexBox({ 63 | width: "100%", 64 | renderType: "Bare", 65 | direction: "Column", 66 | items: [new sap.m.Title({ 67 | level: sap.ui.core.TitleLevel.H1, 68 | text: sTitle 69 | }), new sap.m.Text({ 70 | text: sSubTitle 71 | }).addStyleClass("sapUiSmallMarginBottom sapUiSmallMarginTop"), 72 | new sap.m.Text({ 73 | text: sDescription 74 | }) 75 | ] 76 | }) 77 | ] 78 | }).addStyleClass("sapUiTinyMargin") 79 | ], 80 | footer: [ 81 | new sap.m.Toolbar({ 82 | content: [ 83 | new sap.m.ToolbarSpacer(), 84 | new sap.m.Button({ 85 | text: "Close", 86 | press: function() { 87 | oPopover.close(); 88 | } 89 | })] 90 | }) 91 | ] 92 | }); 93 | return oPopover; 94 | } 95 | }); -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomField-DatePicker.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomField-DateRange.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomFilter-Rating.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomFilter-Rating.js: -------------------------------------------------------------------------------- 1 | sap.ui.define(["sap/ui/model/Filter", "sap/ui/model/FilterOperator"], function(Filter, FilterOperator) { 2 | "use strict"; 3 | 4 | return { 5 | //Search-Term: "customFilter" 6 | onReset: function(oEvent) { 7 | this.setFilterValues("starsValue"); 8 | } 9 | }; 10 | }); 11 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomHeaderFacet-Edit.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomHeaderFacet-ProcessFlow.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/featureShowcase/webapp/ext/CustomSection.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |