@sap/ux-specification 1.96.21 → 1.96.24

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 (295) hide show
  1. package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
  2. package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
  3. package/dist/documentation/v2/v2-ListReport.html +1 -1
  4. package/dist/documentation/v2/v2-ObjectPage.html +1 -1
  5. package/dist/documentation/v2/v2-OverviewPage.html +1 -1
  6. package/dist/documentation/v4/v4-ApplicationV4.html +1 -1
  7. package/dist/documentation/v4/v4-FreestylePage.html +1 -1
  8. package/dist/documentation/v4/v4-ListReport.html +1 -1
  9. package/dist/documentation/v4/v4-ObjectPage.html +1 -1
  10. package/dist/index-min.js +35 -35
  11. package/dist/index-min.js.map +3 -3
  12. package/dist/schemas/v4/ApplicationV4.json +26 -0
  13. package/dist/schemas/v4/ListReportConfig.json +20 -20
  14. package/dist/scripts/extractDocu.js +15 -3
  15. package/dist/scripts/extractDocu.js.map +1 -1
  16. package/dist/scripts/spec.js +1 -2
  17. package/dist/scripts/spec.js.map +1 -1
  18. package/dist/scripts/to-json-schema.js +17 -3
  19. package/dist/scripts/to-json-schema.js.map +1 -1
  20. package/dist/src/api.js +4 -3
  21. package/dist/src/api.js.map +1 -1
  22. package/dist/src/apiTypes.d.ts +4 -3
  23. package/dist/src/apiTypes.d.ts.map +1 -1
  24. package/dist/src/apiTypes.js +5 -2
  25. package/dist/src/apiTypes.js.map +1 -1
  26. package/dist/src/extensionLogger.d.ts +1 -1
  27. package/dist/src/extensionLogger.d.ts.map +1 -1
  28. package/dist/src/extensionLogger.js +3 -1
  29. package/dist/src/extensionLogger.js.map +1 -1
  30. package/dist/src/i18n/i18n.js +1 -0
  31. package/dist/src/i18n/i18n.js.map +1 -1
  32. package/dist/src/index.js +17 -10
  33. package/dist/src/index.js.map +1 -1
  34. package/dist/src/project.d.ts.map +1 -1
  35. package/dist/src/project.js +14 -10
  36. package/dist/src/project.js.map +1 -1
  37. package/dist/src/specification/schemaAccess.d.ts +1 -1
  38. package/dist/src/specification/schemaAccess.d.ts.map +1 -1
  39. package/dist/src/specification/schemaAccess.js +5 -2
  40. package/dist/src/specification/schemaAccess.js.map +1 -1
  41. package/dist/src/sync/common/appProvider.d.ts +2 -2
  42. package/dist/src/sync/common/appProvider.d.ts.map +1 -1
  43. package/dist/src/sync/common/appProvider.js +18 -27
  44. package/dist/src/sync/common/appProvider.js.map +1 -1
  45. package/dist/src/sync/common/decoration/control.d.ts +2 -2
  46. package/dist/src/sync/common/decoration/control.d.ts.map +1 -1
  47. package/dist/src/sync/common/decoration/control.js +15 -7
  48. package/dist/src/sync/common/decoration/control.js.map +1 -1
  49. package/dist/src/sync/common/decoration/decorators.d.ts.map +1 -1
  50. package/dist/src/sync/common/decoration/decorators.js +13 -6
  51. package/dist/src/sync/common/decoration/decorators.js.map +1 -1
  52. package/dist/src/sync/common/decoration/factory.js +1 -0
  53. package/dist/src/sync/common/decoration/factory.js.map +1 -1
  54. package/dist/src/sync/common/decoration/flex.js +1 -0
  55. package/dist/src/sync/common/decoration/flex.js.map +1 -1
  56. package/dist/src/sync/common/decoration/index.js +13 -6
  57. package/dist/src/sync/common/decoration/index.js.map +1 -1
  58. package/dist/src/sync/common/flexUtils.js +15 -2
  59. package/dist/src/sync/common/flexUtils.js.map +1 -1
  60. package/dist/src/sync/common/generate/index.js +12 -5
  61. package/dist/src/sync/common/generate/index.js.map +1 -1
  62. package/dist/src/sync/common/generate/objectPage.js +9 -7
  63. package/dist/src/sync/common/generate/objectPage.js.map +1 -1
  64. package/dist/src/sync/common/generate/utils.js +15 -12
  65. package/dist/src/sync/common/generate/utils.js.map +1 -1
  66. package/dist/src/sync/common/import/utils.js +1 -0
  67. package/dist/src/sync/common/import/utils.js.map +1 -1
  68. package/dist/src/sync/common/importProject.d.ts.map +1 -1
  69. package/dist/src/sync/common/importProject.js +21 -24
  70. package/dist/src/sync/common/importProject.js.map +1 -1
  71. package/dist/src/sync/common/index.js +19 -11
  72. package/dist/src/sync/common/index.js.map +1 -1
  73. package/dist/src/sync/common/types.d.ts +1 -1
  74. package/dist/src/sync/common/types.d.ts.map +1 -1
  75. package/dist/src/sync/common/types.js +1 -0
  76. package/dist/src/sync/common/types.js.map +1 -1
  77. package/dist/src/sync/common/utils.d.ts +3 -3
  78. package/dist/src/sync/common/utils.d.ts.map +1 -1
  79. package/dist/src/sync/common/utils.js +97 -78
  80. package/dist/src/sync/common/utils.js.map +1 -1
  81. package/dist/src/sync/i18n.js +15 -2
  82. package/dist/src/sync/i18n.js.map +1 -1
  83. package/dist/src/sync/v2/application.d.ts.map +1 -1
  84. package/dist/src/sync/v2/application.js +33 -16
  85. package/dist/src/sync/v2/application.js.map +1 -1
  86. package/dist/src/sync/v2/export/controls/Action.d.ts.map +1 -1
  87. package/dist/src/sync/v2/export/controls/Action.js +3 -1
  88. package/dist/src/sync/v2/export/controls/Action.js.map +1 -1
  89. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.d.ts.map +1 -1
  90. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +3 -1
  91. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +1 -1
  92. package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js +1 -0
  93. package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js.map +1 -1
  94. package/dist/src/sync/v2/export/controls/Card.js +1 -0
  95. package/dist/src/sync/v2/export/controls/Card.js.map +1 -1
  96. package/dist/src/sync/v2/export/controls/Field.js +1 -0
  97. package/dist/src/sync/v2/export/controls/Field.js.map +1 -1
  98. package/dist/src/sync/v2/export/controls/FilterBar.js +8 -2
  99. package/dist/src/sync/v2/export/controls/FilterBar.js.map +1 -1
  100. package/dist/src/sync/v2/export/controls/FormAction.js +1 -0
  101. package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -1
  102. package/dist/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
  103. package/dist/src/sync/v2/export/controls/Fragment.js +8 -8
  104. package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
  105. package/dist/src/sync/v2/export/controls/ObjectPageChart.js +1 -0
  106. package/dist/src/sync/v2/export/controls/ObjectPageChart.js.map +1 -1
  107. package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js +1 -0
  108. package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js.map +1 -1
  109. package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js +1 -0
  110. package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +1 -1
  111. package/dist/src/sync/v2/export/controls/ObjectPageHeader.js +1 -0
  112. package/dist/src/sync/v2/export/controls/ObjectPageHeader.js.map +1 -1
  113. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js +1 -0
  114. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
  115. package/dist/src/sync/v2/export/controls/ObjectPageLayout.js +1 -0
  116. package/dist/src/sync/v2/export/controls/ObjectPageLayout.js.map +1 -1
  117. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts.map +1 -1
  118. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +11 -5
  119. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
  120. package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
  121. package/dist/src/sync/v2/export/controls/ObjectPageTable.js +1 -0
  122. package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
  123. package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js +1 -0
  124. package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +1 -1
  125. package/dist/src/sync/v2/export/controls/Table.d.ts.map +1 -1
  126. package/dist/src/sync/v2/export/controls/Table.js +9 -9
  127. package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
  128. package/dist/src/sync/v2/export/controls/TableColumn.js +9 -2
  129. package/dist/src/sync/v2/export/controls/TableColumn.js.map +1 -1
  130. package/dist/src/sync/v2/export/controls/ToolBar.js +1 -0
  131. package/dist/src/sync/v2/export/controls/ToolBar.js.map +1 -1
  132. package/dist/src/sync/v2/export/controls/index.js +30 -23
  133. package/dist/src/sync/v2/export/controls/index.js.map +1 -1
  134. package/dist/src/sync/v2/export/export.js +13 -16
  135. package/dist/src/sync/v2/export/export.js.map +1 -1
  136. package/dist/src/sync/v2/export/exportPage.js +3 -3
  137. package/dist/src/sync/v2/export/exportPage.js.map +1 -1
  138. package/dist/src/sync/v2/export/factory.js +15 -2
  139. package/dist/src/sync/v2/export/factory.js.map +1 -1
  140. package/dist/src/sync/v2/export/manifest.d.ts +1 -1
  141. package/dist/src/sync/v2/export/manifest.d.ts.map +1 -1
  142. package/dist/src/sync/v2/export/manifest.js +7 -3
  143. package/dist/src/sync/v2/export/manifest.js.map +1 -1
  144. package/dist/src/sync/v2/export/pages/AnalyticalListPage.js +1 -0
  145. package/dist/src/sync/v2/export/pages/AnalyticalListPage.js.map +1 -1
  146. package/dist/src/sync/v2/export/pages/ListReport.js +1 -0
  147. package/dist/src/sync/v2/export/pages/ListReport.js.map +1 -1
  148. package/dist/src/sync/v2/export/pages/ObjectPage.js +1 -0
  149. package/dist/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
  150. package/dist/src/sync/v2/export/pages/OverviewPage.js +1 -0
  151. package/dist/src/sync/v2/export/pages/OverviewPage.js.map +1 -1
  152. package/dist/src/sync/v2/export/pages/index.js +14 -7
  153. package/dist/src/sync/v2/export/pages/index.js.map +1 -1
  154. package/dist/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
  155. package/dist/src/sync/v2/export/view-controller-generator.js +17 -8
  156. package/dist/src/sync/v2/export/view-controller-generator.js.map +1 -1
  157. package/dist/src/sync/v2/generate/analyticalListReport.js +5 -5
  158. package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
  159. package/dist/src/sync/v2/generate/generate.js +1 -0
  160. package/dist/src/sync/v2/generate/generate.js.map +1 -1
  161. package/dist/src/sync/v2/generate/index.js +8 -7
  162. package/dist/src/sync/v2/generate/index.js.map +1 -1
  163. package/dist/src/sync/v2/generate/listReport.d.ts +1 -1
  164. package/dist/src/sync/v2/generate/listReport.d.ts.map +1 -1
  165. package/dist/src/sync/v2/generate/listReport.js +29 -32
  166. package/dist/src/sync/v2/generate/listReport.js.map +1 -1
  167. package/dist/src/sync/v2/generate/objectPage.js +8 -6
  168. package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
  169. package/dist/src/sync/v2/generate/overviewPage.js +1 -0
  170. package/dist/src/sync/v2/generate/overviewPage.js.map +1 -1
  171. package/dist/src/sync/v2/generate/utils.js +17 -8
  172. package/dist/src/sync/v2/generate/utils.js.map +1 -1
  173. package/dist/src/sync/v2/import/app/appProvider.js +7 -1
  174. package/dist/src/sync/v2/import/app/appProvider.js.map +1 -1
  175. package/dist/src/sync/v2/import/app/ovpProvider.js +1 -0
  176. package/dist/src/sync/v2/import/app/ovpProvider.js.map +1 -1
  177. package/dist/src/sync/v2/import/common/index.js +24 -17
  178. package/dist/src/sync/v2/import/common/index.js.map +1 -1
  179. package/dist/src/sync/v2/import/controls/table.js +2 -1
  180. package/dist/src/sync/v2/import/controls/table.js.map +1 -1
  181. package/dist/src/sync/v2/import/index.js +15 -8
  182. package/dist/src/sync/v2/import/index.js.map +1 -1
  183. package/dist/src/sync/v2/import/pages/analyticalListPage.js +1 -0
  184. package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
  185. package/dist/src/sync/v2/import/pages/listReport.js +5 -1
  186. package/dist/src/sync/v2/import/pages/listReport.js.map +1 -1
  187. package/dist/src/sync/v2/import/pages/objectPage.js +36 -36
  188. package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
  189. package/dist/src/sync/v2/import/pages/overviewPage.js +2 -1
  190. package/dist/src/sync/v2/import/pages/overviewPage.js.map +1 -1
  191. package/dist/src/sync/v2/import/utils.js +5 -7
  192. package/dist/src/sync/v2/import/utils.js.map +1 -1
  193. package/dist/src/sync/v2/types.js +1 -0
  194. package/dist/src/sync/v2/types.js.map +1 -1
  195. package/dist/src/sync/v4/application.d.ts +2 -2
  196. package/dist/src/sync/v4/application.d.ts.map +1 -1
  197. package/dist/src/sync/v4/application.js +44 -37
  198. package/dist/src/sync/v4/application.js.map +1 -1
  199. package/dist/src/sync/v4/export/controls/FilterBar.js +1 -0
  200. package/dist/src/sync/v4/export/controls/FilterBar.js.map +1 -1
  201. package/dist/src/sync/v4/export/controls/ObjectPageCustomSection.js +1 -0
  202. package/dist/src/sync/v4/export/controls/ObjectPageCustomSection.js.map +1 -1
  203. package/dist/src/sync/v4/export/controls/ObjectPageHeader.js +1 -0
  204. package/dist/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
  205. package/dist/src/sync/v4/export/controls/ObjectPageHeaderSection.js +1 -0
  206. package/dist/src/sync/v4/export/controls/ObjectPageHeaderSection.js.map +1 -1
  207. package/dist/src/sync/v4/export/controls/ObjectPageLayout.js +1 -0
  208. package/dist/src/sync/v4/export/controls/ObjectPageLayout.js.map +1 -1
  209. package/dist/src/sync/v4/export/controls/ObjectPageTable.js +1 -0
  210. package/dist/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
  211. package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js +1 -0
  212. package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
  213. package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.js +1 -0
  214. package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
  215. package/dist/src/sync/v4/export/controls/Table.d.ts +25 -10
  216. package/dist/src/sync/v4/export/controls/Table.d.ts.map +1 -1
  217. package/dist/src/sync/v4/export/controls/Table.js +132 -69
  218. package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
  219. package/dist/src/sync/v4/export/controls/TableColumn.js +1 -0
  220. package/dist/src/sync/v4/export/controls/TableColumn.js.map +1 -1
  221. package/dist/src/sync/v4/export/controls/ToolBar.js +1 -0
  222. package/dist/src/sync/v4/export/controls/ToolBar.js.map +1 -1
  223. package/dist/src/sync/v4/export/controls/ToolBarAction.js +1 -0
  224. package/dist/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
  225. package/dist/src/sync/v4/export/controls/index.js +22 -15
  226. package/dist/src/sync/v4/export/controls/index.js.map +1 -1
  227. package/dist/src/sync/v4/export/export.d.ts +3 -2
  228. package/dist/src/sync/v4/export/export.d.ts.map +1 -1
  229. package/dist/src/sync/v4/export/export.js +45 -37
  230. package/dist/src/sync/v4/export/export.js.map +1 -1
  231. package/dist/src/sync/v4/export/exportCustomColumn.js +11 -1
  232. package/dist/src/sync/v4/export/exportCustomColumn.js.map +1 -1
  233. package/dist/src/sync/v4/export/factory.js +15 -2
  234. package/dist/src/sync/v4/export/factory.js.map +1 -1
  235. package/dist/src/sync/v4/export/flexibleColumnLayout.d.ts.map +1 -1
  236. package/dist/src/sync/v4/export/flexibleColumnLayout.js +8 -7
  237. package/dist/src/sync/v4/export/flexibleColumnLayout.js.map +1 -1
  238. package/dist/src/sync/v4/export/manifest.d.ts.map +1 -1
  239. package/dist/src/sync/v4/export/manifest.js +89 -44
  240. package/dist/src/sync/v4/export/manifest.js.map +1 -1
  241. package/dist/src/sync/v4/export/pages/FreestylePage.js +1 -0
  242. package/dist/src/sync/v4/export/pages/FreestylePage.js.map +1 -1
  243. package/dist/src/sync/v4/export/pages/ListReport.js +2 -2
  244. package/dist/src/sync/v4/export/pages/ListReport.js.map +1 -1
  245. package/dist/src/sync/v4/export/pages/ObjectPage.js +1 -0
  246. package/dist/src/sync/v4/export/pages/ObjectPage.js.map +1 -1
  247. package/dist/src/sync/v4/export/pages/index.js +13 -6
  248. package/dist/src/sync/v4/export/pages/index.js.map +1 -1
  249. package/dist/src/sync/v4/export/utils.js +1 -0
  250. package/dist/src/sync/v4/export/utils.js.map +1 -1
  251. package/dist/src/sync/v4/generate/freestylePage.js +1 -0
  252. package/dist/src/sync/v4/generate/freestylePage.js.map +1 -1
  253. package/dist/src/sync/v4/generate/generate.js +1 -0
  254. package/dist/src/sync/v4/generate/generate.js.map +1 -1
  255. package/dist/src/sync/v4/generate/index.js +7 -6
  256. package/dist/src/sync/v4/generate/index.js.map +1 -1
  257. package/dist/src/sync/v4/generate/listReport.d.ts.map +1 -1
  258. package/dist/src/sync/v4/generate/listReport.js +65 -33
  259. package/dist/src/sync/v4/generate/listReport.js.map +1 -1
  260. package/dist/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  261. package/dist/src/sync/v4/generate/objectPage.js +20 -10
  262. package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
  263. package/dist/src/sync/v4/import/app/appProvider.js +1 -0
  264. package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
  265. package/dist/src/sync/v4/import/app/baseAppProvider.d.ts +1 -1
  266. package/dist/src/sync/v4/import/app/baseAppProvider.d.ts.map +1 -1
  267. package/dist/src/sync/v4/import/app/baseAppProvider.js +51 -23
  268. package/dist/src/sync/v4/import/app/baseAppProvider.js.map +1 -1
  269. package/dist/src/sync/v4/import/app/freestyleProvider.js +1 -0
  270. package/dist/src/sync/v4/import/app/freestyleProvider.js.map +1 -1
  271. package/dist/src/sync/v4/import/app/index.js +7 -6
  272. package/dist/src/sync/v4/import/app/index.js.map +1 -1
  273. package/dist/src/sync/v4/import/fragment.js +8 -10
  274. package/dist/src/sync/v4/import/fragment.js.map +1 -1
  275. package/dist/src/sync/v4/import/index.js +12 -5
  276. package/dist/src/sync/v4/import/index.js.map +1 -1
  277. package/dist/src/sync/v4/import/pages/listReport.js +5 -5
  278. package/dist/src/sync/v4/import/pages/listReport.js.map +1 -1
  279. package/dist/src/sync/v4/import/pages/objectPage.js +9 -11
  280. package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
  281. package/dist/src/sync/v4/import/utils.js +3 -2
  282. package/dist/src/sync/v4/import/utils.js.map +1 -1
  283. package/dist/src/sync/v4/sync-rules/controllerExtensions.d.ts +9 -0
  284. package/dist/src/sync/v4/sync-rules/controllerExtensions.d.ts.map +1 -0
  285. package/dist/src/sync/v4/sync-rules/controllerExtensions.js +104 -0
  286. package/dist/src/sync/v4/sync-rules/controllerExtensions.js.map +1 -0
  287. package/dist/src/sync/v4/utils/StableIdHelper.d.ts +1 -1
  288. package/dist/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
  289. package/dist/src/sync/v4/utils/StableIdHelper.js +13 -24
  290. package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
  291. package/dist/src/sync/v4/utils/utils.d.ts +16 -18
  292. package/dist/src/sync/v4/utils/utils.d.ts.map +1 -1
  293. package/dist/src/sync/v4/utils/utils.js +41 -51
  294. package/dist/src/sync/v4/utils/utils.js.map +1 -1
  295. package/package.json +8 -8
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getDefinitionKey = exports.convertActionKeyToStableId = exports.convertEnumToCSV = exports.arrayCombineMerge = exports.getNextTargetDefinition = exports.generatePageId = exports.getSchemaFilePath = exports.deleteEmptyStructure = exports.getObjectPageFacetSection = exports.createDefaultSection = exports.addTargetTitleAndSectionDescription = exports.addSectionTitleAndDescription = exports.getTemplateTypeFromManifest = exports.determineV4Template = exports.determineV2Template = exports.getVersionFromManifest = exports.getObjectPageFacets = exports.getObjectPageHeaderFacets = exports.getSchemaKeyOfLineItemRecord = exports.getManifestSectionByPathV4 = exports.getSectionFacet = exports.findAlias = exports.getPageTypeV4 = exports.getPageTypeV2 = exports.prepareRef = exports.getDataFieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.DEFINITION_LINK_PREFIX = exports.TemplateType = void 0;
6
7
  const ux_specification_types_1 = require("@sap/ux-specification-types");
