@sap/cds-dk 9.4.2 → 9.5.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 (151) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/bin/compile/index.js +1 -1
  3. package/bin/data-products/index.js +10 -2
  4. package/bin/data-products/prepare-csn.js +63 -26
  5. package/bin/export.js +1 -1
  6. package/bin/help.js +2 -3
  7. package/bin/import.js +13 -3
  8. package/bin/repl.js +7 -11
  9. package/bin/up.js +164 -13
  10. package/bin/util/containerize.js +183 -0
  11. package/bin/version.js +4 -4
  12. package/lib/bind/k8s.js +1 -1
  13. package/lib/build/buildTaskEngine.js +5 -2
  14. package/lib/build/plugin.js +1 -1
  15. package/lib/build/plugins/helm/files/templates/_deployment_helpers.tpl +1 -1
  16. package/lib/build/plugins/helm/index.js +7 -7
  17. package/lib/build/provider/hana/2migration.js +16 -24
  18. package/lib/build/provider/hana/index.js +11 -3
  19. package/lib/build/provider/hana/template/.hdiconfig-all +7 -1
  20. package/lib/build/provider/hana/template/package.json +1 -1
  21. package/lib/build/provider/internalBuildPlugin.js +15 -1
  22. package/lib/build/provider/java/index.js +12 -1
  23. package/lib/build/provider/mtx-sidecar/index.js +2 -1
  24. package/lib/build/provider/nodejs/index.js +2 -1
  25. package/lib/build/util.js +3 -3
  26. package/lib/compile/to_openapi.js +1 -5
  27. package/lib/import/common.js +5 -4
  28. package/lib/import/message.js +1 -1
  29. package/lib/import/odata/ParserContext.js +1 -0
  30. package/lib/import/odata/v4parser.js +48 -3
  31. package/lib/import/openapi/importOpenAPI.js +6 -1
  32. package/lib/init/constants.js +1 -1
  33. package/lib/init/index.js +15 -6
  34. package/lib/init/merge.js +16 -0
  35. package/lib/init/projectReader.js +54 -24
  36. package/lib/init/registries/mta.js +5 -2
  37. package/lib/init/registries/xs-app.js +7 -1
  38. package/lib/init/template/ams/index.js +1 -1
  39. package/lib/init/template/app-frontend/files/app-package.json.hbs +1 -7
  40. package/lib/init/template/app-frontend/files/ui5.yaml.hbs +20 -1
  41. package/lib/init/template/app-frontend/index.js +0 -4
  42. package/lib/init/template/application-logging/index.js +9 -14
  43. package/lib/init/template/approuter/files/mta.yaml.hbs +7 -2
  44. package/lib/init/template/approuter/index.js +21 -16
  45. package/lib/init/template/audit-logging/index.js +2 -2
  46. package/lib/init/template/cloud-logging/index.js +2 -3
  47. package/lib/init/template/containerize/files/containerize.yaml.hbs +17 -3
  48. package/lib/init/template/containerize/index.js +0 -4
  49. package/lib/init/template/data/as-json.js +18 -20
  50. package/lib/init/template/destination/index.js +0 -4
  51. package/lib/init/template/dynatrace/index.js +0 -2
  52. package/lib/init/template/github-actions/files/kyma-setup/action.yaml +0 -2
  53. package/lib/init/template/github-actions/files/workflows/cf.yaml.hbs +16 -1
  54. package/lib/init/template/github-actions/files/workflows/test.yaml.hbs +20 -0
  55. package/lib/init/template/github-actions/index.js +5 -8
  56. package/lib/init/template/hana/files/db/package.json +2 -2
  57. package/lib/init/template/hana/files/mta.yaml.hbs +0 -4
  58. package/lib/init/template/hana/index.js +5 -7
  59. package/lib/init/template/helm/index.js +16 -33
  60. package/lib/init/template/helm-unified-runtime/index.js +0 -4
  61. package/lib/init/template/html5-repo/files/app-package.json.hbs +1 -7
  62. package/lib/init/template/html5-repo/files/containerize.yaml.hbs +0 -9
  63. package/lib/init/template/html5-repo/files/mta.yaml.hbs +0 -7
  64. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +20 -1
  65. package/lib/init/template/html5-repo/files/values.yaml.hbs +6 -0
  66. package/lib/init/template/html5-repo/files/xs-app.json.hbs +5 -3
  67. package/lib/init/template/html5-repo/index.js +8 -14
  68. package/lib/init/template/ias/files/values.yaml.hbs +6 -6
  69. package/lib/init/template/ias/index.js +14 -23
  70. package/lib/init/template/kyma/index.js +14 -1
  71. package/lib/init/template/malware-scanner/files/mta.yaml.hbs +3 -1
  72. package/lib/init/template/malware-scanner/files/values.yaml +3 -1
  73. package/lib/init/template/multitenancy/files/mta.yaml.hbs +1 -3
  74. package/lib/init/template/multitenancy/files/values.yaml.hbs +8 -0
  75. package/lib/init/template/multitenancy/index.js +10 -5
  76. package/lib/init/template/nodejs/files/package.json.hbs +1 -1
  77. package/lib/init/template/pipeline/files/app-package.json.hbs +1 -7
  78. package/lib/init/template/pipeline/files/ui5.yaml.hbs +20 -1
  79. package/lib/init/template/pipeline/index.js +6 -3
  80. package/lib/init/template/portal/files/mta.yaml.hbs +5 -3
  81. package/lib/init/template/portal/index.js +3 -6
  82. package/lib/init/template/sample/files/_i18n/i18n_de.properties +12 -0
  83. package/lib/init/template/sample/files/_i18n/i18n_en.properties +21 -0
  84. package/lib/init/template/sample/files/_i18n/i18n_fr.properties +20 -0
  85. package/lib/init/template/sample/files/_i18n/messages_de.properties +34 -0
  86. package/lib/init/template/sample/files/_i18n/messages_en.properties +34 -0
  87. package/lib/init/template/sample/files/_i18n/messages_fr.properties +34 -0
  88. package/lib/init/template/sample/files/app/_i18n/i18n_de.properties +0 -26
  89. package/lib/init/template/sample/files/app/_i18n/i18n_en.properties +8 -0
  90. package/lib/init/template/sample/files/app/admin-authors/fiori-service.cds +52 -0
  91. package/lib/init/template/sample/files/app/admin-authors/webapp/Component.js.hbs +3 -0
  92. package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n.properties +11 -0
  93. package/lib/init/template/sample/files/app/admin-authors/webapp/manifest.json +130 -0
  94. package/lib/init/template/sample/files/app/admin-books/fiori-service.cds +81 -88
  95. package/lib/init/template/sample/files/app/admin-books/webapp/Component.js.hbs +3 -0
  96. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n.properties +10 -2
  97. package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +24 -48
  98. package/lib/init/template/sample/files/app/appconfig/fioriSandboxConfig.json +54 -3
  99. package/lib/init/template/sample/files/app/browse/fiori-service.cds +30 -30
  100. package/lib/init/template/sample/files/app/browse/webapp/Component.js.hbs +3 -0
  101. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +10 -3
  102. package/lib/init/template/sample/files/app/browse/webapp/manifest.json +18 -23
  103. package/lib/init/template/sample/files/app/common.cds +126 -158
  104. package/lib/init/template/sample/files/app/fiori-apps.html +30 -0
  105. package/lib/init/template/sample/files/app/genres/fiori-service.cds +33 -0
  106. package/lib/init/template/sample/files/app/genres/tree-view.cds +42 -0
  107. package/lib/init/template/sample/files/app/genres/value-help.cds +6 -0
  108. package/lib/init/template/sample/files/app/genres/webapp/Component.js.hbs +3 -0
  109. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n.properties +4 -0
  110. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n_de.properties +2 -0
  111. package/lib/init/template/sample/files/app/genres/webapp/manifest.json +126 -0
  112. package/lib/init/template/sample/files/app/services.cds +6 -2
  113. package/lib/init/template/sample/files/db/currencies.cds +13 -0
  114. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Books.csv +5 -5
  115. package/lib/init/template/sample/files/db/data/{sap.capire.bookshop-Books_texts.csv → sap.capire.bookshop-Books.texts.csv} +4 -4
  116. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Genres.csv +42 -15
  117. package/lib/init/template/sample/files/db/data/sap.common-Currencies.csv +12 -0
  118. package/lib/init/template/sample/files/db/data/sap.common-Currencies.texts.csv +15 -0
  119. package/lib/init/template/sample/files/db/hana/index.cds +10 -0
  120. package/lib/init/template/sample/files/db/schema.cds +35 -22
  121. package/lib/init/template/sample/files/db/sqlite/index.cds +10 -0
  122. package/lib/init/template/sample/files/package.json.hbs +14 -1
  123. package/lib/init/template/sample/files/srv/access-control.cds +3 -0
  124. package/lib/init/template/sample/files/srv/admin-service.cds +3 -2
  125. package/lib/init/template/sample/files/srv/cat-service.cds +7 -11
  126. package/lib/init/template/sample/index.js +26 -17
  127. package/lib/init/template/telemetry/index.js +1 -3
  128. package/lib/init/template/typescript/files/package.json +1 -1
  129. package/lib/init/template/workzone-standard/files/mta.yaml.hbs +0 -5
  130. package/lib/init/template/workzone-standard/index.js +0 -1
  131. package/lib/init/template/xsuaa/files/mta.yaml.hbs +4 -0
  132. package/lib/init/template/xsuaa/index.js +5 -7
  133. package/lib/lint/Linter.js +10 -4
  134. package/lib/lint/eslintHelp.json +1 -1
  135. package/lib/mtx/tenant_action.js +12 -4
  136. package/lib/util/checksum.js +32 -0
  137. package/lib/util/question.js +60 -7
  138. package/npm-shrinkwrap.json +61 -37
  139. package/package.json +2 -2
  140. package/lib/init/template/app-frontend/files/ui5-deploy.yaml.hbs +0 -25
  141. package/lib/init/template/github-actions/files/cf-setup/action.yaml +0 -53
  142. package/lib/init/template/html5-repo/files/ui5-deploy.yaml.hbs +0 -25
  143. package/lib/init/template/pipeline/files/ui5-deploy.yaml.hbs +0 -25
  144. package/lib/init/template/sample/files/app/_i18n/i18n.properties +0 -29
  145. package/lib/init/template/sample/files/app/admin-books/webapp/Component.js +0 -8
  146. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_de.properties +0 -3
  147. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_en.properties +0 -3
  148. package/lib/init/template/sample/files/app/browse/webapp/Component.js +0 -7
  149. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_de.properties +0 -3
  150. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_en.properties +0 -4
  151. package/lib/init/template/sample/files/app/index.html +0 -32
