@sap/ux-specification 1.71.63 → 1.71.66

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 (526) hide show
  1. package/CHANGELOG.md +53 -2
  2. package/dist/documentation/runDocu-min.js +9645 -2
  3. package/dist/documentation/runDocu-min.js.map +7 -0
  4. package/dist/documentation/styleDocu.css +32 -28
  5. package/dist/documentation/v2/v2-AnalyticalListPage.html +20 -8
  6. package/dist/documentation/v2/v2-ApplicationV2.html +20 -8
  7. package/dist/documentation/v2/v2-ListReport.html +20 -8
  8. package/dist/documentation/v2/v2-ObjectPage.html +20 -8
  9. package/dist/documentation/v2/v2-OverviewPage.html +20 -8
  10. package/dist/index-min.js +24708 -2
  11. package/dist/index-min.js.map +7 -0
  12. package/dist/schemas/v2/AnalyticalListPageConfig.json +3 -2
  13. package/dist/schemas/v2/ApplicationV2.json +10 -1
  14. package/dist/schemas/v2/ListReportConfig.json +4 -3
  15. package/dist/schemas/v2/ObjectPageConfig.json +20 -19
  16. package/dist/{src → types}/api.d.ts +2 -1
  17. package/dist/types/api.d.ts.map +1 -0
  18. package/dist/{src → types}/apiTypes.d.ts +3 -1
  19. package/dist/types/apiTypes.d.ts.map +1 -0
  20. package/dist/{src → types}/extensionLogger.d.ts +1 -0
  21. package/dist/types/extensionLogger.d.ts.map +1 -0
  22. package/dist/{src → types}/i18n/i18n.d.ts +1 -0
  23. package/dist/types/i18n/i18n.d.ts.map +1 -0
  24. package/dist/{src → types}/index.d.ts +1 -0
  25. package/dist/types/index.d.ts.map +1 -0
  26. package/dist/{src → types}/project.d.ts +1 -0
  27. package/dist/types/project.d.ts.map +1 -0
  28. package/dist/{src → types}/specification/common/Application.d.ts +1 -0
  29. package/dist/types/specification/common/Application.d.ts.map +1 -0
  30. package/dist/{src → types}/specification/common/index.d.ts +1 -0
  31. package/dist/types/specification/common/index.d.ts.map +1 -0
  32. package/dist/{src → types}/specification/common/page.d.ts +2 -1
  33. package/dist/types/specification/common/page.d.ts.map +1 -0
  34. package/dist/{src → types}/specification/common/types.d.ts +1 -0
  35. package/dist/types/specification/common/types.d.ts.map +1 -0
  36. package/dist/{src → types}/specification/common/webapp/manifest/Manifest.d.ts +1 -0
  37. package/dist/types/specification/common/webapp/manifest/Manifest.d.ts.map +1 -0
  38. package/dist/{src → types}/specification/common/webapp/manifest/index.d.ts +1 -0
  39. package/dist/types/specification/common/webapp/manifest/index.d.ts.map +1 -0
  40. package/dist/{src → types}/specification/common/webapp/manifest/sapOvp.d.ts +1 -0
  41. package/dist/types/specification/common/webapp/manifest/sapOvp.d.ts.map +1 -0
  42. package/dist/{src → types}/specification/common/webapp/manifest/sapUi5.d.ts +1 -0
  43. package/dist/types/specification/common/webapp/manifest/sapUi5.d.ts.map +1 -0
  44. package/dist/{src → types}/specification/schemaAccess.d.ts +7 -0
  45. package/dist/types/specification/schemaAccess.d.ts.map +1 -0
  46. package/dist/{src → types}/specification/v2/ApplicationV2.d.ts +1 -0
  47. package/dist/types/specification/v2/ApplicationV2.d.ts.map +1 -0
  48. package/dist/{src → types}/specification/v2/controls/Action.d.ts +1 -0
  49. package/dist/types/specification/v2/controls/Action.d.ts.map +1 -0
  50. package/dist/{src → types}/specification/v2/controls/AnalyticalListPageChart.d.ts +1 -0
  51. package/dist/types/specification/v2/controls/AnalyticalListPageChart.d.ts.map +1 -0
  52. package/dist/{src → types}/specification/v2/controls/AnalyticalListPageKPI.d.ts +1 -0
  53. package/dist/types/specification/v2/controls/AnalyticalListPageKPI.d.ts.map +1 -0
  54. package/dist/{src → types}/specification/v2/controls/Card.d.ts +1 -0
  55. package/dist/types/specification/v2/controls/Card.d.ts.map +1 -0
  56. package/dist/{src → types}/specification/v2/controls/Facets.d.ts +1 -0
  57. package/dist/types/specification/v2/controls/Facets.d.ts.map +1 -0
  58. package/dist/{src → types}/specification/v2/controls/Field.d.ts +1 -0
  59. package/dist/types/specification/v2/controls/Field.d.ts.map +1 -0
  60. package/dist/{src → types}/specification/v2/controls/FilterBar.d.ts +1 -0
  61. package/dist/types/specification/v2/controls/FilterBar.d.ts.map +1 -0
  62. package/dist/{src → types}/specification/v2/controls/Footer.d.ts +1 -0
  63. package/dist/types/specification/v2/controls/Footer.d.ts.map +1 -0
  64. package/dist/{src → types}/specification/v2/controls/ObjectPageChart.d.ts +1 -0
  65. package/dist/types/specification/v2/controls/ObjectPageChart.d.ts.map +1 -0
  66. package/dist/{src → types}/specification/v2/controls/ObjectPageForm.d.ts +1 -0
  67. package/dist/types/specification/v2/controls/ObjectPageForm.d.ts.map +1 -0
  68. package/dist/{src → types}/specification/v2/controls/ObjectPageHeader.d.ts +1 -0
  69. package/dist/types/specification/v2/controls/ObjectPageHeader.d.ts.map +1 -0
  70. package/dist/{src → types}/specification/v2/controls/ObjectPageLayout.d.ts +1 -0
  71. package/dist/types/specification/v2/controls/ObjectPageLayout.d.ts.map +1 -0
  72. package/dist/{src → types}/specification/v2/controls/ObjectPageSection.d.ts +1 -0
  73. package/dist/types/specification/v2/controls/ObjectPageSection.d.ts.map +1 -0
  74. package/dist/{src → types}/specification/v2/controls/ObjectPageTable.d.ts +1 -0
  75. package/dist/types/specification/v2/controls/ObjectPageTable.d.ts.map +1 -0
  76. package/dist/{src → types}/specification/v2/controls/ObjectPageToolBar.d.ts +1 -0
  77. package/dist/types/specification/v2/controls/ObjectPageToolBar.d.ts.map +1 -0
  78. package/dist/{src → types}/specification/v2/controls/Table.d.ts +2 -0
  79. package/dist/types/specification/v2/controls/Table.d.ts.map +1 -0
  80. package/dist/{src → types}/specification/v2/controls/ToolBar.d.ts +1 -0
  81. package/dist/types/specification/v2/controls/ToolBar.d.ts.map +1 -0
  82. package/dist/{src → types}/specification/v2/controls/index.d.ts +1 -0
  83. package/dist/types/specification/v2/controls/index.d.ts.map +1 -0
  84. package/dist/{src → types}/specification/v2/index.d.ts +1 -0
  85. package/dist/types/specification/v2/index.d.ts.map +1 -0
  86. package/dist/{src → types}/specification/v2/page.d.ts +1 -0
  87. package/dist/types/specification/v2/page.d.ts.map +1 -0
  88. package/dist/{src → types}/specification/v2/pages/AnalyticalListPageConfig.d.ts +1 -0
  89. package/dist/types/specification/v2/pages/AnalyticalListPageConfig.d.ts.map +1 -0
  90. package/dist/{src → types}/specification/v2/pages/ListReportConfig.d.ts +1 -0
  91. package/dist/types/specification/v2/pages/ListReportConfig.d.ts.map +1 -0
  92. package/dist/{src → types}/specification/v2/pages/ObjectPageConfig.d.ts +1 -0
  93. package/dist/types/specification/v2/pages/ObjectPageConfig.d.ts.map +1 -0
  94. package/dist/{src → types}/specification/v2/pages/OverviewPageConfig.d.ts +1 -0
  95. package/dist/types/specification/v2/pages/OverviewPageConfig.d.ts.map +1 -0
  96. package/dist/{src → types}/specification/v2/pages/index.d.ts +1 -0
  97. package/dist/types/specification/v2/pages/index.d.ts.map +1 -0
  98. package/dist/types/specification/v2/webapp/index.d.ts +2 -0
  99. package/dist/types/specification/v2/webapp/index.d.ts.map +1 -0
  100. package/dist/{src → types}/specification/v2/webapp/manifest/index.d.ts +1 -0
  101. package/dist/types/specification/v2/webapp/manifest/index.d.ts.map +1 -0
  102. package/dist/{src → types}/specification/v2/webapp/manifest/sapUi.d.ts +1 -0
  103. package/dist/types/specification/v2/webapp/manifest/sapUi.d.ts.map +1 -0
  104. package/dist/{src → types}/specification/v2/webapp/manifest/sapUi5.d.ts +1 -0
  105. package/dist/types/specification/v2/webapp/manifest/sapUi5.d.ts.map +1 -0
  106. package/dist/{src → types}/specification/v2/webapp/manifest/sapUiPageV2.d.ts +1 -0
  107. package/dist/types/specification/v2/webapp/manifest/sapUiPageV2.d.ts.map +1 -0
  108. package/dist/{src → types}/sync/common/appProvider.d.ts +2 -1
  109. package/dist/types/sync/common/appProvider.d.ts.map +1 -0
  110. package/dist/{src → types}/sync/common/decoration/control.d.ts +1 -0
  111. package/dist/types/sync/common/decoration/control.d.ts.map +1 -0
  112. package/dist/{src → types}/sync/common/decoration/decorators.d.ts +1 -0
  113. package/dist/types/sync/common/decoration/decorators.d.ts.map +1 -0
  114. package/dist/{src → types}/sync/common/decoration/factory.d.ts +1 -0
  115. package/dist/types/sync/common/decoration/factory.d.ts.map +1 -0
  116. package/dist/{src → types}/sync/common/decoration/flex.d.ts +1 -0
  117. package/dist/types/sync/common/decoration/flex.d.ts.map +1 -0
  118. package/dist/{src → types}/sync/common/decoration/index.d.ts +1 -0
  119. package/dist/types/sync/common/decoration/index.d.ts.map +1 -0
  120. package/dist/{src → types}/sync/common/flexUtils.d.ts +1 -0
  121. package/dist/types/sync/common/flexUtils.d.ts.map +1 -0
  122. package/dist/{src → types}/sync/common/generate/index.d.ts +1 -0
  123. package/dist/types/sync/common/generate/index.d.ts.map +1 -0
  124. package/dist/{src → types}/sync/common/generate/objectPage.d.ts +3 -1
  125. package/dist/types/sync/common/generate/objectPage.d.ts.map +1 -0
  126. package/dist/{src → types}/sync/common/generate/utils.d.ts +1 -0
  127. package/dist/types/sync/common/generate/utils.d.ts.map +1 -0
  128. package/dist/{src → types}/sync/common/import/utils.d.ts +1 -0
  129. package/dist/types/sync/common/import/utils.d.ts.map +1 -0
  130. package/dist/{src → types}/sync/common/importProject.d.ts +1 -0
  131. package/dist/types/sync/common/importProject.d.ts.map +1 -0
  132. package/dist/{src → types}/sync/common/index.d.ts +1 -0
  133. package/dist/types/sync/common/index.d.ts.map +1 -0
  134. package/dist/{src → types}/sync/common/types.d.ts +6 -2
  135. package/dist/types/sync/common/types.d.ts.map +1 -0
  136. package/dist/{src → types}/sync/common/utils.d.ts +3 -2
  137. package/dist/types/sync/common/utils.d.ts.map +1 -0
  138. package/dist/{src → types}/sync/i18n.d.ts +1 -0
  139. package/dist/types/sync/i18n.d.ts.map +1 -0
  140. package/dist/{src → types}/sync/v2/application.d.ts +1 -0
  141. package/dist/types/sync/v2/application.d.ts.map +1 -0
  142. package/dist/{src → types}/sync/v2/export/controls/Action.d.ts +1 -0
  143. package/dist/types/sync/v2/export/controls/Action.d.ts.map +1 -0
  144. package/dist/{src → types}/sync/v2/export/controls/AnalyticalListPageChart.d.ts +1 -0
  145. package/dist/types/sync/v2/export/controls/AnalyticalListPageChart.d.ts.map +1 -0
  146. package/dist/{src → types}/sync/v2/export/controls/AnalyticalListPageKPI.d.ts +1 -0
  147. package/dist/types/sync/v2/export/controls/AnalyticalListPageKPI.d.ts.map +1 -0
  148. package/dist/{src → types}/sync/v2/export/controls/Card.d.ts +1 -0
  149. package/dist/types/sync/v2/export/controls/Card.d.ts.map +1 -0
  150. package/dist/{src → types}/sync/v2/export/controls/Field.d.ts +1 -0
  151. package/dist/types/sync/v2/export/controls/Field.d.ts.map +1 -0
  152. package/dist/{src → types}/sync/v2/export/controls/FilterBar.d.ts +1 -0
  153. package/dist/types/sync/v2/export/controls/FilterBar.d.ts.map +1 -0
  154. package/dist/{src → types}/sync/v2/export/controls/FormAction.d.ts +1 -0
  155. package/dist/types/sync/v2/export/controls/FormAction.d.ts.map +1 -0
  156. package/dist/{src → types}/sync/v2/export/controls/Fragment.d.ts +1 -0
  157. package/dist/types/sync/v2/export/controls/Fragment.d.ts.map +1 -0
  158. package/dist/{src → types}/sync/v2/export/controls/ObjectPageCustomSection.d.ts +1 -0
  159. package/dist/types/sync/v2/export/controls/ObjectPageCustomSection.d.ts.map +1 -0
  160. package/dist/{src → types}/sync/v2/export/controls/ObjectPageFooterAction.d.ts +1 -0
  161. package/dist/types/sync/v2/export/controls/ObjectPageFooterAction.d.ts.map +1 -0
  162. package/dist/{src → types}/sync/v2/export/controls/ObjectPageHeader.d.ts +1 -0
  163. package/dist/types/sync/v2/export/controls/ObjectPageHeader.d.ts.map +1 -0
  164. package/dist/{src → types}/sync/v2/export/controls/ObjectPageHeaderAction.d.ts +1 -0
  165. package/dist/types/sync/v2/export/controls/ObjectPageHeaderAction.d.ts.map +1 -0
  166. package/dist/{src → types}/sync/v2/export/controls/ObjectPageLayout.d.ts +1 -0
  167. package/dist/types/sync/v2/export/controls/ObjectPageLayout.d.ts.map +1 -0
  168. package/dist/{src → types}/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +1 -0
  169. package/dist/types/sync/v2/export/controls/ObjectPageSectionsV2.d.ts.map +1 -0
  170. package/dist/{src → types}/sync/v2/export/controls/ObjectPageTable.d.ts +1 -0
  171. package/dist/types/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -0
  172. package/dist/{src → types}/sync/v2/export/controls/ObjectPageToolBarAction.d.ts +1 -0
  173. package/dist/types/sync/v2/export/controls/ObjectPageToolBarAction.d.ts.map +1 -0
  174. package/dist/{src → types}/sync/v2/export/controls/Table.d.ts +1 -0
  175. package/dist/types/sync/v2/export/controls/Table.d.ts.map +1 -0
  176. package/dist/{src → types}/sync/v2/export/controls/TableColumn.d.ts +1 -0
  177. package/dist/types/sync/v2/export/controls/TableColumn.d.ts.map +1 -0
  178. package/dist/{src → types}/sync/v2/export/controls/ToolBar.d.ts +1 -0
  179. package/dist/types/sync/v2/export/controls/ToolBar.d.ts.map +1 -0
  180. package/dist/{src → types}/sync/v2/export/controls/index.d.ts +1 -0
  181. package/dist/types/sync/v2/export/controls/index.d.ts.map +1 -0
  182. package/dist/{src → types}/sync/v2/export/export.d.ts +1 -0
  183. package/dist/types/sync/v2/export/export.d.ts.map +1 -0
  184. package/dist/{src → types}/sync/v2/export/exportPage.d.ts +1 -0
  185. package/dist/types/sync/v2/export/exportPage.d.ts.map +1 -0
  186. package/dist/{src → types}/sync/v2/export/factory.d.ts +1 -0
  187. package/dist/types/sync/v2/export/factory.d.ts.map +1 -0
  188. package/dist/{src → types}/sync/v2/export/manifest.d.ts +1 -0
  189. package/dist/types/sync/v2/export/manifest.d.ts.map +1 -0
  190. package/dist/{src → types}/sync/v2/export/pages/AnalyticalListPage.d.ts +1 -0
  191. package/dist/types/sync/v2/export/pages/AnalyticalListPage.d.ts.map +1 -0
  192. package/dist/{src → types}/sync/v2/export/pages/ListReport.d.ts +1 -0
  193. package/dist/types/sync/v2/export/pages/ListReport.d.ts.map +1 -0
  194. package/dist/{src → types}/sync/v2/export/pages/ObjectPage.d.ts +1 -0
  195. package/dist/types/sync/v2/export/pages/ObjectPage.d.ts.map +1 -0
  196. package/dist/{src → types}/sync/v2/export/pages/OverviewPage.d.ts +1 -0
  197. package/dist/types/sync/v2/export/pages/OverviewPage.d.ts.map +1 -0
  198. package/dist/{src → types}/sync/v2/export/pages/index.d.ts +1 -0
  199. package/dist/types/sync/v2/export/pages/index.d.ts.map +1 -0
  200. package/dist/{src → types}/sync/v2/export/view-controller-generator.d.ts +1 -0
  201. package/dist/types/sync/v2/export/view-controller-generator.d.ts.map +1 -0
  202. package/dist/{src → types}/sync/v2/generate/analyticalListReport.d.ts +1 -0
  203. package/dist/types/sync/v2/generate/analyticalListReport.d.ts.map +1 -0
  204. package/dist/{src → types}/sync/v2/generate/generate.d.ts +1 -0
  205. package/dist/types/sync/v2/generate/generate.d.ts.map +1 -0
  206. package/dist/{src → types}/sync/v2/generate/index.d.ts +1 -0
  207. package/dist/types/sync/v2/generate/index.d.ts.map +1 -0
  208. package/dist/{src → types}/sync/v2/generate/listReport.d.ts +1 -0
  209. package/dist/types/sync/v2/generate/listReport.d.ts.map +1 -0
  210. package/dist/{src → types}/sync/v2/generate/objectPage.d.ts +1 -0
  211. package/dist/types/sync/v2/generate/objectPage.d.ts.map +1 -0
  212. package/dist/{src → types}/sync/v2/generate/overviewPage.d.ts +1 -0
  213. package/dist/types/sync/v2/generate/overviewPage.d.ts.map +1 -0
  214. package/dist/{src → types}/sync/v2/generate/utils.d.ts +1 -0
  215. package/dist/types/sync/v2/generate/utils.d.ts.map +1 -0
  216. package/dist/{src → types}/sync/v2/import/app/appProvider.d.ts +1 -0
  217. package/dist/types/sync/v2/import/app/appProvider.d.ts.map +1 -0
  218. package/dist/{src → types}/sync/v2/import/app/ovpProvider.d.ts +1 -0
  219. package/dist/types/sync/v2/import/app/ovpProvider.d.ts.map +1 -0
  220. package/dist/{src → types}/sync/v2/import/common/index.d.ts +1 -0
  221. package/dist/types/sync/v2/import/common/index.d.ts.map +1 -0
  222. package/dist/{src → types}/sync/v2/import/controls/table.d.ts +1 -0
  223. package/dist/types/sync/v2/import/controls/table.d.ts.map +1 -0
  224. package/dist/types/sync/v2/import/getPageType.d.ts +1 -0
  225. package/dist/types/sync/v2/import/getPageType.d.ts.map +1 -0
  226. package/dist/{src → types}/sync/v2/import/index.d.ts +1 -0
  227. package/dist/types/sync/v2/import/index.d.ts.map +1 -0
  228. package/dist/{src → types}/sync/v2/import/pages/analyticalListPage.d.ts +1 -0
  229. package/dist/types/sync/v2/import/pages/analyticalListPage.d.ts.map +1 -0
  230. package/dist/{src → types}/sync/v2/import/pages/listReport.d.ts +1 -0
  231. package/dist/types/sync/v2/import/pages/listReport.d.ts.map +1 -0
  232. package/dist/{src → types}/sync/v2/import/pages/objectPage.d.ts +1 -0
  233. package/dist/types/sync/v2/import/pages/objectPage.d.ts.map +1 -0
  234. package/dist/{src → types}/sync/v2/import/pages/overviewPage.d.ts +1 -0
  235. package/dist/types/sync/v2/import/pages/overviewPage.d.ts.map +1 -0
  236. package/dist/{src → types}/sync/v2/import/utils.d.ts +1 -0
  237. package/dist/types/sync/v2/import/utils.d.ts.map +1 -0
  238. package/dist/{src → types}/sync/v2/types.d.ts +1 -0
  239. package/dist/types/sync/v2/types.d.ts.map +1 -0
  240. package/dist/{src → types}/sync/v4/utils/StableIdHelper.d.ts +1 -0
  241. package/dist/types/sync/v4/utils/StableIdHelper.d.ts.map +1 -0
  242. package/dist/{src → types}/v2.d.ts +1 -0
  243. package/dist/types/v2.d.ts.map +1 -0
  244. package/package.json +25 -28
  245. package/dist/documentation/runDocu-min.js.LICENSE.txt +0 -24
  246. package/dist/index-min.js.LICENSE.txt +0 -26
  247. package/dist/scripts/extractDocu.d.ts +0 -1
  248. package/dist/scripts/extractDocu.js +0 -485
  249. package/dist/scripts/extractDocu.js.map +0 -1
  250. package/dist/scripts/runDocu.d.ts +0 -1
  251. package/dist/scripts/runDocu.js +0 -570
  252. package/dist/scripts/runDocu.js.map +0 -1
  253. package/dist/scripts/spec.d.ts +0 -1
  254. package/dist/scripts/spec.js +0 -114
  255. package/dist/scripts/spec.js.map +0 -1
  256. package/dist/scripts/to-json-schema.d.ts +0 -10
  257. package/dist/scripts/to-json-schema.js +0 -112
  258. package/dist/scripts/to-json-schema.js.map +0 -1
  259. package/dist/specification/v2/index-min.js +0 -1
  260. package/dist/src/api.js +0 -123
  261. package/dist/src/api.js.map +0 -1
  262. package/dist/src/apiTypes.js +0 -3
  263. package/dist/src/apiTypes.js.map +0 -1
  264. package/dist/src/extensionLogger.js +0 -34
  265. package/dist/src/extensionLogger.js.map +0 -1
  266. package/dist/src/i18n/i18n.js +0 -25
  267. package/dist/src/i18n/i18n.js.map +0 -1
  268. package/dist/src/index.js +0 -12
  269. package/dist/src/index.js.map +0 -1
  270. package/dist/src/project.js +0 -151
  271. package/dist/src/project.js.map +0 -1
  272. package/dist/src/specification/common/Application.js +0 -3
  273. package/dist/src/specification/common/Application.js.map +0 -1
  274. package/dist/src/specification/common/i18n.json +0 -1
  275. package/dist/src/specification/common/index.js +0 -10
  276. package/dist/src/specification/common/index.js.map +0 -1
  277. package/dist/src/specification/common/page.js +0 -26
  278. package/dist/src/specification/common/page.js.map +0 -1
  279. package/dist/src/specification/common/types.js +0 -25
  280. package/dist/src/specification/common/types.js.map +0 -1
  281. package/dist/src/specification/common/webapp/manifest/Manifest.js +0 -17
  282. package/dist/src/specification/common/webapp/manifest/Manifest.js.map +0 -1
  283. package/dist/src/specification/common/webapp/manifest/index.js +0 -8
  284. package/dist/src/specification/common/webapp/manifest/index.js.map +0 -1
  285. package/dist/src/specification/common/webapp/manifest/sapOvp.js +0 -9
  286. package/dist/src/specification/common/webapp/manifest/sapOvp.js.map +0 -1
  287. package/dist/src/specification/common/webapp/manifest/sapUi5.js +0 -14
  288. package/dist/src/specification/common/webapp/manifest/sapUi5.js.map +0 -1
  289. package/dist/src/specification/schemaAccess.js +0 -62
  290. package/dist/src/specification/schemaAccess.js.map +0 -1
  291. package/dist/src/specification/v2/ApplicationV2.js +0 -3
  292. package/dist/src/specification/v2/ApplicationV2.js.map +0 -1
  293. package/dist/src/specification/v2/controls/Action.js +0 -15
  294. package/dist/src/specification/v2/controls/Action.js.map +0 -1
  295. package/dist/src/specification/v2/controls/AnalyticalListPageChart.js +0 -36
  296. package/dist/src/specification/v2/controls/AnalyticalListPageChart.js.map +0 -1
  297. package/dist/src/specification/v2/controls/AnalyticalListPageKPI.js +0 -3
  298. package/dist/src/specification/v2/controls/AnalyticalListPageKPI.js.map +0 -1
  299. package/dist/src/specification/v2/controls/Card.js +0 -53
  300. package/dist/src/specification/v2/controls/Card.js.map +0 -1
  301. package/dist/src/specification/v2/controls/Facets.js +0 -3
  302. package/dist/src/specification/v2/controls/Facets.js.map +0 -1
  303. package/dist/src/specification/v2/controls/Field.js +0 -3
  304. package/dist/src/specification/v2/controls/Field.js.map +0 -1
  305. package/dist/src/specification/v2/controls/FilterBar.js +0 -3
  306. package/dist/src/specification/v2/controls/FilterBar.js.map +0 -1
  307. package/dist/src/specification/v2/controls/Footer.js +0 -3
  308. package/dist/src/specification/v2/controls/Footer.js.map +0 -1
  309. package/dist/src/specification/v2/controls/ObjectPageChart.js +0 -3
  310. package/dist/src/specification/v2/controls/ObjectPageChart.js.map +0 -1
  311. package/dist/src/specification/v2/controls/ObjectPageForm.js +0 -3
  312. package/dist/src/specification/v2/controls/ObjectPageForm.js.map +0 -1
  313. package/dist/src/specification/v2/controls/ObjectPageHeader.js +0 -8
  314. package/dist/src/specification/v2/controls/ObjectPageHeader.js.map +0 -1
  315. package/dist/src/specification/v2/controls/ObjectPageLayout.js +0 -3
  316. package/dist/src/specification/v2/controls/ObjectPageLayout.js.map +0 -1
  317. package/dist/src/specification/v2/controls/ObjectPageSection.js +0 -13
  318. package/dist/src/specification/v2/controls/ObjectPageSection.js.map +0 -1
  319. package/dist/src/specification/v2/controls/ObjectPageTable.js +0 -7
  320. package/dist/src/specification/v2/controls/ObjectPageTable.js.map +0 -1
  321. package/dist/src/specification/v2/controls/ObjectPageToolBar.js +0 -3
  322. package/dist/src/specification/v2/controls/ObjectPageToolBar.js.map +0 -1
  323. package/dist/src/specification/v2/controls/Table.js +0 -51
  324. package/dist/src/specification/v2/controls/Table.js.map +0 -1
  325. package/dist/src/specification/v2/controls/ToolBar.js +0 -3
  326. package/dist/src/specification/v2/controls/ToolBar.js.map +0 -1
  327. package/dist/src/specification/v2/controls/index.js +0 -13
  328. package/dist/src/specification/v2/controls/index.js.map +0 -1
  329. package/dist/src/specification/v2/index.js +0 -9
  330. package/dist/src/specification/v2/index.js.map +0 -1
  331. package/dist/src/specification/v2/page.js +0 -3
  332. package/dist/src/specification/v2/page.js.map +0 -1
  333. package/dist/src/specification/v2/pages/AnalyticalListPageConfig.js +0 -3
  334. package/dist/src/specification/v2/pages/AnalyticalListPageConfig.js.map +0 -1
  335. package/dist/src/specification/v2/pages/ListReportConfig.js +0 -3
  336. package/dist/src/specification/v2/pages/ListReportConfig.js.map +0 -1
  337. package/dist/src/specification/v2/pages/ObjectPageConfig.js +0 -3
  338. package/dist/src/specification/v2/pages/ObjectPageConfig.js.map +0 -1
  339. package/dist/src/specification/v2/pages/OverviewPageConfig.js +0 -8
  340. package/dist/src/specification/v2/pages/OverviewPageConfig.js.map +0 -1
  341. package/dist/src/specification/v2/pages/index.js +0 -7
  342. package/dist/src/specification/v2/pages/index.js.map +0 -1
  343. package/dist/src/specification/v2/webapp/index.d.ts +0 -1
  344. package/dist/src/specification/v2/webapp/index.js +0 -7
  345. package/dist/src/specification/v2/webapp/index.js.map +0 -1
  346. package/dist/src/specification/v2/webapp/manifest/index.js +0 -8
  347. package/dist/src/specification/v2/webapp/manifest/index.js.map +0 -1
  348. package/dist/src/specification/v2/webapp/manifest/sapUi.js +0 -3
  349. package/dist/src/specification/v2/webapp/manifest/sapUi.js.map +0 -1
  350. package/dist/src/specification/v2/webapp/manifest/sapUi5.js +0 -9
  351. package/dist/src/specification/v2/webapp/manifest/sapUi5.js.map +0 -1
  352. package/dist/src/specification/v2/webapp/manifest/sapUiPageV2.js +0 -7
  353. package/dist/src/specification/v2/webapp/manifest/sapUiPageV2.js.map +0 -1
  354. package/dist/src/sync/common/appProvider.js +0 -57
  355. package/dist/src/sync/common/appProvider.js.map +0 -1
  356. package/dist/src/sync/common/decoration/control.js +0 -211
  357. package/dist/src/sync/common/decoration/control.js.map +0 -1
  358. package/dist/src/sync/common/decoration/decorators.js +0 -45
  359. package/dist/src/sync/common/decoration/decorators.js.map +0 -1
  360. package/dist/src/sync/common/decoration/factory.js +0 -48
  361. package/dist/src/sync/common/decoration/factory.js.map +0 -1
  362. package/dist/src/sync/common/decoration/flex.js +0 -8
  363. package/dist/src/sync/common/decoration/flex.js.map +0 -1
  364. package/dist/src/sync/common/decoration/index.js +0 -9
  365. package/dist/src/sync/common/decoration/index.js.map +0 -1
  366. package/dist/src/sync/common/flexUtils.js +0 -94
  367. package/dist/src/sync/common/flexUtils.js.map +0 -1
  368. package/dist/src/sync/common/generate/index.js +0 -8
  369. package/dist/src/sync/common/generate/index.js.map +0 -1
  370. package/dist/src/sync/common/generate/objectPage.js +0 -355
  371. package/dist/src/sync/common/generate/objectPage.js.map +0 -1
  372. package/dist/src/sync/common/generate/utils.js +0 -381
  373. package/dist/src/sync/common/generate/utils.js.map +0 -1
  374. package/dist/src/sync/common/i18n.json +0 -21
  375. package/dist/src/sync/common/import/utils.js +0 -92
  376. package/dist/src/sync/common/import/utils.js.map +0 -1
  377. package/dist/src/sync/common/importProject.js +0 -259
  378. package/dist/src/sync/common/importProject.js.map +0 -1
  379. package/dist/src/sync/common/index.js +0 -15
  380. package/dist/src/sync/common/index.js.map +0 -1
  381. package/dist/src/sync/common/types.js +0 -212
  382. package/dist/src/sync/common/types.js.map +0 -1
  383. package/dist/src/sync/common/utils.js +0 -1072
  384. package/dist/src/sync/common/utils.js.map +0 -1
  385. package/dist/src/sync/i18n.js +0 -15
  386. package/dist/src/sync/i18n.js.map +0 -1
  387. package/dist/src/sync/v2/application.js +0 -155
  388. package/dist/src/sync/v2/application.js.map +0 -1
  389. package/dist/src/sync/v2/export/controls/Action.js +0 -127
  390. package/dist/src/sync/v2/export/controls/Action.js.map +0 -1
  391. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +0 -61
  392. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +0 -1
  393. package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js +0 -56
  394. package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js.map +0 -1
  395. package/dist/src/sync/v2/export/controls/Card.js +0 -655
  396. package/dist/src/sync/v2/export/controls/Card.js.map +0 -1
  397. package/dist/src/sync/v2/export/controls/Field.js +0 -32
  398. package/dist/src/sync/v2/export/controls/Field.js.map +0 -1
  399. package/dist/src/sync/v2/export/controls/FilterBar.js +0 -107
  400. package/dist/src/sync/v2/export/controls/FilterBar.js.map +0 -1
  401. package/dist/src/sync/v2/export/controls/FormAction.js +0 -128
  402. package/dist/src/sync/v2/export/controls/FormAction.js.map +0 -1
  403. package/dist/src/sync/v2/export/controls/Fragment.js +0 -571
  404. package/dist/src/sync/v2/export/controls/Fragment.js.map +0 -1
  405. package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js +0 -110
  406. package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js.map +0 -1
  407. package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js +0 -62
  408. package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +0 -1
  409. package/dist/src/sync/v2/export/controls/ObjectPageHeader.js +0 -60
  410. package/dist/src/sync/v2/export/controls/ObjectPageHeader.js.map +0 -1
  411. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js +0 -62
  412. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +0 -1
  413. package/dist/src/sync/v2/export/controls/ObjectPageLayout.js +0 -59
  414. package/dist/src/sync/v2/export/controls/ObjectPageLayout.js.map +0 -1
  415. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +0 -193
  416. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +0 -1
  417. package/dist/src/sync/v2/export/controls/ObjectPageTable.js +0 -278
  418. package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +0 -1
  419. package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js +0 -61
  420. package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +0 -1
  421. package/dist/src/sync/v2/export/controls/Table.js +0 -593
  422. package/dist/src/sync/v2/export/controls/Table.js.map +0 -1
  423. package/dist/src/sync/v2/export/controls/TableColumn.js +0 -166
  424. package/dist/src/sync/v2/export/controls/TableColumn.js.map +0 -1
  425. package/dist/src/sync/v2/export/controls/ToolBar.js +0 -6
  426. package/dist/src/sync/v2/export/controls/ToolBar.js.map +0 -1
  427. package/dist/src/sync/v2/export/controls/index.js +0 -25
  428. package/dist/src/sync/v2/export/controls/index.js.map +0 -1
  429. package/dist/src/sync/v2/export/export.js +0 -682
  430. package/dist/src/sync/v2/export/export.js.map +0 -1
  431. package/dist/src/sync/v2/export/exportPage.js +0 -305
  432. package/dist/src/sync/v2/export/exportPage.js.map +0 -1
  433. package/dist/src/sync/v2/export/factory.js +0 -56
  434. package/dist/src/sync/v2/export/factory.js.map +0 -1
  435. package/dist/src/sync/v2/export/manifest.js +0 -169
  436. package/dist/src/sync/v2/export/manifest.js.map +0 -1
  437. package/dist/src/sync/v2/export/pages/AnalyticalListPage.js +0 -44
  438. package/dist/src/sync/v2/export/pages/AnalyticalListPage.js.map +0 -1
  439. package/dist/src/sync/v2/export/pages/ListReport.js +0 -41
  440. package/dist/src/sync/v2/export/pages/ListReport.js.map +0 -1
  441. package/dist/src/sync/v2/export/pages/ObjectPage.js +0 -74
  442. package/dist/src/sync/v2/export/pages/ObjectPage.js.map +0 -1
  443. package/dist/src/sync/v2/export/pages/OverviewPage.js +0 -118
  444. package/dist/src/sync/v2/export/pages/OverviewPage.js.map +0 -1
  445. package/dist/src/sync/v2/export/pages/index.js +0 -10
  446. package/dist/src/sync/v2/export/pages/index.js.map +0 -1
  447. package/dist/src/sync/v2/export/view-controller-generator.js +0 -141
  448. package/dist/src/sync/v2/export/view-controller-generator.js.map +0 -1
  449. package/dist/src/sync/v2/generate/analyticalListReport.js +0 -84
  450. package/dist/src/sync/v2/generate/analyticalListReport.js.map +0 -1
  451. package/dist/src/sync/v2/generate/generate.js +0 -99
  452. package/dist/src/sync/v2/generate/generate.js.map +0 -1
  453. package/dist/src/sync/v2/generate/index.js +0 -14
  454. package/dist/src/sync/v2/generate/index.js.map +0 -1
  455. package/dist/src/sync/v2/generate/listReport.js +0 -116
  456. package/dist/src/sync/v2/generate/listReport.js.map +0 -1
  457. package/dist/src/sync/v2/generate/objectPage.js +0 -537
  458. package/dist/src/sync/v2/generate/objectPage.js.map +0 -1
  459. package/dist/src/sync/v2/generate/overviewPage.js +0 -70
  460. package/dist/src/sync/v2/generate/overviewPage.js.map +0 -1
  461. package/dist/src/sync/v2/generate/utils.js +0 -526
  462. package/dist/src/sync/v2/generate/utils.js.map +0 -1
  463. package/dist/src/sync/v2/import/app/appProvider.js +0 -145
  464. package/dist/src/sync/v2/import/app/appProvider.js.map +0 -1
  465. package/dist/src/sync/v2/import/app/ovpProvider.js +0 -33
  466. package/dist/src/sync/v2/import/app/ovpProvider.js.map +0 -1
  467. package/dist/src/sync/v2/import/common/index.js +0 -395
  468. package/dist/src/sync/v2/import/common/index.js.map +0 -1
  469. package/dist/src/sync/v2/import/controls/table.js +0 -32
  470. package/dist/src/sync/v2/import/controls/table.js.map +0 -1
  471. package/dist/src/sync/v2/import/getPageType.d.ts +0 -0
  472. package/dist/src/sync/v2/import/getPageType.js +0 -1
  473. package/dist/src/sync/v2/import/getPageType.js.map +0 -1
  474. package/dist/src/sync/v2/import/index.js +0 -11
  475. package/dist/src/sync/v2/import/index.js.map +0 -1
  476. package/dist/src/sync/v2/import/pages/analyticalListPage.js +0 -119
  477. package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +0 -1
  478. package/dist/src/sync/v2/import/pages/listReport.js +0 -143
  479. package/dist/src/sync/v2/import/pages/listReport.js.map +0 -1
  480. package/dist/src/sync/v2/import/pages/objectPage.js +0 -745
  481. package/dist/src/sync/v2/import/pages/objectPage.js.map +0 -1
  482. package/dist/src/sync/v2/import/pages/overviewPage.js +0 -107
  483. package/dist/src/sync/v2/import/pages/overviewPage.js.map +0 -1
  484. package/dist/src/sync/v2/import/utils.js +0 -149
  485. package/dist/src/sync/v2/import/utils.js.map +0 -1
  486. package/dist/src/sync/v2/types.js +0 -36
  487. package/dist/src/sync/v2/types.js.map +0 -1
  488. package/dist/src/sync/v4/utils/StableIdHelper.js +0 -156
  489. package/dist/src/sync/v4/utils/StableIdHelper.js.map +0 -1
  490. package/dist/src/v2.js +0 -8
  491. package/dist/src/v2.js.map +0 -1
  492. package/dist/test/test-data/flexChange/v2/stta.prod.man/index.d.ts +0 -7
  493. package/dist/test/test-projects/index.d.ts +0 -2
  494. package/dist/test/test-utils/utils.d.ts +0 -33
  495. package/dist/test/unit/customSections/exportV2.test.d.ts +0 -1
  496. package/dist/test/unit/customSections/generateFacetsSchemaV2.test.d.ts +0 -1
  497. package/dist/test/unit/customSections/importV2.test.d.ts +0 -1
  498. package/dist/test/unit/export/exportALPV2.test.d.ts +0 -1
  499. package/dist/test/unit/export/exportAppV2.test.d.ts +0 -1
  500. package/dist/test/unit/export/exportLRPV2.test.d.ts +0 -1
  501. package/dist/test/unit/export/exportLRPV2CustomColumns.test.d.ts +0 -1
  502. package/dist/test/unit/export/exportOVPV2.test.d.ts +0 -1
  503. package/dist/test/unit/export/exportObjectPageV2.test.d.ts +0 -1
  504. package/dist/test/unit/export/flexUtils.test.d.ts +0 -1
  505. package/dist/test/unit/export/manifest.test.d.ts +0 -1
  506. package/dist/test/unit/fcl/exportV2.test.d.ts +0 -1
  507. package/dist/test/unit/fcl/importV2.test.d.ts +0 -1
  508. package/dist/test/unit/generateAppSchema/generateAppSchemaALPV2.test.d.ts +0 -1
  509. package/dist/test/unit/generateAppSchema/generateAppSchemaLRV2.test.d.ts +0 -1
  510. package/dist/test/unit/generateAppSchema/generateAppSchemaOPV2.test.d.ts +0 -1
  511. package/dist/test/unit/generateAppSchema/generateAppSchemaOVPV2.test.d.ts +0 -1
  512. package/dist/test/unit/generateGenericSchema/generateGenericSchemaAppV2.test.d.ts +0 -1
  513. package/dist/test/unit/generateGenericSchema/generateGenericSchemaLRV2.test.d.ts +0 -1
  514. package/dist/test/unit/generateGenericSchema/generateGenericSchemaOPV2.test.d.ts +0 -1
  515. package/dist/test/unit/generateGenericSchema/generateI18nV2.test.d.ts +0 -1
  516. package/dist/test/unit/generateGenericSchema/genericSchemas.test.d.ts +0 -1
  517. package/dist/test/unit/import/importALPV2.test.d.ts +0 -1
  518. package/dist/test/unit/import/importAppV2.test.d.ts +0 -1
  519. package/dist/test/unit/import/importLRPV2.test.d.ts +0 -1
  520. package/dist/test/unit/import/importOPV2.test.d.ts +0 -1
  521. package/dist/test/unit/import/importOVPV2.test.d.ts +0 -1
  522. package/dist/test/unit/index.test.d.ts +0 -1
  523. package/dist/test/unit/projects.test.d.ts +0 -1
  524. package/dist/test/unit/schemaAccess.test.d.ts +0 -1
  525. package/dist/test/unit/utils.test.d.ts +0 -1
  526. package/dist/test/unit/view-controller-generator.test.d.ts +0 -1
