@sap/ux-specification 1.96.20 → 1.96.24

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