@sap/ux-specification 1.84.46 → 1.84.50

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