@sap/ux-specification 1.96.20 → 1.96.21

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