7
8
  const i18next_1 = __importDefault(require("i18next"));
8
9
  const deepmerge_1 = __importDefault(require("deepmerge"));
@@ -27,13 +28,14 @@ exports.DEFINITION_LINK_PREFIX = '#/definitions/';
27
28
  * @param qualifier - Annotation qualifier.
28
29
  * @returns Annotation path based on received params
29
30
  */
30
- exports.createAnnotationPath = (entityTypeName, term, qualifier) => {
31
+ const createAnnotationPath = (entityTypeName, term, qualifier) => {
31
32
  let annotationPath = `/${entityTypeName}/@${term}`;
32
33
  if (qualifier) {
33
34
  annotationPath += `#${qualifier}`;
34
35
  }
35
36
  return annotationPath;
36
37
  };
38
+ exports.createAnnotationPath = createAnnotationPath;
37
39
  /**
38
40
  * Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools
39
41
  * @param annotationFiles - The list of all annotation files, in JSON format
@@ -51,14 +53,6 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
51
53
  if (parseResult.length > 0) {
52
54
  converterOutput = annotation_converter_1.convert(edmx_parser_1.merge(...parseResult));
53
55
  }
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
56
  }
63
57
  catch (error) {
64
58
  extensionLogger_1.log(logger, {
@@ -69,7 +63,8 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
69
63
  return converterOutput;
70
64
  }
71
65
  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);
66
+ const getAnnotationPropertyValue = (annotationProperty) => annotationProperty?.value || annotationProperty?.path;
67
+ exports.getAnnotationPropertyValue = getAnnotationPropertyValue;
73
68
  /**
74
69
  * Checks for Common.Label and overwrites the label from it if present
75
70
  * @param {PropertyAnnotations} annotations - property annotations
@@ -77,8 +72,7 @@ exports.getAnnotationPropertyValue = (annotationProperty) => (annotationProperty
77
72
  * @param {string} label - label, to be actualized
78
73
  */
79
74
  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) {
75
+ if (annotations?.Common?.Label) {
82
76
  if (typeof annotations.Common.Label === 'string') {
83
77
  label = annotations.Common.Label;
84
78
  }
@@ -87,11 +81,11 @@ function evaluateCommonLabel(annotations, entityType, label) {
87
81
  if (targetProperty.value) {
88
82
  label = targetProperty.value;
89
83
  }
90
- else if (typeof ((_b = targetProperty.Common) === null || _b === void 0 ? void 0 : _b.Label) === 'string') {
84
+ else if (typeof targetProperty.Common?.Label === 'string') {
91
85
  label = targetProperty.annotations.Common.Label;
92
86
  }
93
87
  }
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') {
88
+ else if (typeof annotations.Common?.Label?.toString() === 'string') {
95
89
  label = annotations.Common.Label.toString();
96
90
  }
97
91
  }
@@ -119,7 +113,6 @@ exports.getLabelForPropertyPath = getLabelForPropertyPath;
119
113
  * @returns label, derived from Common.Label or from property value
120
114
  */
121
115
  function getLabelForDataField(field, entityType) {
122
- var _a, _b;
123
116
  let label, property;
124
117
  if (field['Value']) {
125
118
  if (typeof field['Value'] === 'string') {
@@ -135,7 +128,7 @@ function getLabelForDataField(field, entityType) {
135
128
  else if (field['Target'] && field['Target'].$target && field['Target'].$target.Value) {
136
129
  property = field['Target'].$target.Value.$target;
137
130
  }
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) {
131
+ if (property?.annotations?.Common?.Label) {
139
132
  label = evaluateCommonLabel(property.annotations, entityType, label);
140
133
  }
141
134
  return label;
@@ -148,7 +141,6 @@ exports.getLabelForDataField = getLabelForDataField;
148
141
  * @returns undefined or the right string value
149
142
  */
150
143
  function getLabel(dataFieldLabel, entityType) {
151
- var _a, _b;
152
144
  if (typeof dataFieldLabel === 'string') {
153
145
  return dataFieldLabel;
154
146
  }
@@ -159,7 +151,7 @@ function getLabel(dataFieldLabel, entityType) {
159
151
  }
160
152
  else {
161
153
  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) {
154
+ if (singleProperty?.annotations?.Common?.Label) {
163
155
  const label = dataFieldLabel;
164
156
  return evaluateCommonLabel(singleProperty.annotations, entityType, label);
165
157
  }
@@ -202,6 +194,7 @@ function getDataFieldDescription(dataFieldAbstract, entityType) {
202
194
  title = dataFieldLabel || propertyCommonLabel || dataField.Target.$target.Title || dataField.Target.value;
203
195
  break;
204
196
  case "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */:
197
+ case "com.sap.vocabularies.UI.v1.DataFieldWithAction" /* DataFieldWithAction */:
205
198
  case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */:
206
199
  dataField = dataFieldAbstract;
207
200
  if (dataFieldLabel) {
@@ -251,13 +244,14 @@ exports.getPageTypeV2 = getPageTypeV2;
251
244
  * @param name - page component name
252
245
  */
253
246
  function getPageTypeV4(v4App) {
254
- var _a;
255
247
  if (v4App.name && v4App.name !== ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
256
248
  const templatePart = `${ux_specification_types_1.v4.FE_TEMPLATE_V4}.`;
257
249
  return v4App.name.split(templatePart)[1];
258
250
  }
259
- else if (((_a = v4App) === null || _a === void 0 ? void 0 : _a.name) === ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE ||
260
- v4App.viewId ||
251
+ else if (v4App?.name === ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
252
+ return ux_specification_types_1.PageTypeV4.FPMCustomPage;
253
+ }
254
+ else if (v4App.viewId ||
261
255
  v4App.viewName) {
262
256
  return ux_specification_types_1.PageTypeV4.CustomPage;
263
257
  }
@@ -274,7 +268,7 @@ function getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys = fals
274
268
  * @returns alias for the given namespace
275
269
  */
276
270
  function findAlias(namespace, oDataServiceAVT) {
277
- let aliasReference = oDataServiceAVT === null || oDataServiceAVT === void 0 ? void 0 : oDataServiceAVT.references.find((reference) => {
271
+ let aliasReference = oDataServiceAVT.references.find((reference) => {
278
272
  return reference.namespace === namespace;
279
273
  });
280
274
  if (!aliasReference) {
@@ -288,7 +282,7 @@ function findAlias(namespace, oDataServiceAVT) {
288
282
  namespace.split('SAP__')[namespace.split('SAP__').length - 1].toUpperCase());
289
283
  });
290
284
  }
291
- return aliasReference === null || aliasReference === void 0 ? void 0 : aliasReference.alias;
285
+ return aliasReference?.alias;
292
286
  }
293
287
  exports.findAlias = findAlias;
294
288
  /**
@@ -299,11 +293,10 @@ exports.findAlias = findAlias;
299
293
  * @returns the target annotation
300
294
  */
301
295
  function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT) {
302
- var _a;
303
296
  const lastNavigationPart = navigationParts[navigationParts.length - 1];
304
297
  const annotation = lastNavigationPart.substring(lastNavigationPart.lastIndexOf('.') + 1, lastNavigationPart.length);
305
298
  const alias = findAlias(lastNavigationPart.substring(0, lastNavigationPart.lastIndexOf('.')).replace('@', ''), oDataServiceAVT);
306
- return (_a = entityType === null || entityType === void 0 ? void 0 : entityType.annotations[alias]) === null || _a === void 0 ? void 0 : _a[annotation];
299
+ return entityType?.annotations[alias]?.[annotation];
307
300
  }
308
301
  /**
309
302
  * Adjust key by considering navigation
@@ -324,12 +317,11 @@ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
324
317
  return key;
325
318
  }
326
319
  function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
327
- var _a;
328
320
  let stopProcessing = false;
329
321
  const navigationParts = propertyValue.split('/');
330
322
  const navigation = navigationParts.length > 1;
331
323
  if (navigation) {
332
- entityType = (_a = entityType.resolvePath(propertyValue.substring(0, propertyValue.lastIndexOf('/')))) === null || _a === void 0 ? void 0 : _a.targetType;
324
+ entityType = entityType.resolvePath(propertyValue.substring(0, propertyValue.lastIndexOf('/')))?.targetType;
333
325
  }
334
326
  key = adjustKey(key, navigationParts, keyForRelatedFacetKeys);
335
327
  const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
@@ -382,7 +374,13 @@ function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, log
382
374
  }
383
375
  key = key.replace(/\//gi, '::');
384
376
  return key
385
- ? Object.assign(Object.assign(Object.assign({ key }, (facetDefinition.Label && { label: facetDefinition.Label.toString() })), (facetDefinition.ID && { ID: facetDefinition.ID.toString() })), { entityType }) : undefined;
377
+ ? {
378
+ key,
379
+ ...(facetDefinition.Label && { label: facetDefinition.Label.toString() }),
380
+ ...(facetDefinition.ID && { ID: facetDefinition.ID.toString() }),
381
+ entityType
382
+ }
383
+ : undefined;
386
384
  }
387
385
  exports.getSectionFacet = getSectionFacet;
388
386
  /**
@@ -396,7 +394,7 @@ exports.getSectionFacet = getSectionFacet;
396
394
  * @param {boolean} importScenario - indicates if the function is called for the import, else it is the export
397
395
  * @returns returns section of the manifest based on path, generates an empty object in case it does not exists
398
396
  */
399
- exports.getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
397
+ const getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
400
398
  if (!path) {
401
399
  return undefined;
402
400
  }
@@ -423,6 +421,7 @@ exports.getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAn
423
421
  }
424
422
  return manifestSection;
425
423
  };
424
+ exports.getManifestSectionByPathV4 = getManifestSectionByPathV4;
426
425
  function getSchemaKeyOfLineItemRecord(lineItemRecord) {
427
426
  let schemaKey, target, value;
428
427
  switch (lineItemRecord.$Type) {
@@ -539,7 +538,6 @@ function getAnnotationTerm(path, alias, entityType) {
539
538
  * @param {ExtensionLogger} logger - Logger class for logging messages
540
539
  */
541
540
  function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
542
- var _a, _b, _c, _d, _e, _f, _g, _h;
543
541
  const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
544
542
  let path = section ? section.key : '';
545
543
  const targetEntityType = section.entityType;
@@ -548,7 +546,7 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
548
546
  switch (annotationTerm) {
549
547
  case "com.sap.vocabularies.UI.v1.Chart" /* Chart */: {
550
548
  facets[path] = { base: types_1.FacetBase.Chart };
551
- facets[path].target = (_a = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _a === void 0 ? void 0 : _a.$target;
549
+ facets[path].target = annotationRecord?.Target?.$target;
552
550
  facets[path].entityType = targetEntityType;
553
551
  break;
554
552
  }
@@ -567,38 +565,38 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
567
565
  path = pathParts.join('::');
568
566
  }
569
567
  facets[path] = { base: types_1.FacetBase.LineItem };
570
- facets[path].target = (_b = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _b === void 0 ? void 0 : _b.$target;
568
+ facets[path].target = annotationRecord?.Target?.$target;
571
569
  facets[path].entityType = targetEntityType;
572
570
  break;
573
571
  }
574
572
  case "com.sap.vocabularies.UI.v1.FieldGroup" /* FieldGroup */: {
575
573
  facets[path] = { base: types_1.FacetBase.Form };
576
- facets[path].target = (_c = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _c === void 0 ? void 0 : _c.$target;
574
+ facets[path].target = annotationRecord?.Target?.$target;
577
575
  facets[path].entityType = targetEntityType;
578
576
  break;
579
577
  }
580
578
  case "com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */: {
581
579
  facets[path] = { base: types_1.FacetBase.DataPoint };
582
- facets[path].target = (_d = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _d === void 0 ? void 0 : _d.$target;
580
+ facets[path].target = annotationRecord?.Target?.$target;
583
581
  facets[path].entityType = targetEntityType;
584
- facets[path].Label = (_e = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _e === void 0 ? void 0 : _e.$target['Title'];
582
+ facets[path].Label = annotationRecord?.Target?.$target['Title'];
585
583
  break;
586
584
  }
587
585
  case "com.sap.vocabularies.UI.v1.PresentationVariant" /* PresentationVariant */: {
588
586
  facets[path] = { base: types_1.FacetBase.PresentationVariant };
589
- facets[path].target = (_f = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _f === void 0 ? void 0 : _f.$target;
587
+ facets[path].target = annotationRecord?.Target?.$target;
590
588
  facets[path].entityType = targetEntityType;
591
589
  break;
592
590
  }
593
591
  case "com.sap.vocabularies.Communication.v1.Contact" /* Contact */: {
594
592
  facets[path] = { base: types_1.FacetBase.Contact };
595
- facets[path].target = (_g = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _g === void 0 ? void 0 : _g.$target;
593
+ facets[path].target = annotationRecord?.Target?.$target;
596
594
  facets[path].entityType = targetEntityType;
597
595
  break;
598
596
  }
599
597
  case "com.sap.vocabularies.Communication.v1.Address" /* Address */: {
600
598
  facets[path] = { base: types_1.FacetBase.Address };
601
- facets[path].target = (_h = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _h === void 0 ? void 0 : _h.$target;
599
+ facets[path].target = annotationRecord?.Target?.$target;
602
600
  facets[path].entityType = targetEntityType;
603
601
  break;
604
602
  }
@@ -637,7 +635,6 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
637
635
  * @param {ExtensionLogger} logger - Logger class for logging messages
638
636
  */
639
637
  function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
640
- var _a;
641
638
  const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
642
639
  if (section) {
643
640
  switch (annotationRecord.$Type) {
@@ -654,7 +651,7 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
654
651
  annotationPath: annotationPath,
655
652
  Label: section.label
656
653
  });
657
- (_a = annotationRecord.Facets) === null || _a === void 0 ? void 0 : _a.forEach((collectionItem) => {
654
+ annotationRecord.Facets?.forEach((collectionItem) => {
658
655
  addFacetToConfig(collectionItem, oDataServiceAVT, serviceName, entityType, facet.facets, oDataVersion, logger);
659
656
  });
660
657
  break;
@@ -774,27 +771,12 @@ function determineV2Template(manifest, logger) {
774
771
  }
775
772
  exports.determineV2Template = determineV2Template;
776
773
  /**
777
- * Determines the template type of a V4 app
778
- * @param manifest - the manifest.json file
779
- * @param {ExtensionLogger} logger - Logger class for logging messages
780
- * @returns {TemplateType} the template type
774
+ * Determines the template type, based on the given manifest routing target entries of the app
775
+ * @param v4Pages - pages from routing targets
776
+ * @returns {TemplateType | undefined} the template type
781
777
  */
782
- function determineV4Template(manifest, logger) {
783
- var _a, _b, _c, _d;
778
+ function determineV4TemplateFromPages(v4Pages) {
784
779
  let templateType;
785
- const v4Pages = manifest[ux_specification_types_1.ManifestSection.ui5].routing &&
786
- manifest[ux_specification_types_1.ManifestSection.ui5].routing.targets;
787
- if (!v4Pages) {
788
- extensionLogger_1.log(logger, {
789
- severity: "error" /* Error */,
790
- message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
791
- location: {
792
- path: types_1.MANIFESTPATH,
793
- range: [ux_specification_types_1.ManifestSection.ui5, 'routing']
794
- }
795
- });
796
- return;
797
- }
798
780
  for (const pageKey in v4Pages) {
799
781
  const v4Page = v4Pages[pageKey];
800
782
  const pageType = getPageTypeV4(v4Page);
@@ -803,7 +785,7 @@ function determineV4Template(manifest, logger) {
803
785
  break;
804
786
  }
805
787
  else if (pageType === ux_specification_types_1.PageTypeV4.ListReport) {
806
- const viewPath = (_d = (_c = (_b = (_a = v4Page.options) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b.views) === null || _c === void 0 ? void 0 : _c.paths) === null || _d === void 0 ? void 0 : _d[0];
788
+ const viewPath = v4Page.options?.settings?.views?.paths?.[0];
807
789
  if (viewPath && (viewPath[ux_specification_types_1.ALPViewType.Primary] || viewPath[ux_specification_types_1.ALPViewType.Secondary])) {
808
790
  templateType = TemplateType.AnalyticalListPageV4;
809
791
  }
@@ -816,11 +798,36 @@ function determineV4Template(manifest, logger) {
816
798
  templateType = TemplateType.ListReportObjectPageV4;
817
799
  //fixed now for FEOP scenario, bit continue to check if LR/ALP exists
818
800
  }
819
- else if (pageType === ux_specification_types_1.PageTypeV4.CustomPage) {
801
+ else if ([ux_specification_types_1.PageTypeV4.CustomPage, ux_specification_types_1.PageTypeV4.FPMCustomPage].includes(pageType)) {
820
802
  templateType = TemplateType.FreestylePageV4;
821
803
  break;
822
804
  }
823
805
  }
806
+ return templateType;
807
+ }
808
+ /**
809
+ * Determines the template type of a V4 app
810
+ * @param manifest - the manifest.json file
811
+ * @param {ExtensionLogger} logger - Logger class for logging messages
812
+ * @returns {TemplateType} the template type
813
+ */
814
+ function determineV4Template(manifest, logger) {
815
+ const v4Pages = manifest[ux_specification_types_1.ManifestSection.ui5].routing &&
816
+ manifest[ux_specification_types_1.ManifestSection.ui5].routing.targets;
817
+ // if there are no pages in routing targets, we use LROPV4 as default template type
818
+ if (!v4Pages || Object.keys(v4Pages).length === 0) {
819
+ extensionLogger_1.log(logger, {
820
+ severity: "info" /* Info */,
821
+ message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
822
+ location: {
823
+ path: types_1.MANIFESTPATH,
824
+ range: [ux_specification_types_1.ManifestSection.ui5, 'routing']
825
+ }
826
+ });
827
+ return TemplateType.ListReportObjectPageV4;
828
+ }
829
+ // else try to determine template type from routing targets
830
+ const templateType = determineV4TemplateFromPages(v4Pages);
824
831
  if (!templateType) {
825
832
  extensionLogger_1.log(logger, {
826
833
  severity: "error" /* Error */,
@@ -873,17 +880,17 @@ exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
873
880
  * @param facetKey - key of the facet
874
881
  */
875
882
  function addSectionTitleAndDescription(facet, section, facetKey) {
876
- if (facet === null || facet === void 0 ? void 0 : facet.ID) {
883
+ if (facet?.ID) {
877
884
  section.title = types_1.FacetTitlePrefix + facet.ID;
878
885
  }
879
886
  else {
880
887
  section.title = facetKey.replace(/@com.sap/g, 'com.sap');
881
888
  }
882
889
  // Description
883
- if (facet === null || facet === void 0 ? void 0 : facet.Label) {
890
+ if (facet?.Label) {
884
891
  section.description = facet.Label;
885
892
  }
886
- else if (facet === null || facet === void 0 ? void 0 : facet.ID) {
893
+ else if (facet?.ID) {
887
894
  section.description = facet.ID;
888
895
  }
889
896
  else {
@@ -898,15 +905,14 @@ exports.addSectionTitleAndDescription = addSectionTitleAndDescription;
898
905
  * @param facetKey - key of the facet
899
906
  */
900
907
  function addTargetTitleAndSectionDescription(facet, section, facetKey) {
901
- var _a;
902
908
  addSectionTitleAndDescription(facet, section, facetKey);
903
- if (facet === null || facet === void 0 ? void 0 : facet.Label) {
904
- section.description = facet === null || facet === void 0 ? void 0 : facet.Label;
909
+ if (facet?.Label) {
910
+ section.description = facet?.Label;
905
911
  }
906
- else if (facet === null || facet === void 0 ? void 0 : facet['Title']) {
912
+ else if (facet?.['Title']) {
907
913
  section.description = facet['Title'];
908
914
  }
909
- else if ((_a = facet === null || facet === void 0 ? void 0 : facet.target) === null || _a === void 0 ? void 0 : _a['Title']) {
915
+ else if (facet?.target?.['Title']) {
910
916
  section.description = facet.target['Title'];
911
917
  }
912
918
  }
@@ -975,7 +981,7 @@ exports.getObjectPageFacetSection = getObjectPageFacetSection;
975
981
  * @param targetAnnotation - target annotation (optional, in case of sections, subsections)
976
982
  * @param targetAnnotationEncoded - encoded version of the target annotation, as represented in the manifest
977
983
  */
978
- exports.deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
984
+ const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
979
985
  if (!path) {
980
986
  return;
981
987
  }
@@ -1002,6 +1008,7 @@ exports.deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotati
1002
1008
  manifestSection = manifestSection && manifestSection[decodedElement];
1003
1009
  });
1004
1010
  };
1011
+ exports.deleteEmptyStructure = deleteEmptyStructure;
1005
1012
  /**
1006
1013
  * Method which returns generic schema file name.
1007
1014
  * @param {SchemaType | PageType} schemaType Schema type or Page type.
@@ -1019,7 +1026,7 @@ const getGenericSchemaFileName = (schemaType) => {
1019
1026
  * @param {string} [entitySet] Entity set string.
1020
1027
  * @return {SchemaFilePath} File path info.
1021
1028
  */
1022
- exports.getSchemaFilePath = (schemaType, entitySet) => {
1029
+ const getSchemaFilePath = (schemaType, entitySet) => {
1023
1030
  const schemaFile = {
1024
1031
  filename: '',
1025
1032
  path: ''
@@ -1042,6 +1049,13 @@ exports.getSchemaFilePath = (schemaType, entitySet) => {
1042
1049
  schemaFile.path = `../${types_1.DirName.Schemas}/${schemaFile.filename}`;
1043
1050
  break;
1044
1051
  }
1052
+ case ux_specification_types_1.PageTypeV4.FPMCustomPage: {
1053
+ // File name
1054
+ schemaFile.filename = getGenericSchemaFileName(ux_specification_types_1.PageTypeV4.CustomPage);
1055
+ // Full path
1056
+ schemaFile.path = `../${types_1.DirName.Schemas}/${schemaFile.filename}`;
1057
+ break;
1058
+ }
1045
1059
  // Other page configs
1046
1060
  default: {
1047
1061
  // File name
@@ -1054,6 +1068,7 @@ exports.getSchemaFilePath = (schemaType, entitySet) => {
1054
1068
  schemaFile.path += '.json';
1055
1069
  return schemaFile;
1056
1070
  };
1071
+ exports.getSchemaFilePath = getSchemaFilePath;
1057
1072
  /**
1058
1073
  * Method which generates id of page according to passed parameters.
1059
1074
  * @param appVersion - Fiori Elements version - V2 or V4.
@@ -1126,7 +1141,6 @@ function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject
1126
1141
  * @returns {NextDefinition} - Next target definition to process
1127
1142
  */
1128
1143
  function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema, title, currentConfigObject, key, factory, pageType, propertyDefinition) {
1129
- var _a, _b, _c, _d;
1130
1144
  let nextDefinition = {
1131
1145
  configObject: undefined,
1132
1146
  targetDefinition: {},
@@ -1135,7 +1149,7 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
1135
1149
  if (definitionArray.length) {
1136
1150
  const lastDefinition = definitionArray[definitionArray.length - 1];
1137
1151
  nextDefinition.targetDefinition = appSchema['definitions'][lastDefinition];
1138
- 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') {
1152
+ if (nextDefinition?.targetDefinition?.['$ref'] || nextDefinition?.targetDefinition?.['type'] === 'array') {
1139
1153
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
1140
1154
  nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, nextDefinition.targetDefinition, key, factory, pageType);
1141
1155
  return nextDefinition;
@@ -1143,15 +1157,19 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
1143
1157
  if (definitionArray.length > 1) {
1144
1158
  definitionArray.forEach((element) => {
1145
1159
  if (element !== '') {
1146
- nextDefinition.targetDefinition['properties'] = Object.assign(Object.assign({}, nextDefinition.targetDefinition['properties']), appSchema['definitions'][element]['properties']);
1160
+ nextDefinition.targetDefinition['properties'] = {
1161
+ ...nextDefinition.targetDefinition['properties'],
1162
+ ...appSchema['definitions'][element]['properties']
1163
+ };
1147
1164
  }
1148
1165
  });
1149
1166
  }
1150
- nextDefinition.title = ((_c = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition.targetDefinition) === null || _c === void 0 ? void 0 : _c['title']) ? nextDefinition.targetDefinition['title']
1167
+ nextDefinition.title = nextDefinition?.targetDefinition?.['title']
1168
+ ? nextDefinition.targetDefinition['title']
1151
1169
  : title;
1152
- const factoryKey = lastDefinition === null || lastDefinition === void 0 ? void 0 : lastDefinition.split('<')[0];
1170
+ const factoryKey = lastDefinition?.split('<')[0];
1153
1171
  const targetObject = currentConfigObject ? currentConfigObject : {};
1154
- 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']);
1172
+ nextDefinition.configObject = factory.createInstance(pageType, factoryKey, targetObject, nextDefinition?.targetDefinition?.['controlProperty']);
1155
1173
  }
1156
1174
  else {
1157
1175
  //e.g. sections ==> loop over all properties = subsections or other
@@ -1195,7 +1213,7 @@ exports.getNextTargetDefinition = getNextTargetDefinition;
1195
1213
  * @param {*} options options object provided by deepmerge's merge function
1196
1214
  * @returns
1197
1215
  */
1198
- exports.arrayCombineMerge = (target, source, options) => {
1216
+ const arrayCombineMerge = (target, source, options) => {
1199
1217
  const destination = target.slice();
1200
1218
  source.forEach((item, index) => {
1201
1219
  if (typeof destination[index] === 'undefined') {
@@ -1210,6 +1228,7 @@ exports.arrayCombineMerge = (target, source, options) => {
1210
1228
  });
1211
1229
  return destination;
1212
1230
  };
1231
+ exports.arrayCombineMerge = arrayCombineMerge;
1213
1232
  /**
1214
1233
  * Converts an enum into a CSV
1215
1234
  * @param {object} manifestSection - manifestSection where the key exists