@@ -0,0 +1,130 @@
1
+ {
2
+ "_version": "1.28.0",
3
+ "sap.app": {
4
+ "id": "authors",
5
+ "type": "application",
6
+ "title": "{{appTitle}}",
7
+ "description": "{{appDescription}}",
8
+ "i18n": "i18n/i18n.properties",
9
+ "applicationVersion": {
10
+ "version": "1.0.0"
11
+ },
12
+ "dataSources": {
13
+ "AdminService": {
14
+ "uri": "odata/v4/admin/",
15
+ "type": "OData",
16
+ "settings": {
17
+ "odataVersion": "4.0"
18
+ }
19
+ }
20
+ },
21
+ "crossNavigation": {
22
+ "inbounds": {
23
+ "Authors-manage": {
24
+ "signature": {
25
+ "parameters": {
26
+ "Books.author.ID": {
27
+ "renameTo": "ID"
28
+ }
29
+ },
30
+ "additionalParameters": "ignored"
31
+ },
32
+ "semanticObject": "Authors",
33
+ "action": "manage",
34
+ "title": "{{appTitle}}",
35
+ "info": "{{appInfo}}",
36
+ "subTitle": "{{appSubTitle}}",
37
+ "icon": "sap-icon://SAP-icons-TNT/user",
38
+ "indicatorDataSource": {
39
+ "dataSource": "AdminService",
40
+ "path": "Authors/$count",
41
+ "refresh": 1800
42
+ }
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "sap.ui5": {
48
+ "dependencies": {
49
+ "minUI5Version": "1.136.0",
50
+ "libs": {
51
+ "sap.fe.templates": {}
52
+ }
53
+ },
54
+ "models": {
55
+ "i18n": {
56
+ "type": "sap.ui.model.resource.ResourceModel",
57
+ "uri": "i18n/i18n.properties"
58
+ },
59
+ "": {
60
+ "dataSource": "AdminService",
61
+ "settings": {
62
+ "synchronizationMode": "None",
63
+ "operationMode": "Server",
64
+ "autoExpandSelect": true,
65
+ "earlyRequests": true
66
+ }
67
+ }
68
+ },
69
+ "routing": {
70
+ "routes": [
71
+ {
72
+ "pattern": ":?query:",
73
+ "name": "AuthorsList",
74
+ "target": "AuthorsList"
75
+ },
76
+ {
77
+ "pattern": "Authors({key}):?query:",
78
+ "name": "AuthorsDetails",
79
+ "target": "AuthorsDetails"
80
+ }
81
+ ],
82
+ "targets": {
83
+ "AuthorsList": {
84
+ "type": "Component",
85
+ "id": "AuthorsList",
86
+ "name": "sap.fe.templates.ListReport",
87
+ "options": {
88
+ "settings": {
89
+ "entitySet": "Authors",
90
+ "liveMode": true,
91
+ "navigation": {
92
+ "Authors": {
93
+ "detail": {
94
+ "route": "AuthorsDetails"
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "AuthorsDetails": {
102
+ "type": "Component",
103
+ "id": "AuthorsDetailsList",
104
+ "name": "sap.fe.templates.ObjectPage",
105
+ "options": {
106
+ "settings": {
107
+ "entitySet": "Authors"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "contentDensities": {
114
+ "compact": true,
115
+ "cozy": true
116
+ }
117
+ },
118
+ "sap.ui": {
119
+ "technology": "UI5",
120
+ "deviceTypes": {
121
+ "desktop": true,
122
+ "tablet": true,
123
+ "phone": true
124
+ }
125
+ },
126
+ "sap.fiori": {
127
+ "registrationIds": [],
128
+ "archeType": "transactional"
129
+ }
130
+ }
@@ -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,11 @@
1
+ # This is the resource bundle of itelo
2
+ # __ldi.translation.uuid=c3431418-9caf-11e8-98d0-529269fb1459
3
+
4
+ # JCI app descriptor contains lower case TITLE
1
5
  appTitle=Manage Books
2
- appSubTitle=Manage bookshop inventory
3
- appDescription=Manage your bookshop inventory with ease.
6
+
7
+ # JCI app descriptor contains lower case DESCRIPTION
8
+ appSubTitle=CAP Sample Application
9
+
10
+ # JCI app descriptor contains lower case DESCRIPTION
11
+ appDescription=CDS Sample Service
@@ -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": "{{appInfo}}",
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
  }
@@ -70,7 +85,43 @@
70
85
  "resolutionResult": {
71
86
  "applicationType": "SAPUI5",
72
87
  "additionalInformation": "SAPUI5.Component=bookshop",
73
- "url": "browse/webapp"
88
+ "url": "/browse/webapp"
89
+ }
90
+ },
91
+ "BrowseAuthors": {
92
+ "semanticObject": "Authors",
93
+ "action": "manage",
94
+ "title": "Browse 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=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=genres",
124
+ "url": "/genres/webapp"
74
125
  }
75
126
  },
76
127
  "ManageBooks": {
@@ -84,7 +135,7 @@
84
135
  "resolutionResult": {
85
136
  "applicationType": "SAPUI5",
86
137
  "additionalInformation": "SAPUI5.Component=books",
87
- "url": "admin-books/webapp"
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
+ }))