@@ -1,1072 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const common_1 = require("../../specification/common");
7
- const i18next_1 = __importDefault(require("i18next"));
8
- const v2_1 = require("../../specification/v2");
9
- const types_1 = require("./types");
10
- const annotation_converter_1 = require("@sap-ux/annotation-converter");
11
- const edmx_parser_1 = require("@sap-ux/edmx-parser");
12
- const schemaAccess_1 = require("../../specification/schemaAccess");
13
- const extensionLogger_1 = require("../../extensionLogger");
14
- const deepmerge_1 = __importDefault(require("deepmerge"));
15
- var TemplateType;
16
- (function (TemplateType) {
17
- TemplateType["ListReportObjectPageV2"] = "ListReportObjectPageV2";
18
- TemplateType["ListReportObjectPageV4"] = "ListReportObjectPageV4";
19
- TemplateType["OverviewPageV2"] = "OverviewPageV2";
20
- TemplateType["AnalyticalListPageV2"] = "AnalyticalListPageV2";
21
- })(TemplateType = exports.TemplateType || (exports.TemplateType = {}));
22
- exports.DEFINITION_LINK_PREFIX = '#/definitions/';
23
- /**
24
- * Function returns annotation path for schema based on received params.
25
- * @param entityTypeName - Entity type name.
26
- * @param term - Annotation term.
27
- * @param qualifier - Annotation qualifier.
28
- * @returns Annotation path based on received params
29
- */
30
- exports.createAnnotationPath = (entityTypeName, term, qualifier) => {
31
- let annotationPath = `/${entityTypeName}/@${term}`;
32
- if (qualifier) {
33
- annotationPath += `#${qualifier}`;
34
- }
35
- return annotationPath;
36
- };
37
- /**
38
- * Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools
39
- * @param annotationFiles - The list of all annotation files, in JSON format
40
- * @returns the complete service information
41
- */
42
- function parseAndMergeAndConvert(annotationFiles, logger) {
43
- const parseResult = [];
44
- let converterOutput;
45
- try {
46
- if (annotationFiles) {
47
- annotationFiles.forEach(function (annotationData) {
48
- parseResult.push(edmx_parser_1.parse(annotationData.fileContent, annotationData.dataSourceUri));
49
- });
50
- }
51
- if (parseResult.length > 0) {
52
- converterOutput = annotation_converter_1.convert(edmx_parser_1.merge(...parseResult));
53
- }
54
- if (logger && (converterOutput === null || converterOutput === void 0 ? void 0 : converterOutput.diagnostics)) {
55
- for (const converterMessage of converterOutput.diagnostics) {
56
- extensionLogger_1.log(logger, {
57
- severity: "error" /* Error */,
58
- message: converterMessage.message
59
- });
60
- }
61
- }
62
- }
63
- catch (error) {
64
- extensionLogger_1.log(logger, {
65
- severity: "error" /* Error */,
66
- message: i18next_1.default.t('ANNOERR')
67
- }, ...error);
68
- }
69
- return converterOutput;
70
- }
71
- exports.parseAndMergeAndConvert = parseAndMergeAndConvert;
72
- exports.getAnnotationPropertyValue = (annotationProperty) => (annotationProperty === null || annotationProperty === void 0 ? void 0 : annotationProperty.value) || (annotationProperty === null || annotationProperty === void 0 ? void 0 : annotationProperty.path);
73
- /**
74
- * Checks for Common.Label and overwrites the label from it if present
75
- * @param {PropertyAnnotations} annotations - property annotations
76
- * @param {EntityType} entityType - entity type
77
- * @param {string} label - label, to be actualized
78
- */
79
- function evaluateCommonLabel(annotations, entityType, label) {
80
- var _a, _b, _c, _d;
81
- if ((_a = annotations === null || annotations === void 0 ? void 0 : annotations.Common) === null || _a === void 0 ? void 0 : _a.Label) {
82
- if (typeof annotations.Common.Label === 'string') {
83
- label = annotations.Common.Label;
84
- }
85
- else if (annotations.Common.Label['type'] === 'Path') {
86
- const targetProperty = entityType.resolvePath(annotations.Common.Label['path']);
87
- if (targetProperty.value) {
88
- label = targetProperty.value;
89
- }
90
- else if (typeof ((_b = targetProperty.Common) === null || _b === void 0 ? void 0 : _b.Label) === 'string') {
91
- label = targetProperty.annotations.Common.Label;
92
- }
93
- }
94
- else if (typeof ((_d = (_c = annotations.Common) === null || _c === void 0 ? void 0 : _c.Label) === null || _d === void 0 ? void 0 : _d.toString()) === 'string') {
95
- label = annotations.Common.Label.toString();
96
- }
97
- }
98
- return label;
99
- }
100
- exports.evaluateCommonLabel = evaluateCommonLabel;
101
- /**
102
- * Determines the label for a property path
103
- * @param {PropertyPath} propertyPath - property path
104
- * @param {EntityType} entityType - entity type
105
- * @returns label, derived from Common.Label or from property value
106
- */
107
- function getLabelForPropertyPath(propertyPath, entityType) {
108
- let label = propertyPath.value;
109
- if (propertyPath.$target) {
110
- label = evaluateCommonLabel(propertyPath.$target.annotations, entityType, label);
111
- }
112
- return label;
113
- }
114
- exports.getLabelForPropertyPath = getLabelForPropertyPath;
115
- /**
116
- * Determines the label for a LineItem record
117
- * @param {DataFieldAbstractType} field - Line item record
118
- * @param {EntityType} entityType - entity type
119
- * @returns label, derived from Common.Label or from property value
120
- */
121
- function getLabelForDataField(field, entityType) {
122
- var _a, _b;
123
- let label, property;
124
- if (field['Value']) {
125
- if (typeof field['Value'] === 'string') {
126
- property = entityType.entityProperties.find((ep) => ep.name === field['Value']);
127
- }
128
- else {
129
- property = entityType.resolvePath(field['Value'].path);
130
- if (!property) {
131
- property = field['Value'].$target;
132
- }
133
- }
134
- }
135
- else if (field['Target'] && field['Target'].$target && field['Target'].$target.Value) {
136
- property = field['Target'].$target.Value.$target;
137
- }
138
- if ((_b = (_a = property === null || property === void 0 ? void 0 : property.annotations) === null || _a === void 0 ? void 0 : _a.Common) === null || _b === void 0 ? void 0 : _b.Label) {
139
- label = evaluateCommonLabel(property.annotations, entityType, label);
140
- }
141
- return label;
142
- }
143
- exports.getLabelForDataField = getLabelForDataField;
144
- /**
145
- * Function to resolve the dataField label
146
- * @param dataFieldLabel - Given dataField label; might be of type string, or an object in case of a path reference
147
- * @param entityType - the entity type as part of the AVT ConvertedMetadata
148
- * @returns undefined or the right string value
149
- */
150
- function getLabel(dataFieldLabel, entityType) {
151
- var _a, _b;
152
- if (typeof dataFieldLabel === 'string') {
153
- return dataFieldLabel;
154
- }
155
- else if (typeof dataFieldLabel === 'object' && dataFieldLabel.path) {
156
- const property = entityType.resolvePath(dataFieldLabel.path);
157
- if (!property || property.length === 0) {
158
- return undefined;
159
- }
160
- else {
161
- const singleProperty = property[0];
162
- if ((_b = (_a = singleProperty === null || singleProperty === void 0 ? void 0 : singleProperty.annotations) === null || _a === void 0 ? void 0 : _a.Common) === null || _b === void 0 ? void 0 : _b.Label) {
163
- const label = dataFieldLabel;
164
- return evaluateCommonLabel(singleProperty.annotations, entityType, label);
165
- }
166
- }
167
- }
168
- else {
169
- return undefined;
170
- }
171
- }
172
- function getTitleForDataField(dataField, entityType, dataFieldLabel) {
173
- const propertyCommonLabel = getLabelForDataField(dataField, entityType);
174
- return (dataFieldLabel ||
175
- propertyCommonLabel ||
176
- (dataField.Value.$target ? dataField.Value.$target.name : dataField.Value.value || dataField.Value.path));
177
- }
178
- /**
179
- * Determines the description of a data field, e.g. for the column header
180
- * @param dataFieldAbstract - the given record of the line item annotation
181
- * @param entityType - the entity type as part of the AVT ConvertedMetadata
182
- */
183
- function getDatafieldDescription(dataFieldAbstract, entityType) {
184
- let title = '', propertyCommonLabel, dataField;
185
- const dataFieldLabel = getLabel(dataFieldAbstract.Label, entityType);
186
- switch (dataFieldAbstract.$Type) {
187
- case "com.sap.vocabularies.UI.v1.DataField" /* DataField */:
188
- dataField = dataFieldAbstract;
189
- title = getTitleForDataField(dataField, entityType, dataFieldLabel);
190
- break;
191
- case "com.sap.vocabularies.UI.v1.DataFieldWithUrl" /* DataFieldWithUrl */:
192
- dataField = dataFieldAbstract;
193
- propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
194
- title =
195
- dataFieldLabel ||
196
- propertyCommonLabel ||
197
- (typeof dataField.Value === 'string' ? dataField.Value : dataField.Value.path);
198
- break;
199
- case "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* DataFieldForAnnotation */:
200
- dataField = dataFieldAbstract;
201
- propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
202
- title = dataFieldLabel || propertyCommonLabel || dataField.Target.$target.Title || dataField.Target.value;
203
- break;
204
- case "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */:
205
- case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */:
206
- dataField = dataFieldAbstract;
207
- if (dataFieldLabel) {
208
- title = typeof dataFieldLabel === 'string' ? dataFieldLabel : dataField.Action;
209
- }
210
- else {
211
- title = dataFieldAbstract.Action;
212
- }
213
- break;
214
- case "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation" /* DataFieldWithIntentBasedNavigation */:
215
- dataField = dataFieldAbstract;
216
- propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
217
- title = propertyCommonLabel || dataField.Value.path;
218
- break;
219
- case "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath" /* DataFieldWithNavigationPath */:
220
- dataField = dataFieldAbstract;
221
- title = getTitleForDataField(dataField, entityType, dataFieldLabel);
222
- break;
223
- default:
224
- break;
225
- }
226
- return title;
227
- }
228
- exports.getDatafieldDescription = getDatafieldDescription;
229
- /**
230
- * Return the page type for a given V2 page in manifest
231
- * @param name - page component name
232
- */
233
- function getPageTypeV2(name) {
234
- if (name) {
235
- const templatePart = `${v2_1.FE_TEMPLATE_V2}.`;
236
- return name.split(templatePart)[1];
237
- }
238
- }
239
- exports.getPageTypeV2 = getPageTypeV2;
240
- function getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys = false) {
241
- const termWithQualifier = `${targetAnnotation.term}#${targetAnnotation.qualifier}`;
242
- return `${!keyForRelatedFacetKeys ? '@' : ''}${targetAnnotation.qualifier ? termWithQualifier : targetAnnotation.term}`;
243
- }
244
- /**
245
- * Finds the alias for a given namespace in the references' section of the converted service metadata
246
- * @param {string} namespace - complete namespace, e.g. 'com.sap.vocabularies.UI.v1'
247
- * @param {ConvertedMetadata} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
248
- * @returns alias for the given namespace
249
- */
250
- function findAlias(namespace, oDataServiceAVT) {
251
- let aliasReference = oDataServiceAVT.references.find((reference) => {
252
- return reference.namespace === namespace;
253
- });
254
- if (!aliasReference) {
255
- aliasReference = oDataServiceAVT.references.find((reference) => {
256
- return reference.alias === namespace;
257
- });
258
- }
259
- if (!aliasReference) {
260
- aliasReference = oDataServiceAVT.references.find((reference) => {
261
- return (reference.alias.toUpperCase() ===
262
- namespace.split('SAP__')[namespace.split('SAP__').length - 1].toUpperCase());
263
- });
264
- }
265
- return aliasReference === null || aliasReference === void 0 ? void 0 : aliasReference.alias;
266
- }
267
- exports.findAlias = findAlias;
268
- /**
269
- * Determines the target annotation
270
- * @param navigationParts - parts of the target annotation path
271
- * @param entityType - entity type
272
- * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
273
- * @returns the target annotation
274
- */
275
- function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT) {
276
- var _a;
277
- const lastNavigationPart = navigationParts[navigationParts.length - 1];
278
- const annotation = lastNavigationPart.substring(lastNavigationPart.lastIndexOf('.') + 1, lastNavigationPart.length);
279
- const alias = findAlias(lastNavigationPart.substring(0, lastNavigationPart.lastIndexOf('.')).replace('@', ''), oDataServiceAVT);
280
- return (_a = entityType === null || entityType === void 0 ? void 0 : entityType.annotations[alias]) === null || _a === void 0 ? void 0 : _a[annotation];
281
- }
282
- /**
283
- * Adjust key by considering navigation
284
- * @param key - given key
285
- * @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
286
- * @param navigationParts - parts of the target annotation path
287
- */
288
- function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
289
- const uiClass = navigationParts[navigationParts.length - 1].split('#')[0];
290
- if (uiClass.includes('.LineItem')) {
291
- const pathParts = key.split('::');
292
- pathParts[pathParts.length - 1] = `${!keyForRelatedFacetKeys ? '@' : ''}${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`;
293
- key = pathParts.join('::');
294
- }
295
- else {
296
- key = uiClass.replace('@UI', `${!keyForRelatedFacetKeys ? '@' : ''}com.sap.vocabularies.UI.v1`);
297
- }
298
- return key;
299
- }
300
- function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = common_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
301
- var _a;
302
- let stopProcessing = false;
303
- const navigationParts = propertyValue.split('/');
304
- const navigation = navigationParts.length > 1;
305
- if (navigation) {
306
- entityType = (_a = entityType.resolvePath(propertyValue.substring(0, propertyValue.lastIndexOf('/')))) === null || _a === void 0 ? void 0 : _a.targetType;
307
- }
308
- key = adjustKey(key, navigationParts, keyForRelatedFacetKeys);
309
- const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
310
- if (targetAnnotation) {
311
- const separator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '#';
312
- key = getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys).replace('#', separator);
313
- }
314
- else {
315
- stopProcessing = true;
316
- return { key, entityType, stopProcessing };
317
- }
318
- if (navigation) {
319
- const navSeparator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '/';
320
- navigationParts.pop();
321
- const navigationIDs = [...navigationParts].join(navSeparator);
322
- key = `${navigationIDs}${navSeparator}${key}`;
323
- }
324
- return { key, entityType, stopProcessing };
325
- }
326
- /**
327
- * Resolve page section(get key and label->description).
328
- * @param facetDefinition - the actual annotation record
329
- * @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
330
- * @param {FioriElementsVersion} oDataVersion - OData version
331
- * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
332
- * @param {ExtensionLogger} logger - Logger class for logging messages
333
- * @returns {FacetSection} - object comprising the relevant facet information
334
- */
335
- function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, logger, oDataVersion = common_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
336
- //Take facet ID as fallback
337
- const facetName = facetDefinition.fullyQualifiedName.substring(facetDefinition.fullyQualifiedName.lastIndexOf('@'));
338
- let key = facetDefinition.ID ? facetDefinition.ID.toString() : facetName;
339
- let entityType = sourceEntityType; //default
340
- //If reference facet: overwrite with target annotation if present
341
- if (facetDefinition.$Type !== "com.sap.vocabularies.UI.v1.CollectionFacet" /* CollectionFacet */ && 'Target' in facetDefinition) {
342
- const propertyValue = exports.getAnnotationPropertyValue(facetDefinition.Target);
343
- if (!propertyValue) {
344
- extensionLogger_1.log(logger, {
345
- severity: "error" /* Error */,
346
- message: i18next_1.default.t('NOTARGET', { target: facetDefinition.Target })
347
- });
348
- return;
349
- }
350
- const { key: newKey, entityType: newEntityType, stopProcessing } = getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion, keyForRelatedFacetKeys);
351
- if (stopProcessing) {
352
- return;
353
- }
354
- key = newKey;
355
- entityType = newEntityType;
356
- }
357
- key = key.replace(/\//gi, '::');
358
- return key
359
- ? Object.assign(Object.assign(Object.assign({ key }, (facetDefinition.Label && { label: facetDefinition.Label.toString() })), (facetDefinition.ID && { ID: facetDefinition.ID.toString() })), { entityType }) : undefined;
360
- }
361
- exports.getSectionFacet = getSectionFacet;
362
- /**
363
- * Finds the alias for a given namespace in the references' section of the converted service metadata.
364
- * An empty object is created if the path element does not exist yet.
365
- * Exception: if an empty array is the next element of the 'path' definition, an empty array is created instaed of an empty object.
366
- * @param {object} manifest - manifest that is being modified during export
367
- * @param {string} path - path of the property in the manifest
368
- * @param {string} targetAnnotation - target annotation (optional)
369
- * @param {string} targetAnnotationEncoded - target annotation in its encoded form, as used in manifest settings
370
- * @param {boolean} importScenario - indicates if the function is called for the import, else it is the export
371
- * @returns returns section of the manifest based on path, generates an empty object in case it does not exists
372
- */
373
- exports.getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnnotationEncoded, importScenario = false) => {
374
- if (!path) {
375
- return undefined;
376
- }
377
- let manifestSection = manifest;
378
- const pathElements = path.split('/');
379
- for (let index = 0; index < pathElements.length; index++) {
380
- const element = pathElements[index];
381
- if (element === '[]') {
382
- continue;
383
- }
384
- const decodedElement = targetAnnotationEncoded && targetAnnotationEncoded === element
385
- ? targetAnnotation
386
- : element.replace('??', '/');
387
- //?? can be used in path functions to encoode /
388
- if (!manifestSection[decodedElement]) {
389
- if (importScenario) {
390
- manifestSection = undefined;
391
- break;
392
- }
393
- if (pathElements[index + 1] === '[]') {
394
- manifestSection[decodedElement] = [];
395
- }
396
- else {
397
- manifestSection[decodedElement] = {};
398
- }
399
- }
400
- manifestSection = manifestSection[decodedElement];
401
- }
402
- return manifestSection;
403
- };
404
- function getSchemaKeyOfLineItemRecord(lineItemRecord) {
405
- let schemaKey, target, value;
406
- switch (lineItemRecord.$Type) {
407
- case "com.sap.vocabularies.UI.v1.DataField" /* DataField */:
408
- schemaKey = exports.getAnnotationPropertyValue(lineItemRecord.Value);
409
- break;
410
- case "com.sap.vocabularies.UI.v1.DataFieldWithUrl" /* DataFieldWithUrl */:
411
- schemaKey =
412
- typeof lineItemRecord.Value === 'string'
413
- ? lineItemRecord.Value
414
- : exports.getAnnotationPropertyValue(lineItemRecord.Value);
415
- break;
416
- case "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* DataFieldForAnnotation */:
417
- target = lineItemRecord.Target.value;
418
- if (target) {
419
- schemaKey =
420
- 'DataFieldForAnnotation:::sTarget::' +
421
- target
422
- .replace('@UI', '@com.sap.vocabularies.UI.v1')
423
- .replace('@Communication', '@com.sap.vocabularies.Communication.v1')
424
- .replace('@Contact', '@com.sap.vocabularies.Contact.v1');
425
- }
426
- break;
427
- case "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */:
428
- if (lineItemRecord.Inline) {
429
- schemaKey = `DataFieldForAction:::sAction::${prepareRef(lineItemRecord.Action)}`;
430
- }
431
- break;
432
- case "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation" /* DataFieldWithIntentBasedNavigation */:
433
- value = exports.getAnnotationPropertyValue(lineItemRecord.Value);
434
- schemaKey = `DataFieldWithIntentBasedNavigation:::sProperty::${value}:::sSemanticObject::${lineItemRecord.SemanticObject}:::sAction::${lineItemRecord.Action}`;
435
- break;
436
- case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */:
437
- if (lineItemRecord.Inline) {
438
- schemaKey = `DataFieldForIntentBasedNavigation:::sSemanticObject::${lineItemRecord.SemanticObject}:::sAction::${prepareRef(lineItemRecord.Action)}`;
439
- }
440
- break;
441
- case "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath" /* DataFieldWithNavigationPath */:
442
- value = exports.getAnnotationPropertyValue(lineItemRecord.Value);
443
- target = exports.getAnnotationPropertyValue(lineItemRecord.Target);
444
- schemaKey = 'DataFieldWithNavigationPath:::sProperty::' + value + ':::sTarget::' + target;
445
- break;
446
- default:
447
- break;
448
- }
449
- return schemaKey;
450
- }
451
- exports.getSchemaKeyOfLineItemRecord = getSchemaKeyOfLineItemRecord;
452
- /**
453
- * Evaluates the target annotation of a reference facet and actualizes the facets for the config
454
- * @param {AnnotationTerm} annotationRecord - the actual annotation record
455
- * @param {FacetConfigs} facets - list of facets in config format, to be updated
456
- * @param {string} serviceName - name of the service of the app
457
- * @param {string} entityName - the entity (type) name
458
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
459
- */
460
- /**
461
- * Evaluates the target annotation of a reference facet and actualizes the facets for the config
462
- * @param {AnnotationTerm} annotationRecord - the actual annotation record
463
- * @param {FacetConfigs} facets - list of facets in config format, to be updated
464
- * @param {EntityType} entityType - the entity type
465
- * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
466
- * @param {FioriElementsVersion} oDataVersion - OData version
467
- * @param {ExtensionLogger} logger - Logger class for logging messages
468
- */
469
- function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
470
- var _a, _b, _c, _d, _e, _f;
471
- const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
472
- let path = section ? section.key : '';
473
- const targetEntityType = section.entityType;
474
- let annotation, targetAnnotation;
475
- if (path.includes("com.sap.vocabularies.UI.v1.Chart" /* Chart */) || path.includes(alias + '.Chart')) {
476
- facets[path] = { base: types_1.FacetBase.Chart };
477
- facets[path].entityType = targetEntityType;
478
- }
479
- else if (path.includes("com.sap.vocabularies.UI.v1.Identification" /* Identification */) || path.includes(alias + '.Identification')) {
480
- annotation = path.split('.')[path.split('.').length - 1];
481
- targetAnnotation = targetEntityType.annotations[alias][annotation];
482
- facets[path] = { base: types_1.FacetBase.Identification };
483
- facets[path].entityType = targetEntityType;
484
- facets[path].target = targetAnnotation;
485
- }
486
- else if (entityType && (path.includes("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */) || path.includes(alias + '.LineItem'))) {
487
- if (!path.includes("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */) && path.includes('.LineItem')) {
488
- const pathParts = path.split('::');
489
- pathParts[pathParts.length - 1] = `@${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`;
490
- path = pathParts.join('::');
491
- }
492
- facets[path] = { base: types_1.FacetBase.LineItem };
493
- facets[path].target = (_a = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _a === void 0 ? void 0 : _a.$target;
494
- facets[path].entityType = targetEntityType;
495
- }
496
- else if (path.includes("com.sap.vocabularies.UI.v1.FieldGroup" /* FieldGroup */) || path.includes(alias + '.FieldGroup')) {
497
- facets[path] = { base: types_1.FacetBase.Form };
498
- facets[path].target = (_b = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _b === void 0 ? void 0 : _b.$target;
499
- facets[path].entityType = targetEntityType;
500
- }
501
- else if (path.includes("com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */) || path.includes(alias + '.DataPoint')) {
502
- facets[path] = { base: types_1.FacetBase.DataPoint };
503
- facets[path].target = (_c = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _c === void 0 ? void 0 : _c.$target;
504
- facets[path].entityType = targetEntityType;
505
- facets[path].Label = (_d = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _d === void 0 ? void 0 : _d.$target['Title'];
506
- }
507
- else if (path.includes('com.sap.vocabularies.Communication.v1.Contact') || path.includes(alias + '.Contact')) {
508
- facets[path] = { base: types_1.FacetBase.Contact };
509
- facets[path].target = (_e = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _e === void 0 ? void 0 : _e.$target;
510
- facets[path].entityType = targetEntityType;
511
- }
512
- else if (path.includes('com.sap.vocabularies.Communication.v1.Address') || path.includes(alias + '.Address')) {
513
- facets[path] = { base: types_1.FacetBase.Address };
514
- facets[path].target = (_f = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _f === void 0 ? void 0 : _f.$target;
515
- facets[path].entityType = targetEntityType;
516
- }
517
- else {
518
- facets[path] = { base: types_1.FacetBase.Unknown };
519
- }
520
- if (facets[path]) {
521
- facets[path].annotationPath = `/${annotationRecord.fullyQualifiedName.replace('@com.sap.vocabularies', types_1.VOCWITHSLASH)}`;
522
- if (annotationRecord.Label) {
523
- facets[path].Label = annotationRecord.Label;
524
- }
525
- // Add Facet ID
526
- if (annotationRecord.ID) {
527
- facets[path]['ID'] = annotationRecord.ID;
528
- }
529
- else if (oDataVersion === common_1.FioriElementsVersion.v4) {
530
- extensionLogger_1.log(logger, {
531
- severity: "error" /* Error */,
532
- message: i18next_1.default.t('NOID4SECTION', { facet: annotationRecord.fullyQualifiedName })
533
- });
534
- }
535
- if (section && section.entityType) {
536
- facets[path].entityType = section.entityType;
537
- }
538
- }
539
- }
540
- /**
541
- * Adds the information from facets to the config
542
- * @param {AnnotationTerm} annotationRecord - the actual annotation record
543
- * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
544
- * @param {string} serviceName - name of the service of the app
545
- * @param {string} entityName - the entity (type) name
546
- * @param {FacetConfigs} facets - list of facets in config format, to be updated
547
- * @param {FioriElementsVersion} oDataVersion - OData version
548
- * @param {ExtensionLogger} logger - Logger class for logging messages
549
- */
550
- function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
551
- var _a;
552
- const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
553
- if (section) {
554
- switch (annotationRecord.$Type) {
555
- case "com.sap.vocabularies.UI.v1.ReferenceFacet" /* ReferenceFacet */: {
556
- evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion, logger);
557
- break;
558
- }
559
- case "com.sap.vocabularies.UI.v1.CollectionFacet" /* CollectionFacet */: {
560
- const annotationPath = `/${entityType.fullyQualifiedName}/${annotationRecord.fullyQualifiedName.split(entityType.fullyQualifiedName)[1]}`;
561
- const facet = (facets[section.key] = {
562
- base: types_1.FacetBase.CollectionFacet,
563
- facets: {},
564
- ID: section.ID,
565
- annotationPath: annotationPath,
566
- Label: section.label
567
- });
568
- (_a = annotationRecord.Facets) === null || _a === void 0 ? void 0 : _a.forEach((collectionItem) => {
569
- addFacetToConfig(collectionItem, oDataServiceAVT, serviceName, entityType, facet.facets, oDataVersion, logger);
570
- });
571
- break;
572
- }
573
- }
574
- }
575
- }
576
- /**
577
- * Retrieve header facet configurations that can be used to generate ObjectPage schemas
578
- * @param {QualifiedName} entityTypeName - the name of the actual entity type
579
- * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
580
- * @param {FioriElementsVersion} oDataVersion - OData version
581
- * @param {ExtensionLogger} logger - Logger class for logging messages
582
- */
583
- function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
584
- const facets = {};
585
- if (!entityType || !entityType.annotations) {
586
- return;
587
- }
588
- const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
589
- const facetAnnotation = alias && entityType.annotations[alias] && entityType.annotations[alias].HeaderFacets;
590
- if (facetAnnotation) {
591
- const lastDot = entityType.fullyQualifiedName.lastIndexOf('.');
592
- const serviceName = entityType.fullyQualifiedName.substr(0, lastDot);
593
- // Add facets to configuration
594
- facetAnnotation.forEach((item) => {
595
- addFacetToConfig(item, oDataServiceAVT, serviceName, entityType, facets, oDataVersion, logger);
596
- });
597
- }
598
- return facets;
599
- }
600
- exports.getObjectPageHeaderFacets = getObjectPageHeaderFacets;
601
- /**
602
- * Retrieve facet configurations that can be used to generate ObjectPage schemas
603
- * @param {QualifiedName} entityTypeName - the name of the actual entity type
604
- * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
605
- * @param {FioriElementsVersion} oDataVersion - OData version
606
- * @param {ExtensionLogger} logger - Logger class for logging messages
607
- */
608
- function getObjectPageFacets(entityType, oDataServiceAVT, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
609
- const facets = {};
610
- if (!entityType || !entityType.annotations) {
611
- return;
612
- }
613
- const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
614
- const facetAnnotation = alias && entityType.annotations[alias] && entityType.annotations[alias].Facets;
615
- if (facetAnnotation) {
616
- const lastDot = entityType.fullyQualifiedName.lastIndexOf('.');
617
- const serviceName = entityType.fullyQualifiedName.substr(0, lastDot);
618
- // Add facets to configuration
619
- facetAnnotation.forEach((item) => {
620
- addFacetToConfig(item, oDataServiceAVT, serviceName, entityType, facets, oDataVersion, logger);
621
- });
622
- }
623
- return facets;
624
- }
625
- exports.getObjectPageFacets = getObjectPageFacets;
626
- /**
627
- * Returns the version of Fiori elements (v2/v4) from a given manifest
628
- * @param manifest - the manifest.json file
629
- */
630
- function getVersionFromManifest(manifest) {
631
- if (manifest[common_1.ManifestSection.generic] || manifest[common_1.ManifestSection.ovp]) {
632
- return common_1.FioriElementsVersion.v2;
633
- }
634
- else {
635
- return common_1.FioriElementsVersion.v4;
636
- }
637
- }
638
- exports.getVersionFromManifest = getVersionFromManifest;
639
- /**
640
- * Determines the template type of a V2 app
641
- * @param manifest - the manifest.json file
642
- * @param {ExtensionLogger} logger - Logger class for logging messages
643
- * @returns {TemplateType} the template type
644
- */
645
- function determineV2Template(manifest, logger) {
646
- let templateType;
647
- if (manifest[common_1.ManifestSection.generic]) {
648
- const v2Pages = manifest[common_1.ManifestSection.generic].pages;
649
- if (!v2Pages) {
650
- extensionLogger_1.log(logger, {
651
- severity: "error" /* Error */,
652
- message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
653
- location: {
654
- path: types_1.MANIFESTPATH,
655
- range: [common_1.ManifestSection.generic]
656
- }
657
- });
658
- return;
659
- }
660
- for (const pageKey in v2Pages) {
661
- const v2Page = v2Pages[pageKey];
662
- if (getPageTypeV2(v2Page.component.name) === common_1.PageType.AnalyticalListPage) {
663
- templateType = TemplateType.AnalyticalListPageV2;
664
- break;
665
- }
666
- else if (getPageTypeV2(v2Page.component.name) === common_1.PageType.ListReport) {
667
- templateType = TemplateType.ListReportObjectPageV2;
668
- break;
669
- }
670
- }
671
- }
672
- else {
673
- if (!templateType) {
674
- extensionLogger_1.log(logger, {
675
- severity: "error" /* Error */,
676
- message: i18next_1.default.t('NOTEMPLATE', { section: common_1.ManifestSection.generic }),
677
- location: {
678
- path: types_1.MANIFESTPATH,
679
- range: [common_1.ManifestSection.generic]
680
- }
681
- });
682
- }
683
- }
684
- return templateType;
685
- }
686
- exports.determineV2Template = determineV2Template;
687
- /**
688
- * Determines the template type, based on the given manifest entries of the app
689
- * @param manifest - the manifest.json file
690
- * @param {FioriElementsVersion} fioriElementsVersion - OData or FE version
691
- * @param {ExtensionLogger} logger - Logger class for logging messages
692
- * @returns {TemplateType} the template type
693
- */
694
- function getTemplateTypeFromManifest(manifest, fioriElementsVersion, logger) {
695
- let templateType;
696
- if (manifest[common_1.ManifestSection.ovp]) {
697
- templateType = TemplateType.OverviewPageV2;
698
- }
699
- else if (fioriElementsVersion === common_1.FioriElementsVersion.v2) {
700
- templateType = determineV2Template(manifest, logger);
701
- }
702
- return templateType;
703
- }
704
- exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
705
- /**
706
- * Adds title and description to a section or header section in an app schema
707
- * @param facet - intermediate facet structure comprising annotation information
708
- * @param section - section in the app schema
709
- * @param facetKey - key of the facet
710
- */
711
- function addSectionTitleAndDescription(facet, section, facetKey) {
712
- if (facet === null || facet === void 0 ? void 0 : facet.ID) {
713
- section.title = types_1.FacetTitlePrefix + facet.ID;
714
- }
715
- else {
716
- section.title = facetKey.replace(/@com.sap/g, 'com.sap');
717
- }
718
- // Description
719
- if (facet === null || facet === void 0 ? void 0 : facet.Label) {
720
- section.description = facet.Label;
721
- }
722
- else if (facet === null || facet === void 0 ? void 0 : facet.ID) {
723
- section.description = facet.ID;
724
- }
725
- else {
726
- section.description = facetKey.substr(facetKey.lastIndexOf('.') + 1);
727
- }
728
- }
729
- exports.addSectionTitleAndDescription = addSectionTitleAndDescription;
730
- /**
731
- * Adds target title or description to a section or header section in an app schema
732
- * @param facet - intermediate facet structure comprising annotation information
733
- * @param section - section in the app schema
734
- * @param facetKey - key of the facet
735
- */
736
- function addTargetTitleAndSectionDescription(facet, section, facetKey) {
737
- var _a;
738
- addSectionTitleAndDescription(facet, section, facetKey);
739
- if (facet === null || facet === void 0 ? void 0 : facet.Label) {
740
- section.description = facet === null || facet === void 0 ? void 0 : facet.Label;
741
- }
742
- else if (facet === null || facet === void 0 ? void 0 : facet['Title']) {
743
- section.description = facet['Title'];
744
- }
745
- else if ((_a = facet === null || facet === void 0 ? void 0 : facet.target) === null || _a === void 0 ? void 0 : _a['Title']) {
746
- section.description = facet.target['Title'];
747
- }
748
- }
749
- exports.addTargetTitleAndSectionDescription = addTargetTitleAndSectionDescription;
750
- /**
751
- * Creates a default object for a new section or subsection, and adds the ID as title if present.
752
- * @param facet Facet configuration, to be analyzed
753
- * @returns the new section object
754
- */
755
- function createDefaultSection(appSchema, facet, facetKey) {
756
- if (!facet) {
757
- return undefined;
758
- }
759
- let section;
760
- if (appSchema.definitions.ObjectPageSection) {
761
- //base type in V2, with properties
762
- section = JSON.parse(JSON.stringify(appSchema.definitions.ObjectPageSection));
763
- }
764
- else {
765
- section = {
766
- type: 'object',
767
- properties: {},
768
- additionalProperties: false
769
- };
770
- section[types_1.SchemaTag.isViewNode] = true;
771
- }
772
- section[types_1.SchemaTag.annotationPath] = facet.annotationPath;
773
- addSectionTitleAndDescription(facet, section, facetKey);
774
- return section;
775
- }
776
- exports.createDefaultSection = createDefaultSection;
777
- /**
778
- * Retrieve page section data(so far id/key and label/description).
779
- * @param {EntityType} entityType The actual entityType
780
- * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
781
- * @param {ExtensionLogger} logger - Logger class for logging messages
782
- * @param {FioriElementsVersion} oDataVersion - OData version
783
- * @param {boolean} [checkUnresolvableFacets=false] - Check and avoid facets and sections without ID and Target.
784
- * @returns {FacetSection[]} - Array of facets or sections
785
- */
786
- function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVersion = common_1.FioriElementsVersion.v2, checkUnresolvableFacets = false) {
787
- const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
788
- let sections = [];
789
- if (entityType) {
790
- const facetAnnotation = alias && entityType.annotations && entityType.annotations[alias] && entityType.annotations[alias].Facets;
791
- if (facetAnnotation) {
792
- sections = facetAnnotation.reduce(function (result, item) {
793
- if (checkUnresolvableFacets && !item['ID'] && !('Target' in item && item['Target'])) {
794
- return result;
795
- }
796
- const section = getSectionFacet(item, entityType, oDataServiceAVT, logger, oDataVersion, true);
797
- if (section) {
798
- result.push(section);
799
- }
800
- return result;
801
- }, sections);
802
- }
803
- return sections;
804
- }
805
- }
806
- exports.getObjectPageFacetSection = getObjectPageFacetSection;
807
- /**
808
- * Cleans empty sub-structures from the export result for manifest
809
- * @param manifest - manifest.json part of the export result
810
- * @param path - path in the manifest
811
- * @param targetAnnotation - target annotation (optional, in case of sections, subsections)
812
- * @param targetAnnotationEncoded - encoded version of the target annotation, as represented in the manifest
813
- */
814
- exports.deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
815
- if (!path) {
816
- return;
817
- }
818
- let manifestSection = manifest;
819
- const pathArray = path.split('/');
820
- pathArray.forEach(function (element) {
821
- const decodedElement = targetAnnotationEncoded && targetAnnotationEncoded === element
822
- ? targetAnnotation
823
- : element.replace('??', '/');
824
- if (!manifestSection[decodedElement]) {
825
- return;
826
- }
827
- if (Object.keys(manifestSection[decodedElement]).length === 0) {
828
- if (Array.isArray(manifestSection)) {
829
- manifestSection.splice(Number(decodedElement), 1);
830
- }
831
- else {
832
- delete manifestSection[decodedElement];
833
- }
834
- pathArray.pop();
835
- exports.deleteEmptyStructure(manifest, pathArray.join('/'), targetAnnotation, targetAnnotationEncoded);
836
- return;
837
- }
838
- manifestSection = manifestSection && manifestSection[decodedElement];
839
- });
840
- };
841
- /**
842
- * Method which returns generic schema file name.
843
- * @param {SchemaType | PageType} schemaType Schema type or Page type.
844
- * @return {string} File name of generic schema.
845
- */
846
- const getGenericSchemaFileName = (schemaType) => {
847
- return `${schemaType}`;
848
- };
849
- /**
850
- * Method which returns schema file name and path depending on passed schema or page type.
851
- * @param {SchemaType | PageType} schemaType Schema type or Page type.
852
- * @param {string} [entitySet] Entity set string.
853
- * @return {SchemaFilePath} File path info.
854
- */
855
- exports.getSchemaFilePath = (schemaType, entitySet) => {
856
- const schemaFile = {
857
- filename: '',
858
- path: ''
859
- };
860
- switch (schemaType) {
861
- // Application schema
862
- case schemaAccess_1.SchemaType.Application: {
863
- // File name
864
- schemaFile.filename = `App`;
865
- // Full path
866
- schemaFile.path = `./${types_1.DirName.Schemas}/${schemaFile.filename}`;
867
- break;
868
- }
869
- // List report and object page
870
- case schemaAccess_1.SchemaType.ListReport:
871
- case schemaAccess_1.SchemaType.ObjectPage: {
872
- // File name
873
- schemaFile.filename = entitySet ? `${schemaType}_${entitySet}` : getGenericSchemaFileName(schemaType);
874
- // Full path
875
- schemaFile.path = `../${types_1.DirName.Schemas}/${schemaFile.filename}`;
876
- break;
877
- }
878
- // Other page configs
879
- default: {
880
- // File name
881
- schemaFile.filename = getGenericSchemaFileName(schemaType);
882
- // Full path
883
- schemaFile.path = `../${types_1.DirName.Schemas}/${schemaFile.filename}`;
884
- break;
885
- }
886
- }
887
- schemaFile.path += '.json';
888
- return schemaFile;
889
- };
890
- /**
891
- * Method which generates id of page according to passed parameters.
892
- * @param appVersion - Fiori Elements version - V2 or V4.
893
- * @param pageType - Page type.
894
- * @param entitySet - Entity Set.
895
- * @param viewId - Custom page's viewId (optional).
896
- * @returns {string} Generated page id
897
- */
898
- function generatePageId(pageType, entitySet, viewId) {
899
- if (pageType === common_1.PageType.CustomPage) {
900
- const names = viewId && viewId.split('.');
901
- return names && names[names.length - 1] + 'Page';
902
- }
903
- const parts = [];
904
- parts.push(pageType);
905
- if (entitySet) {
906
- parts.push(entitySet);
907
- }
908
- return parts.join('_');
909
- }
910
- exports.generatePageId = generatePageId;
911
- function fillArrayFromAnyOfReference(element, appSchema, currentConfigObject, definitionArray) {
912
- const $ref = element.$ref;
913
- if ($ref) {
914
- const definitionKey = $ref.split(exports.DEFINITION_LINK_PREFIX)[1];
915
- if (appSchema.definitions[definitionKey]) {
916
- const controlProperty = appSchema.definitions[definitionKey]['controlProperty'];
917
- if ($ref.includes(currentConfigObject[controlProperty])) {
918
- definitionArray.push(definitionKey);
919
- }
920
- }
921
- }
922
- }
923
- /**
924
- * Fills an array of next definitions from given references in the JSON schema
925
- * @param propertyDefinition - Definition of the current property in schema
926
- * @param currentConfigObject - Current object in the config JSON. Evaluated to get the right value of a cntrolling property,
927
- * for making the right choice in case of multiple options (anyOf)
928
- * @param appSchema - app-spcific JSON schema
929
- * @returns an array of definitions to proceed with
930
- */
931
- function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject, appSchema) {
932
- const definitionArray = [];
933
- if (propertyDefinition.$ref) {
934
- definitionArray.push(propertyDefinition.$ref.split(exports.DEFINITION_LINK_PREFIX)[1]);
935
- }
936
- else if (propertyDefinition.anyOf) {
937
- if (currentConfigObject) {
938
- propertyDefinition.anyOf.forEach((element) => {
939
- fillArrayFromAnyOfReference(element, appSchema, currentConfigObject, definitionArray);
940
- });
941
- }
942
- if (definitionArray.length === 0) {
943
- return undefined;
944
- }
945
- }
946
- return definitionArray;
947
- }
948
- /**
949
- * Determines the next definition to be handled, based on the definition array.
950
- * It also creates the Metadata instance for the next definition, to subsequently access metadata like the syncRule
951
- * @param definitionArray - Array of definitions, as determined by fillArrayFromNextDefinition
952
- * @param appSchema - app-spcific JSON schema
953
- * @param title - default title
954
- * @param currentConfigObject - Current object in the config JSON.
955
- * @param key - actual key
956
- * @param {MetadataInstanceInterface} factory - factory for creating metadata instances
957
- * @param pageType - page type
958
- * @param propertyDefinition - Definition of the current property in schema
959
- * @returns {NextDefinition} - Next target definition to process
960
- */
961
- function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema, title, currentConfigObject, key, factory, pageType, propertyDefinition) {
962
- var _a, _b, _c, _d;
963
- let nextDefinition = {
964
- configObject: undefined,
965
- targetDefinition: {},
966
- title: ''
967
- };
968
- if (definitionArray.length) {
969
- const lastDefinition = definitionArray[definitionArray.length - 1];
970
- nextDefinition.targetDefinition = appSchema['definitions'][lastDefinition];
971
- if (((_a = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition.targetDefinition) === null || _a === void 0 ? void 0 : _a['$ref']) || ((_b = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition.targetDefinition) === null || _b === void 0 ? void 0 : _b['type']) === 'array') {
972
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
973
- nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, nextDefinition.targetDefinition, key, factory, pageType);
974
- return nextDefinition;
975
- }
976
- if (definitionArray.length > 1) {
977
- definitionArray.forEach((element) => {
978
- if (element !== '') {
979
- nextDefinition.targetDefinition['properties'] = Object.assign(Object.assign({}, nextDefinition.targetDefinition['properties']), appSchema['definitions'][element]['properties']);
980
- }
981
- });
982
- }
983
- nextDefinition.title = ((_c = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition.targetDefinition) === null || _c === void 0 ? void 0 : _c['title']) ? nextDefinition.targetDefinition['title']
984
- : title;
985
- const factoryKey = lastDefinition === null || lastDefinition === void 0 ? void 0 : lastDefinition.split('<')[0];
986
- const targetObject = currentConfigObject ? currentConfigObject : {};
987
- nextDefinition.configObject = factory.createInstance(pageType, factoryKey, targetObject, (_d = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition.targetDefinition) === null || _d === void 0 ? void 0 : _d['controlProperty']);
988
- }
989
- else {
990
- //e.g. sections ==> loop over all properties = subsections or other
991
- nextDefinition.targetDefinition = propertyDefinition;
992
- nextDefinition.title = nextDefinition.targetDefinition['title']
993
- ? nextDefinition.targetDefinition['title']
994
- : key;
995
- nextDefinition.configObject = currentConfigObject;
996
- }
997
- return nextDefinition;
998
- }
999
- /**
1000
- * Recursive function to determine the next config part, next definition in the app schema and the title
1001
- * @param appSchema - app-spcific JSON schema
1002
- * @param title - default title
1003
- * @param currentConfigObject - current part of the configuration that gets traversed
1004
- * @param propertyDefinition - definition of a given property in the app schema
1005
- * @param key - actual key
1006
- * @param {MetadataInstanceInterface} factory - factory for creating metadata instances
1007
- * @param pageType - page type
1008
- */
1009
- function getNextTargetDefinition(appSchema, title, currentConfigObject, propertyDefinition, key, factory, pageType) {
1010
- let nextDefinition;
1011
- if (propertyDefinition['type'] === 'array') {
1012
- nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, propertyDefinition['items'], key, factory, pageType);
1013
- return nextDefinition;
1014
- }
1015
- const definitionArray = fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject, appSchema);
1016
- if (!definitionArray) {
1017
- return undefined;
1018
- }
1019
- nextDefinition = determineNextDefinitionFromDefinitionArray(definitionArray, appSchema, title, currentConfigObject, key, factory, pageType, propertyDefinition);
1020
- return nextDefinition;
1021
- }
1022
- exports.getNextTargetDefinition = getNextTargetDefinition;
1023
- function prepareRef(refInput) {
1024
- return refInput.replace('#', '::').replace(/\//g, ':2f');
1025
- }
1026
- exports.prepareRef = prepareRef;
1027
- /**
1028
- * Custom array merge function called by deepmerge's merge function
1029
- *
1030
- * @param {*} target Target array
1031
- * @param {*} source Source array
1032
- * @param {*} options options object provided by deepmerge's merge function
1033
- * @returns
1034
- */
1035
- exports.arrayCombineMerge = (target, source, options) => {
1036
- const destination = target.slice();
1037
- source.forEach((item, index) => {
1038
- if (typeof destination[index] === 'undefined') {
1039
- destination[index] = options.cloneUnlessOtherwiseSpecified(item, options);
1040
- }
1041
- else if (options.isMergeableObject(item)) {
1042
- destination[index] = deepmerge_1.default(target[index], item, options);
1043
- }
1044
- else if (target.indexOf(item) === -1) {
1045
- destination.push(item);
1046
- }
1047
- });
1048
- return destination;
1049
- };
1050
- /**
1051
- * Converts an enum into a CSV
1052
- * @param {object} manifestSection - manifestSection where the key exists
1053
- * @param {object} configPart - Property as mentioned in config file
1054
- * @param {string} key - Property to be exported to manifest
1055
- */
1056
- function convertEnumToCSV(manifestSection, configPart, key) {
1057
- manifestSection[key] = JSON.parse(JSON.stringify(configPart[key]));
1058
- // convert enum array to joined string
1059
- const field = configPart[key];
1060
- manifestSection[key] = field.join();
1061
- }
1062
- exports.convertEnumToCSV = convertEnumToCSV;
1063
- /**
1064
- * Converts an action ID from the internal format (schema, config) to the stable ID representation
1065
- * @param actionId - the (unique) internal format of the action ID
1066
- * @returns the converted action ID
1067
- */
1068
- function convertActionKeyToStableId(actionId) {
1069
- return (actionId.indexOf('??') > -1 ? actionId.split('??')[1] : actionId).replace(/@/g, '::');
1070
- }
1071
- exports.convertActionKeyToStableId = convertActionKeyToStableId;
1072
- //# sourceMappingURL=utils.js.map