@sap/cds-dk 9.4.3 → 9.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/bin/compile/index.js +1 -1
  3. package/bin/env.js +3 -3
  4. package/bin/export.js +1 -1
  5. package/bin/help.js +0 -1
  6. package/bin/import.js +8 -3
  7. package/bin/repl.js +7 -11
  8. package/bin/up.js +159 -23
  9. package/bin/util/containerize.js +79 -25
  10. package/bin/version.js +4 -4
  11. package/lib/bind/k8s.js +1 -1
  12. package/lib/build/plugins/helm/files/templates/_deployment_helpers.tpl +1 -1
  13. package/lib/build/plugins/helm/index.js +1 -1
  14. package/lib/build/provider/hana/2migration.js +16 -24
  15. package/lib/build/provider/hana/index.js +1 -1
  16. package/lib/build/provider/hana/template/.hdiconfig-all +7 -1
  17. package/lib/build/provider/hana/template/package.json +1 -1
  18. package/lib/build/provider/internalBuildPlugin.js +15 -1
  19. package/lib/build/provider/java/index.js +12 -1
  20. package/lib/build/provider/mtx-sidecar/index.js +2 -1
  21. package/lib/build/provider/nodejs/index.js +2 -1
  22. package/lib/build/util.js +36 -19
  23. package/lib/compile/to_openapi.js +1 -5
  24. package/lib/import/common.js +9 -2
  25. package/lib/import/odata/ParserContext.js +1 -0
  26. package/lib/import/odata/v4parser.js +57 -25
  27. package/lib/import/openapi/importOpenAPI.js +6 -1
  28. package/lib/init/constants.js +1 -1
  29. package/lib/init/index.js +20 -6
  30. package/lib/init/merge.js +16 -0
  31. package/lib/init/projectReader.js +34 -8
  32. package/lib/init/registries/mta.js +2 -2
  33. package/lib/init/template/ams/index.js +3 -3
  34. package/lib/init/template/app-frontend/files/app-package.json.hbs +1 -7
  35. package/lib/init/template/app-frontend/files/ui5.yaml.hbs +21 -1
  36. package/lib/init/template/app-frontend/index.js +2 -6
  37. package/lib/init/template/application-logging/index.js +11 -16
  38. package/lib/init/template/approuter/files/mta.yaml.hbs +0 -2
  39. package/lib/init/template/approuter/index.js +13 -10
  40. package/lib/init/template/attachments/index.js +4 -2
  41. package/lib/init/template/audit-logging/index.js +4 -2
  42. package/lib/init/template/cloud-logging/index.js +6 -5
  43. package/lib/init/template/connectivity/index.js +2 -2
  44. package/lib/init/template/console/files/package.json +5 -0
  45. package/lib/init/template/console/index.js +25 -0
  46. package/lib/init/template/containerize/index.js +4 -6
  47. package/lib/init/template/data/as-json.js +18 -20
  48. package/lib/init/template/destination/index.js +4 -2
  49. package/lib/init/template/dynatrace/files/package.json.hbs +2 -2
  50. package/lib/init/template/dynatrace/index.js +4 -4
  51. package/lib/init/template/enterprise-messaging/files/mta.yaml.hbs +3 -1
  52. package/lib/init/template/enterprise-messaging/index.js +4 -2
  53. package/lib/init/template/enterprise-messaging-shared/index.js +4 -2
  54. package/lib/init/template/github-actions/files/workflows/cf.yaml.hbs +16 -1
  55. package/lib/init/template/github-actions/files/workflows/release.yaml.hbs +2 -2
  56. package/lib/init/template/github-actions/files/workflows/test.yaml.hbs +20 -0
  57. package/lib/init/template/github-actions/index.js +7 -10
  58. package/lib/init/template/hana/files/db/package.json +2 -2
  59. package/lib/init/template/hana/files/mta.yaml.hbs +0 -4
  60. package/lib/init/template/hana/index.js +7 -9
  61. package/lib/init/template/helm/index.js +8 -10
  62. package/lib/init/template/helm-unified-runtime/index.js +1 -4
  63. package/lib/init/template/html5-repo/files/app-package.json.hbs +1 -7
  64. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +21 -1
  65. package/lib/init/template/html5-repo/index.js +14 -18
  66. package/lib/init/template/ias/files/values.yaml.hbs +6 -6
  67. package/lib/init/template/ias/index.js +13 -21
  68. package/lib/init/template/java/index.js +14 -0
  69. package/lib/init/template/kafka/index.js +4 -2
  70. package/lib/init/template/{containerize → kyma}/files/containerize.yaml.hbs +17 -2
  71. package/lib/init/template/kyma/index.js +129 -5
  72. package/lib/init/template/malware-scanner/files/mta.yaml.hbs +3 -1
  73. package/lib/init/template/malware-scanner/files/values.yaml +3 -1
  74. package/lib/init/template/malware-scanner/index.js +4 -2
  75. package/lib/init/template/multitenancy/files/mta.yaml.hbs +1 -3
  76. package/lib/init/template/multitenancy/files/values.yaml.hbs +8 -0
  77. package/lib/init/template/multitenancy/index.js +15 -7
  78. package/lib/init/template/nodejs/files/.vscode/extensions.json +0 -3
  79. package/lib/init/template/nodejs/files/package.json.hbs +1 -1
  80. package/lib/init/template/pipeline/files/app-package.json.hbs +1 -7
  81. package/lib/init/template/pipeline/files/ui5.yaml.hbs +21 -1
  82. package/lib/init/template/pipeline/index.js +1 -2
  83. package/lib/init/template/portal/files/mta.yaml.hbs +5 -3
  84. package/lib/init/template/portal/index.js +8 -8
  85. package/lib/init/template/postgres/index.js +2 -2
  86. package/lib/init/template/redis/index.js +2 -3
  87. package/lib/init/template/redis-messaging/index.js +2 -3
  88. package/lib/init/template/sample/files/_i18n/i18n_de.properties +21 -0
  89. package/lib/init/template/sample/files/_i18n/i18n_en.properties +21 -0
  90. package/lib/init/template/sample/files/_i18n/i18n_fr.properties +21 -0
  91. package/lib/init/template/sample/files/_i18n/messages_de.properties +34 -0
  92. package/lib/init/template/sample/files/_i18n/messages_en.properties +34 -0
  93. package/lib/init/template/sample/files/_i18n/messages_fr.properties +34 -0
  94. package/lib/init/template/sample/files/app/_i18n/i18n.properties +13 -25
  95. package/lib/init/template/sample/files/app/_i18n/i18n_de.properties +13 -25
  96. package/lib/init/template/sample/files/app/admin-authors/fiori-service.cds +52 -0
  97. package/lib/init/template/sample/files/app/admin-authors/webapp/Component.js.hbs +3 -0
  98. package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n.properties +3 -0
  99. package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n_de.properties +3 -0
  100. package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n_en.properties +3 -0
  101. package/lib/init/template/sample/files/app/admin-authors/webapp/manifest.json +130 -0
  102. package/lib/init/template/sample/files/app/admin-books/fiori-service.cds +81 -88
  103. package/lib/init/template/sample/files/app/admin-books/webapp/Component.js.hbs +3 -0
  104. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n.properties +3 -3
  105. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_de.properties +3 -3
  106. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_en.properties +3 -3
  107. package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +24 -48
  108. package/lib/init/template/sample/files/app/appconfig/fioriSandboxConfig.json +56 -5
  109. package/lib/init/template/sample/files/app/browse/fiori-service.cds +30 -30
  110. package/lib/init/template/sample/files/app/browse/webapp/Component.js.hbs +3 -0
  111. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +3 -4
  112. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_de.properties +3 -3
  113. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_en.properties +3 -4
  114. package/lib/init/template/sample/files/app/browse/webapp/manifest.json +19 -24
  115. package/lib/init/template/sample/files/app/common.cds +127 -158
  116. package/lib/init/template/sample/files/app/fiori-apps.html +50 -0
  117. package/lib/init/template/sample/files/app/genres/fiori-service.cds +33 -0
  118. package/lib/init/template/sample/files/app/genres/tree-view.cds +42 -0
  119. package/lib/init/template/sample/files/app/genres/value-help.cds +6 -0
  120. package/lib/init/template/sample/files/app/genres/webapp/Component.js.hbs +3 -0
  121. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n.properties +3 -0
  122. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n_de.properties +3 -0
  123. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n_en.properties +3 -0
  124. package/lib/init/template/sample/files/app/genres/webapp/manifest.json +126 -0
  125. package/lib/init/template/sample/files/app/services.cds +6 -2
  126. package/lib/init/template/sample/files/db/currencies.cds +13 -0
  127. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Books.csv +5 -5
  128. package/lib/init/template/sample/files/db/data/{sap.capire.bookshop-Books_texts.csv → sap.capire.bookshop-Books.texts.csv} +4 -4
  129. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Genres.csv +42 -15
  130. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Genres.texts.csv +43 -0
  131. package/lib/init/template/sample/files/db/data/sap.common-Currencies.csv +12 -0
  132. package/lib/init/template/sample/files/db/data/sap.common-Currencies.texts.csv +15 -0
  133. package/lib/init/template/sample/files/db/hana/index.cds +10 -0
  134. package/lib/init/template/sample/files/db/schema.cds +35 -22
  135. package/lib/init/template/sample/files/db/sqlite/index.cds +10 -0
  136. package/lib/init/template/sample/files/package.json.hbs +14 -1
  137. package/lib/init/template/sample/files/srv/access-control.cds +3 -0
  138. package/lib/init/template/sample/files/srv/admin-service.cds +3 -2
  139. package/lib/init/template/sample/files/srv/cat-service.cds +7 -11
  140. package/lib/init/template/sample/index.js +40 -18
  141. package/lib/init/template/sqlite/files/package.json.hbs +13 -0
  142. package/lib/init/template/sqlite/index.js +1 -1
  143. package/lib/init/template/telemetry/index.js +1 -3
  144. package/lib/init/template/typescript/files/package.json +1 -1
  145. package/lib/init/template/workzone-standard/files/mta.yaml.hbs +0 -5
  146. package/lib/init/template/workzone-standard/index.js +0 -1
  147. package/lib/init/template/xsuaa/files/mta.yaml.hbs +4 -0
  148. package/lib/init/template/xsuaa/index.js +7 -6
  149. package/lib/lint/Linter.js +10 -4
  150. package/lib/lint/eslintHelp.json +1 -1
  151. package/lib/mtx/tenant_action.js +12 -4
  152. package/lib/util/checksum.js +41 -0
  153. package/lib/util/fs.js +8 -1
  154. package/lib/util/glob.js +26 -13
  155. package/lib/util/question.js +60 -7
  156. package/npm-shrinkwrap.json +141 -118
  157. package/package.json +2 -2
  158. package/lib/init/template/app-frontend/files/ui5-deploy.yaml.hbs +0 -25
  159. package/lib/init/template/github-actions/files/cf-setup/action.yaml +0 -53
  160. package/lib/init/template/html5-repo/files/ui5-deploy.yaml.hbs +0 -25
  161. package/lib/init/template/pipeline/files/ui5-deploy.yaml.hbs +0 -25
  162. package/lib/init/template/sample/files/app/admin-books/webapp/Component.js +0 -8
  163. package/lib/init/template/sample/files/app/browse/webapp/Component.js +0 -7
  164. package/lib/init/template/sample/files/app/index.html +0 -32
  165. package/lib/init/template/sqlite/files/package.json +0 -5
  166. /package/lib/init/template/{helm → kyma}/files/Chart.yaml.hbs +0 -0
  167. /package/lib/init/template/{helm → kyma}/files/values.schema.json +0 -0
  168. /package/lib/init/template/{helm → kyma}/files/values.yaml.hbs +0 -0
@@ -1,61 +1,74 @@
1
- using {AdminService} from '../../srv/admin-service.cds';
1
+ using { AdminService } from '../../srv/admin-service';
2
+ using from '../common'; // to help UI linter get the complete annotations
3
+
4
+
2
5
 
3
6
  ////////////////////////////////////////////////////////////////////////////
4
7
  //
5
8
  // Books Object Page
6
9
  //
7
10
 
8
- annotate AdminService.Books with @(UI: {
9
- HeaderInfo : {
10
- TypeName : '{i18n>Book}',
11
- TypeNamePlural: '{i18n>Books}',
12
- Title : {Value: title},
13
- Description : {Value: author.name}
14
- },
15
- Facets : [
16
- {
17
- $Type : 'UI.ReferenceFacet',
18
- Label : '{i18n>General}',
19
- Target: '@UI.FieldGroup#General'
20
- },
21
- {
22
- $Type : 'UI.ReferenceFacet',
23
- Label : '{i18n>Translations}',
24
- Target: 'texts/@UI.LineItem'
11
+ annotate AdminService.Books with @(
12
+ UI: {
13
+ Facets: [
14
+ {$Type: 'UI.ReferenceFacet', Label: '{i18n>General}', Target: '@UI.FieldGroup#General'},
15
+ {$Type: 'UI.ReferenceFacet', Label: '{i18n>Translations}', Target: 'texts/@UI.LineItem'},
16
+ {$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Details'},
17
+ {$Type: 'UI.ReferenceFacet', Label: '{i18n>Admin}', Target: '@UI.FieldGroup#Admin'},
18
+ ],
19
+ FieldGroup#General: {
20
+ Data: [
21
+ {Value: title},
22
+ {Value: author_ID},
23
+ {Value: genre_ID},
24
+ {Value: descr},
25
+ ]
25
26
  },
26
- {
27
- $Type : 'UI.ReferenceFacet',
28
- Label : '{i18n>Details}',
29
- Target: '@UI.FieldGroup#Details'
27
+ FieldGroup#Details: {
28
+ Data: [
29
+ {Value: stock},
30
+ {Value: price},
31
+ ]
30
32
  },
31
- {
32
- $Type : 'UI.ReferenceFacet',
33
- Label : '{i18n>Admin}',
34
- Target: '@UI.FieldGroup#Admin'
35
- },
36
- ],
37
- FieldGroup #General: {Data: [
38
- {Value: title},
39
- {Value: author_ID},
40
- {Value: genre_ID},
41
- {Value: descr},
42
- ]},
43
- FieldGroup #Details: {Data: [
44
- {Value: stock},
45
- {Value: price},
46
- {
47
- Value: currency_code,
48
- Label: '{i18n>Currency}'
49
- },
50
- ]},
51
- FieldGroup #Admin : {Data: [
52
- {Value: createdBy},
53
- {Value: createdAt},
54
- {Value: modifiedBy},
55
- {Value: modifiedAt}
56
- ]}
57
- });
33
+ FieldGroup#Admin: {
34
+ Data: [
35
+ {Value: createdBy},
36
+ {Value: createdAt},
37
+ {Value: modifiedBy},
38
+ {Value: modifiedAt}
39
+ ]
40
+ }
41
+ }
42
+ );
43
+
44
+ ////////////////////////////////////////////////////////////////////////////
45
+ //
46
+ // Value Help for Tree Table
47
+ //
48
+ annotate AdminService.Books with {
49
+ genre @(Common: {
50
+ Label : 'Genre',
51
+ ValueList: {
52
+ CollectionPath : 'Genres',
53
+ Parameters : [
54
+ {
55
+ $Type : 'Common.ValueListParameterDisplayOnly',
56
+ ValueListProperty: 'name',
57
+ },
58
+ {
59
+ $Type : 'Common.ValueListParameterInOut',
60
+ LocalDataProperty: genre_ID,
61
+ ValueListProperty: 'ID',
62
+ }
63
+ ],
64
+ }
65
+ });
66
+ }
58
67
 
68
+ // Hide ID because of the ValueHelp
69
+ annotate AdminService.Genres with {
70
+ ID @UI.Hidden;
71
+ };
59
72
 
60
73
  ////////////////////////////////////////////////////////////
61
74
  //
@@ -65,54 +78,34 @@ annotate AdminService.Books with @(UI: {
65
78
  annotate sap.capire.bookshop.Books with @fiori.draft.enabled;
66
79
  annotate AdminService.Books with @odata.draft.enabled;
67
80
 
68
- annotate AdminService.Books.texts with @(UI: {
69
- Identification : [{Value: title}],
70
- SelectionFields: [
71
- locale,
72
- title
73
- ],
74
- LineItem : [
75
- {
76
- Value: locale,
77
- Label: '{i18n>Locale}'
78
- },
79
- {
80
- Value: title,
81
- Label: '{i18n>Title}'
82
- },
83
- {
84
- Value: descr,
85
- Label: '{i18n>Description}'
86
- },
87
- ]
88
- });
81
+ annotate AdminService.Books.texts with @(
82
+ UI: {
83
+ Identification: [{Value:title}],
84
+ SelectionFields: [ locale, title ],
85
+ LineItem: [
86
+ {Value: locale, Label: 'Locale'},
87
+ {Value: title, Label: 'Title'},
88
+ {Value: descr, Label: 'Description'},
89
+ ]
90
+ }
91
+ );
89
92
 
90
93
  annotate AdminService.Books.texts with {
91
- ID @UI.Hidden;
92
- ID_texts @UI.Hidden;
94
+ ID @UI.Hidden;
95
+ ID_texts @UI.Hidden;
93
96
  };
94
97
 
95
98
  // Add Value Help for Locales
96
99
  annotate AdminService.Books.texts {
97
100
  locale @(
98
- ValueList.entity: 'Languages',
99
- Common.ValueListWithFixedValues, //show as drop down, not a dialog
101
+ ValueList.entity:'Languages', Common.ValueListWithFixedValues, //show as drop down, not a dialog
100
102
  )
101
- };
102
-
103
+ }
103
104
  // In addition we need to expose Languages through AdminService as a target for ValueList
104
- using {sap} from '@sap/cds/common';
105
-
105
+ using { sap } from '@sap/cds/common';
106
106
  extend service AdminService {
107
- @readonly
108
- entity Languages as projection on sap.common.Languages;
107
+ @readonly entity Languages as projection on sap.common.Languages;
109
108
  }
110
109
 
111
- // Workaround for Fiori popups for asking user to enter a valid UUID on Create
112
- annotate AdminService.Authors : ID with @Core.Computed;
113
- annotate AdminService.Books : ID with @Core.Computed;
114
-
115
- // Show Genre as drop down, not a dialog
116
- annotate AdminService.Books with {
117
- genre @Common.ValueListWithFixedValues;
118
- }
110
+ // Workaround for Fiori popup for asking user to enter a new UUID on Create
111
+ annotate AdminService.Books with { ID @Core.Computed; }
@@ -0,0 +1,3 @@
1
+ sap.ui.define(["sap/fe/core/AppComponent"], ac => ac.extend("{{appName}}.{{app}}.Component", {
2
+ metadata:{ manifest:'json' }
3
+ }))
@@ -1,3 +1,3 @@
1
- appTitle=Manage Books
2
- appSubTitle=Manage bookshop inventory
3
- appDescription=Manage your bookshop inventory with ease.
1
+ appTitle = Manage Books
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Manage Books
@@ -1,3 +1,3 @@
1
- appTitle=Bücher verwalten
2
- appSubTitle=Verwalten Sie den Bestand der Buchhandlung
3
- appDescription=Verwalten Sie den Bestand Ihrer Buchhandlung ganz einfach.
1
+ appTitle = Verwalte Bücher
2
+ appSubTitle = CAP Beispielanwendung
3
+ appDescription = CAP Beispielanwendung zur Verwaltung von Büchern
@@ -1,3 +1,3 @@
1
- appTitle=Manage Books
2
- appSubTitle=Manage bookshop inventory
3
- appDescription=Manage your bookshop inventory with ease.
1
+ appTitle = Manage Books
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Manage Books
@@ -1,14 +1,14 @@
1
1
  {
2
- "_version": "1.49.0",
2
+ "_version": "1.8.0",
3
3
  "sap.app": {
4
- "id": "admin-books",
5
- "applicationVersion": {
6
- "version": "1.0.0"
7
- },
4
+ "id": "books",
8
5
  "type": "application",
9
6
  "title": "{{appTitle}}",
10
7
  "description": "{{appDescription}}",
11
8
  "i18n": "i18n/i18n.properties",
9
+ "applicationVersion": {
10
+ "version": "1.0.0"
11
+ },
12
12
  "dataSources": {
13
13
  "AdminService": {
14
14
  "uri": "odata/v4/admin/",
@@ -20,29 +20,24 @@
20
20
  },
21
21
  "crossNavigation": {
22
22
  "inbounds": {
23
- "intent-Books-manage": {
23
+ "Books-manage": {
24
24
  "signature": {
25
25
  "parameters": {},
26
26
  "additionalParameters": "allowed"
27
27
  },
28
28
  "semanticObject": "Books",
29
- "action": "manage"
29
+ "action": "manage",
30
+ "title": "{{appTitle}}",
31
+ "info": "{{appDescription}}",
32
+ "subTitle": "{{appSubTitle}}",
33
+ "icon": "sap-icon://course-book"
30
34
  }
31
35
  }
32
36
  }
33
37
  },
34
- "sap.ui": {
35
- "technology": "UI5",
36
- "fullWidth": false,
37
- "deviceTypes": {
38
- "desktop": true,
39
- "tablet": true,
40
- "phone": true
41
- }
42
- },
43
38
  "sap.ui5": {
44
39
  "dependencies": {
45
- "minUI5Version": "1.115.1",
40
+ "minUI5Version": "1.136.0",
46
41
  "libs": {
47
42
  "sap.fe.templates": {}
48
43
  }
@@ -55,14 +50,10 @@
55
50
  "": {
56
51
  "dataSource": "AdminService",
57
52
  "settings": {
53
+ "synchronizationMode": "None",
58
54
  "operationMode": "Server",
59
55
  "autoExpandSelect": true,
60
- "earlyRequests": true,
61
- "groupProperties": {
62
- "default": {
63
- "submit": "Auto"
64
- }
65
- }
56
+ "earlyRequests": true
66
57
  }
67
58
  }
68
59
  },
@@ -77,11 +68,6 @@
77
68
  "pattern": "Books({key}):?query:",
78
69
  "name": "BooksDetails",
79
70
  "target": "BooksDetails"
80
- },
81
- {
82
- "pattern": "Books({key}/author({key2}):?query:",
83
- "name": "AuthorsDetails",
84
- "target": "AuthorsDetails"
85
71
  }
86
72
  ],
87
73
  "targets": {
@@ -92,7 +78,7 @@
92
78
  "options": {
93
79
  "settings": {
94
80
  "entitySet": "Books",
95
- "initialLoad": true,
81
+ "liveMode": true,
96
82
  "navigation": {
97
83
  "Books": {
98
84
  "detail": {
@@ -109,25 +95,7 @@
109
95
  "name": "sap.fe.templates.ObjectPage",
110
96
  "options": {
111
97
  "settings": {
112
- "entitySet": "Books",
113
- "editableHeaderContent": false,
114
- "navigation": {
115
- "Authors": {
116
- "detail": {
117
- "route": "AuthorsDetails"
118
- }
119
- }
120
- }
121
- }
122
- }
123
- },
124
- "AuthorsDetails": {
125
- "type": "Component",
126
- "id": "AuthorsDetailsList",
127
- "name": "sap.fe.templates.ObjectPage",
128
- "options": {
129
- "settings": {
130
- "entitySet": "Authors"
98
+ "entitySet": "Books"
131
99
  }
132
100
  }
133
101
  }
@@ -138,6 +106,14 @@
138
106
  "cozy": true
139
107
  }
140
108
  },
109
+ "sap.ui": {
110
+ "technology": "UI5",
111
+ "deviceTypes": {
112
+ "desktop": true,
113
+ "phone": true,
114
+ "tablet": true
115
+ }
116
+ },
141
117
  "sap.fiori": {
142
118
  "registrationIds": [],
143
119
  "archeType": "transactional"
@@ -3,7 +3,6 @@
3
3
  "LaunchPage": {
4
4
  "adapter": {
5
5
  "config": {
6
- "catalogs": [],
7
6
  "groups": [
8
7
  {
9
8
  "id": "Bookshop",
@@ -19,6 +18,14 @@
19
18
  "title": "Browse Books",
20
19
  "targetURL": "#Books-display"
21
20
  }
21
+ },
22
+ {
23
+ "id": "BrowseGenres",
24
+ "tileType": "sap.ushell.ui.tile.StaticTile",
25
+ "properties": {
26
+ "title": "Browse Genres",
27
+ "targetURL": "#Genres-display"
28
+ }
22
29
  }
23
30
  ]
24
31
  },
@@ -36,6 +43,14 @@
36
43
  "title": "Manage Books",
37
44
  "targetURL": "#Books-manage"
38
45
  }
46
+ },
47
+ {
48
+ "id": "ManageAuthors",
49
+ "tileType": "sap.ushell.ui.tile.StaticTile",
50
+ "properties": {
51
+ "title": "Manage Authors",
52
+ "targetURL": "#Authors-manage"
53
+ }
39
54
  }
40
55
  ]
41
56
  }
@@ -69,8 +84,44 @@
69
84
  },
70
85
  "resolutionResult": {
71
86
  "applicationType": "SAPUI5",
72
- "additionalInformation": "SAPUI5.Component=bookshop",
73
- "url": "browse/webapp"
87
+ "additionalInformation": "SAPUI5.Component=bookshop.browse",
88
+ "url": "/browse/webapp"
89
+ }
90
+ },
91
+ "ManageAuthors": {
92
+ "semanticObject": "Authors",
93
+ "action": "manage",
94
+ "title": "Manage Authors",
95
+ "signature": {
96
+ "parameters": {
97
+ "Books.author.ID":{
98
+ "renameTo": "ID"
99
+ }
100
+ },
101
+ "additionalParameters": "ignored"
102
+ },
103
+ "resolutionResult": {
104
+ "applicationType": "SAPUI5",
105
+ "additionalInformation": "SAPUI5.Component=bookshop.admin-authors",
106
+ "url": "/admin-authors/webapp"
107
+ }
108
+ },
109
+ "BrowseGenres": {
110
+ "semanticObject": "Genres",
111
+ "action": "display",
112
+ "title": "Browse Genres",
113
+ "signature": {
114
+ "parameters": {
115
+ "Genre.ID": {
116
+ "renameTo": "ID"
117
+ }
118
+ },
119
+ "additionalParameters": "ignored"
120
+ },
121
+ "resolutionResult": {
122
+ "applicationType": "SAPUI5",
123
+ "additionalInformation": "SAPUI5.Component=bookshop.genres",
124
+ "url": "/genres/webapp"
74
125
  }
75
126
  },
76
127
  "ManageBooks": {
@@ -83,8 +134,8 @@
83
134
  },
84
135
  "resolutionResult": {
85
136
  "applicationType": "SAPUI5",
86
- "additionalInformation": "SAPUI5.Component=books",
87
- "url": "admin-books/webapp"
137
+ "additionalInformation": "SAPUI5.Component=bookshop.admin-books",
138
+ "url": "/admin-books/webapp"
88
139
  }
89
140
  }
90
141
  }
@@ -1,57 +1,57 @@
1
- using {CatalogService} from '../../srv/cat-service.cds';
1
+ using CatalogService from '../../srv/cat-service';
2
2
 
3
3
  ////////////////////////////////////////////////////////////////////////////
4
4
  //
5
5
  // Books Object Page
6
6
  //
7
- annotate CatalogService.Books with @(UI: {
8
- HeaderInfo : {
9
- TypeName : '{i18n>Book}',
10
- TypeNamePlural: '{i18n>Books}',
11
- Title : {Value: title},
12
- Description : {Value: author}
7
+ annotate CatalogService.Books with @(UI : {
8
+ HeaderInfo : {
9
+ TypeName : '{i18n>Book}',
10
+ TypeNamePlural : '{i18n>Books}',
11
+ Description : {Value : author}
13
12
  },
14
- HeaderFacets : [{
15
- $Type : 'UI.ReferenceFacet',
16
- Label : '{i18n>Description}',
17
- Target: '@UI.FieldGroup#Descr'
13
+ HeaderFacets : [{
14
+ $Type : 'UI.ReferenceFacet',
15
+ Label : '{i18n>Description}',
16
+ Target : '@UI.FieldGroup#Descr'
18
17
  }, ],
19
- Facets : [{
20
- $Type : 'UI.ReferenceFacet',
21
- Label : '{i18n>Details}',
22
- Target: '@UI.FieldGroup#Price'
18
+ Facets : [{
19
+ $Type : 'UI.ReferenceFacet',
20
+ Label : '{i18n>Details}',
21
+ Target : '@UI.FieldGroup#Price'
23
22
  }, ],
24
- FieldGroup #Descr: {Data: [{Value: descr}, ]},
25
- FieldGroup #Price: {Data: [
26
- {Value: price},
23
+ FieldGroup #Descr : {Data : [{Value : descr}, ]},
24
+ FieldGroup #Price : {Data : [
25
+ {Value : price},
27
26
  {
28
- Value: currency.symbol,
29
- Label: '{i18n>Currency}'
27
+ Value : currency.symbol,
28
+ Label : '{i18n>Currency}'
30
29
  },
31
30
  ]},
32
31
  });
33
32
 
33
+
34
34
  ////////////////////////////////////////////////////////////////////////////
35
35
  //
36
36
  // Books List Page
37
37
  //
38
- annotate CatalogService.Books with @(UI: {
39
- SelectionFields: [
38
+ annotate CatalogService.Books with @(UI : {
39
+ SelectionFields : [
40
40
  ID,
41
41
  price,
42
42
  currency_code
43
43
  ],
44
- LineItem : [
44
+ LineItem : [
45
45
  {
46
- Value: ID,
47
- Label: '{i18n>Title}'
46
+ Value : ID,
47
+ Label : '{i18n>Title}'
48
48
  },
49
49
  {
50
- Value: author,
51
- Label: '{i18n>Author}'
50
+ Value : author,
51
+ Label : '{i18n>Author}'
52
52
  },
53
- {Value: genre.name},
54
- {Value: price},
55
- {Value: currency.symbol},
53
+ {Value : genre.name},
54
+ {Value : price},
55
+ {Value : currency.symbol},
56
56
  ]
57
57
  });
@@ -0,0 +1,3 @@
1
+ sap.ui.define(["sap/fe/core/AppComponent"], ac => ac.extend("{{appName}}.{{app}}.Component", {
2
+ metadata:{ manifest:'json' }
3
+ }))
@@ -1,4 +1,3 @@
1
- appTitle=Browse Books
2
- appSubTitle=All books in one place
3
- appDescription=This application lets you find the next books you want to read.
4
- appInfo=Find your favorite books
1
+ appTitle = Browse Books
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Browse Books
@@ -1,3 +1,3 @@
1
- appTitle=Bücher anschauen
2
- appSubTitle=Finden sie ihre nächste Lektüre
3
- appDescription=Finden Sie die nachsten Bücher, die Sie lesen möchten.
1
+ appTitle = Zeige Bücher
2
+ appSubTitle = CAP Beispielanwendung
3
+ appDescription = CAP Beispielanwendung zur Anzeige von Büchern
@@ -1,4 +1,3 @@
1
- appTitle=Browse Books
2
- appSubTitle=All books in one place
3
- appDescription=This application lets you find the next books you want to read.
4
- appInfo=Find your favorite books
1
+ appTitle = Browse Books
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Browse Books