@sap/ux-specification 1.71.65 → 1.71.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (523) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/documentation/runDocu-min.js +9645 -2
  3. package/dist/documentation/runDocu-min.js.map +7 -0
  4. package/dist/documentation/styleDocu.css +32 -28
  5. package/dist/documentation/v2/v2-AnalyticalListPage.html +20 -8
  6. package/dist/documentation/v2/v2-ApplicationV2.html +20 -8
  7. package/dist/documentation/v2/v2-ListReport.html +20 -8
  8. package/dist/documentation/v2/v2-ObjectPage.html +20 -8
  9. package/dist/documentation/v2/v2-OverviewPage.html +20 -8
  10. package/dist/index-min.js +24708 -2
  11. package/dist/index-min.js.map +7 -0
  12. package/dist/schemas/v2/ObjectPageConfig.json +1 -1
  13. package/dist/{src → types}/api.d.ts +2 -1
  14. package/dist/types/api.d.ts.map +1 -0
  15. package/dist/{src → types}/apiTypes.d.ts +3 -1
  16. package/dist/types/apiTypes.d.ts.map +1 -0
  17. package/dist/{src → types}/extensionLogger.d.ts +1 -0
  18. package/dist/types/extensionLogger.d.ts.map +1 -0
  19. package/dist/{src → types}/i18n/i18n.d.ts +1 -0
  20. package/dist/types/i18n/i18n.d.ts.map +1 -0
  21. package/dist/{src → types}/index.d.ts +1 -0
  22. package/dist/types/index.d.ts.map +1 -0
  23. package/dist/{src → types}/project.d.ts +1 -0
  24. package/dist/types/project.d.ts.map +1 -0
  25. package/dist/{src → types}/specification/common/Application.d.ts +1 -0
  26. package/dist/types/specification/common/Application.d.ts.map +1 -0
  27. package/dist/{src → types}/specification/common/index.d.ts +1 -0
  28. package/dist/types/specification/common/index.d.ts.map +1 -0
  29. package/dist/{src → types}/specification/common/page.d.ts +1 -0
  30. package/dist/types/specification/common/page.d.ts.map +1 -0
  31. package/dist/{src → types}/specification/common/types.d.ts +1 -0
  32. package/dist/types/specification/common/types.d.ts.map +1 -0
  33. package/dist/{src → types}/specification/common/webapp/manifest/Manifest.d.ts +1 -0
  34. package/dist/types/specification/common/webapp/manifest/Manifest.d.ts.map +1 -0
  35. package/dist/{src → types}/specification/common/webapp/manifest/index.d.ts +1 -0
  36. package/dist/types/specification/common/webapp/manifest/index.d.ts.map +1 -0
  37. package/dist/{src → types}/specification/common/webapp/manifest/sapOvp.d.ts +1 -0
  38. package/dist/types/specification/common/webapp/manifest/sapOvp.d.ts.map +1 -0
  39. package/dist/{src → types}/specification/common/webapp/manifest/sapUi5.d.ts +1 -0
  40. package/dist/types/specification/common/webapp/manifest/sapUi5.d.ts.map +1 -0
  41. package/dist/{src → types}/specification/schemaAccess.d.ts +7 -0
  42. package/dist/types/specification/schemaAccess.d.ts.map +1 -0
  43. package/dist/{src → types}/specification/v2/ApplicationV2.d.ts +1 -0
  44. package/dist/types/specification/v2/ApplicationV2.d.ts.map +1 -0
  45. package/dist/{src → types}/specification/v2/controls/Action.d.ts +1 -0
  46. package/dist/types/specification/v2/controls/Action.d.ts.map +1 -0
  47. package/dist/{src → types}/specification/v2/controls/AnalyticalListPageChart.d.ts +1 -0
  48. package/dist/types/specification/v2/controls/AnalyticalListPageChart.d.ts.map +1 -0
  49. package/dist/{src → types}/specification/v2/controls/AnalyticalListPageKPI.d.ts +1 -0
  50. package/dist/types/specification/v2/controls/AnalyticalListPageKPI.d.ts.map +1 -0
  51. package/dist/{src → types}/specification/v2/controls/Card.d.ts +1 -0
  52. package/dist/types/specification/v2/controls/Card.d.ts.map +1 -0
  53. package/dist/{src → types}/specification/v2/controls/Facets.d.ts +1 -0
  54. package/dist/types/specification/v2/controls/Facets.d.ts.map +1 -0
  55. package/dist/{src → types}/specification/v2/controls/Field.d.ts +1 -0
  56. package/dist/types/specification/v2/controls/Field.d.ts.map +1 -0
  57. package/dist/{src → types}/specification/v2/controls/FilterBar.d.ts +1 -0
  58. package/dist/types/specification/v2/controls/FilterBar.d.ts.map +1 -0
  59. package/dist/{src → types}/specification/v2/controls/Footer.d.ts +1 -0
  60. package/dist/types/specification/v2/controls/Footer.d.ts.map +1 -0
  61. package/dist/{src → types}/specification/v2/controls/ObjectPageChart.d.ts +1 -0
  62. package/dist/types/specification/v2/controls/ObjectPageChart.d.ts.map +1 -0
  63. package/dist/{src → types}/specification/v2/controls/ObjectPageForm.d.ts +1 -0
  64. package/dist/types/specification/v2/controls/ObjectPageForm.d.ts.map +1 -0
  65. package/dist/{src → types}/specification/v2/controls/ObjectPageHeader.d.ts +1 -0
  66. package/dist/types/specification/v2/controls/ObjectPageHeader.d.ts.map +1 -0
  67. package/dist/{src → types}/specification/v2/controls/ObjectPageLayout.d.ts +1 -0
  68. package/dist/types/specification/v2/controls/ObjectPageLayout.d.ts.map +1 -0
  69. package/dist/{src → types}/specification/v2/controls/ObjectPageSection.d.ts +1 -0
  70. package/dist/types/specification/v2/controls/ObjectPageSection.d.ts.map +1 -0
  71. package/dist/{src → types}/specification/v2/controls/ObjectPageTable.d.ts +1 -0
  72. package/dist/types/specification/v2/controls/ObjectPageTable.d.ts.map +1 -0
  73. package/dist/{src → types}/specification/v2/controls/ObjectPageToolBar.d.ts +1 -0
  74. package/dist/types/specification/v2/controls/ObjectPageToolBar.d.ts.map +1 -0
  75. package/dist/{src → types}/specification/v2/controls/Table.d.ts +1 -0
  76. package/dist/types/specification/v2/controls/Table.d.ts.map +1 -0
  77. package/dist/{src → types}/specification/v2/controls/ToolBar.d.ts +1 -0
  78. package/dist/types/specification/v2/controls/ToolBar.d.ts.map +1 -0
  79. package/dist/{src → types}/specification/v2/controls/index.d.ts +1 -0
  80. package/dist/types/specification/v2/controls/index.d.ts.map +1 -0
  81. package/dist/{src → types}/specification/v2/index.d.ts +1 -0
  82. package/dist/types/specification/v2/index.d.ts.map +1 -0
  83. package/dist/{src → types}/specification/v2/page.d.ts +1 -0
  84. package/dist/types/specification/v2/page.d.ts.map +1 -0
  85. package/dist/{src → types}/specification/v2/pages/AnalyticalListPageConfig.d.ts +1 -0
  86. package/dist/types/specification/v2/pages/AnalyticalListPageConfig.d.ts.map +1 -0
  87. package/dist/{src → types}/specification/v2/pages/ListReportConfig.d.ts +1 -0
  88. package/dist/types/specification/v2/pages/ListReportConfig.d.ts.map +1 -0
  89. package/dist/{src → types}/specification/v2/pages/ObjectPageConfig.d.ts +1 -0
  90. package/dist/types/specification/v2/pages/ObjectPageConfig.d.ts.map +1 -0
  91. package/dist/{src → types}/specification/v2/pages/OverviewPageConfig.d.ts +1 -0
  92. package/dist/types/specification/v2/pages/OverviewPageConfig.d.ts.map +1 -0
  93. package/dist/{src → types}/specification/v2/pages/index.d.ts +1 -0
  94. package/dist/types/specification/v2/pages/index.d.ts.map +1 -0
  95. package/dist/types/specification/v2/webapp/index.d.ts +2 -0
  96. package/dist/types/specification/v2/webapp/index.d.ts.map +1 -0
  97. package/dist/{src → types}/specification/v2/webapp/manifest/index.d.ts +1 -0
  98. package/dist/types/specification/v2/webapp/manifest/index.d.ts.map +1 -0
  99. package/dist/{src → types}/specification/v2/webapp/manifest/sapUi.d.ts +1 -0
  100. package/dist/types/specification/v2/webapp/manifest/sapUi.d.ts.map +1 -0
  101. package/dist/{src → types}/specification/v2/webapp/manifest/sapUi5.d.ts +1 -0
  102. package/dist/types/specification/v2/webapp/manifest/sapUi5.d.ts.map +1 -0
  103. package/dist/{src → types}/specification/v2/webapp/manifest/sapUiPageV2.d.ts +1 -0
  104. package/dist/types/specification/v2/webapp/manifest/sapUiPageV2.d.ts.map +1 -0
  105. package/dist/{src → types}/sync/common/appProvider.d.ts +1 -0
  106. package/dist/types/sync/common/appProvider.d.ts.map +1 -0
  107. package/dist/{src → types}/sync/common/decoration/control.d.ts +1 -0
  108. package/dist/types/sync/common/decoration/control.d.ts.map +1 -0
  109. package/dist/{src → types}/sync/common/decoration/decorators.d.ts +1 -0
  110. package/dist/types/sync/common/decoration/decorators.d.ts.map +1 -0
  111. package/dist/{src → types}/sync/common/decoration/factory.d.ts +1 -0
  112. package/dist/types/sync/common/decoration/factory.d.ts.map +1 -0
  113. package/dist/{src → types}/sync/common/decoration/flex.d.ts +1 -0
  114. package/dist/types/sync/common/decoration/flex.d.ts.map +1 -0
  115. package/dist/{src → types}/sync/common/decoration/index.d.ts +1 -0
  116. package/dist/types/sync/common/decoration/index.d.ts.map +1 -0
  117. package/dist/{src → types}/sync/common/flexUtils.d.ts +1 -0
  118. package/dist/types/sync/common/flexUtils.d.ts.map +1 -0
  119. package/dist/{src → types}/sync/common/generate/index.d.ts +1 -0
  120. package/dist/types/sync/common/generate/index.d.ts.map +1 -0
  121. package/dist/{src → types}/sync/common/generate/objectPage.d.ts +3 -1
  122. package/dist/types/sync/common/generate/objectPage.d.ts.map +1 -0
  123. package/dist/{src → types}/sync/common/generate/utils.d.ts +1 -0
  124. package/dist/types/sync/common/generate/utils.d.ts.map +1 -0
  125. package/dist/{src → types}/sync/common/import/utils.d.ts +1 -0
  126. package/dist/types/sync/common/import/utils.d.ts.map +1 -0
  127. package/dist/{src → types}/sync/common/importProject.d.ts +1 -0
  128. package/dist/types/sync/common/importProject.d.ts.map +1 -0
  129. package/dist/{src → types}/sync/common/index.d.ts +1 -0
  130. package/dist/types/sync/common/index.d.ts.map +1 -0
  131. package/dist/{src → types}/sync/common/types.d.ts +4 -1
  132. package/dist/types/sync/common/types.d.ts.map +1 -0
  133. package/dist/{src → types}/sync/common/utils.d.ts +1 -0
  134. package/dist/types/sync/common/utils.d.ts.map +1 -0
  135. package/dist/{src → types}/sync/i18n.d.ts +1 -0
  136. package/dist/types/sync/i18n.d.ts.map +1 -0
  137. package/dist/{src → types}/sync/v2/application.d.ts +1 -0
  138. package/dist/types/sync/v2/application.d.ts.map +1 -0
  139. package/dist/{src → types}/sync/v2/export/controls/Action.d.ts +1 -0
  140. package/dist/types/sync/v2/export/controls/Action.d.ts.map +1 -0
  141. package/dist/{src → types}/sync/v2/export/controls/AnalyticalListPageChart.d.ts +1 -0
  142. package/dist/types/sync/v2/export/controls/AnalyticalListPageChart.d.ts.map +1 -0
  143. package/dist/{src → types}/sync/v2/export/controls/AnalyticalListPageKPI.d.ts +1 -0
  144. package/dist/types/sync/v2/export/controls/AnalyticalListPageKPI.d.ts.map +1 -0
  145. package/dist/{src → types}/sync/v2/export/controls/Card.d.ts +1 -0
  146. package/dist/types/sync/v2/export/controls/Card.d.ts.map +1 -0
  147. package/dist/{src → types}/sync/v2/export/controls/Field.d.ts +1 -0
  148. package/dist/types/sync/v2/export/controls/Field.d.ts.map +1 -0
  149. package/dist/{src → types}/sync/v2/export/controls/FilterBar.d.ts +1 -0
  150. package/dist/types/sync/v2/export/controls/FilterBar.d.ts.map +1 -0
  151. package/dist/{src → types}/sync/v2/export/controls/FormAction.d.ts +1 -0
  152. package/dist/types/sync/v2/export/controls/FormAction.d.ts.map +1 -0
  153. package/dist/{src → types}/sync/v2/export/controls/Fragment.d.ts +1 -0
  154. package/dist/types/sync/v2/export/controls/Fragment.d.ts.map +1 -0
  155. package/dist/{src → types}/sync/v2/export/controls/ObjectPageCustomSection.d.ts +1 -0
  156. package/dist/types/sync/v2/export/controls/ObjectPageCustomSection.d.ts.map +1 -0
  157. package/dist/{src → types}/sync/v2/export/controls/ObjectPageFooterAction.d.ts +1 -0
  158. package/dist/types/sync/v2/export/controls/ObjectPageFooterAction.d.ts.map +1 -0
  159. package/dist/{src → types}/sync/v2/export/controls/ObjectPageHeader.d.ts +1 -0
  160. package/dist/types/sync/v2/export/controls/ObjectPageHeader.d.ts.map +1 -0
  161. package/dist/{src → types}/sync/v2/export/controls/ObjectPageHeaderAction.d.ts +1 -0
  162. package/dist/types/sync/v2/export/controls/ObjectPageHeaderAction.d.ts.map +1 -0
  163. package/dist/{src → types}/sync/v2/export/controls/ObjectPageLayout.d.ts +1 -0
  164. package/dist/types/sync/v2/export/controls/ObjectPageLayout.d.ts.map +1 -0
  165. package/dist/{src → types}/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +1 -0
  166. package/dist/types/sync/v2/export/controls/ObjectPageSectionsV2.d.ts.map +1 -0
  167. package/dist/{src → types}/sync/v2/export/controls/ObjectPageTable.d.ts +1 -0
  168. package/dist/types/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -0
  169. package/dist/{src → types}/sync/v2/export/controls/ObjectPageToolBarAction.d.ts +1 -0
  170. package/dist/types/sync/v2/export/controls/ObjectPageToolBarAction.d.ts.map +1 -0
  171. package/dist/{src → types}/sync/v2/export/controls/Table.d.ts +1 -0
  172. package/dist/types/sync/v2/export/controls/Table.d.ts.map +1 -0
  173. package/dist/{src → types}/sync/v2/export/controls/TableColumn.d.ts +1 -0
  174. package/dist/types/sync/v2/export/controls/TableColumn.d.ts.map +1 -0
  175. package/dist/{src → types}/sync/v2/export/controls/ToolBar.d.ts +1 -0
  176. package/dist/types/sync/v2/export/controls/ToolBar.d.ts.map +1 -0
  177. package/dist/{src → types}/sync/v2/export/controls/index.d.ts +1 -0
  178. package/dist/types/sync/v2/export/controls/index.d.ts.map +1 -0
  179. package/dist/{src → types}/sync/v2/export/export.d.ts +1 -0
  180. package/dist/types/sync/v2/export/export.d.ts.map +1 -0
  181. package/dist/{src → types}/sync/v2/export/exportPage.d.ts +1 -0
  182. package/dist/types/sync/v2/export/exportPage.d.ts.map +1 -0
  183. package/dist/{src → types}/sync/v2/export/factory.d.ts +1 -0
  184. package/dist/types/sync/v2/export/factory.d.ts.map +1 -0
  185. package/dist/{src → types}/sync/v2/export/manifest.d.ts +1 -0
  186. package/dist/types/sync/v2/export/manifest.d.ts.map +1 -0
  187. package/dist/{src → types}/sync/v2/export/pages/AnalyticalListPage.d.ts +1 -0
  188. package/dist/types/sync/v2/export/pages/AnalyticalListPage.d.ts.map +1 -0
  189. package/dist/{src → types}/sync/v2/export/pages/ListReport.d.ts +1 -0
  190. package/dist/types/sync/v2/export/pages/ListReport.d.ts.map +1 -0
  191. package/dist/{src → types}/sync/v2/export/pages/ObjectPage.d.ts +1 -0
  192. package/dist/types/sync/v2/export/pages/ObjectPage.d.ts.map +1 -0
  193. package/dist/{src → types}/sync/v2/export/pages/OverviewPage.d.ts +1 -0
  194. package/dist/types/sync/v2/export/pages/OverviewPage.d.ts.map +1 -0
  195. package/dist/{src → types}/sync/v2/export/pages/index.d.ts +1 -0
  196. package/dist/types/sync/v2/export/pages/index.d.ts.map +1 -0
  197. package/dist/{src → types}/sync/v2/export/view-controller-generator.d.ts +1 -0
  198. package/dist/types/sync/v2/export/view-controller-generator.d.ts.map +1 -0
  199. package/dist/{src → types}/sync/v2/generate/analyticalListReport.d.ts +1 -0
  200. package/dist/types/sync/v2/generate/analyticalListReport.d.ts.map +1 -0
  201. package/dist/{src → types}/sync/v2/generate/generate.d.ts +1 -0
  202. package/dist/types/sync/v2/generate/generate.d.ts.map +1 -0
  203. package/dist/{src → types}/sync/v2/generate/index.d.ts +1 -0
  204. package/dist/types/sync/v2/generate/index.d.ts.map +1 -0
  205. package/dist/{src → types}/sync/v2/generate/listReport.d.ts +1 -0
  206. package/dist/types/sync/v2/generate/listReport.d.ts.map +1 -0
  207. package/dist/{src → types}/sync/v2/generate/objectPage.d.ts +1 -0
  208. package/dist/types/sync/v2/generate/objectPage.d.ts.map +1 -0
  209. package/dist/{src → types}/sync/v2/generate/overviewPage.d.ts +1 -0
  210. package/dist/types/sync/v2/generate/overviewPage.d.ts.map +1 -0
  211. package/dist/{src → types}/sync/v2/generate/utils.d.ts +1 -0
  212. package/dist/types/sync/v2/generate/utils.d.ts.map +1 -0
  213. package/dist/{src → types}/sync/v2/import/app/appProvider.d.ts +1 -0
  214. package/dist/types/sync/v2/import/app/appProvider.d.ts.map +1 -0
  215. package/dist/{src → types}/sync/v2/import/app/ovpProvider.d.ts +1 -0
  216. package/dist/types/sync/v2/import/app/ovpProvider.d.ts.map +1 -0
  217. package/dist/{src → types}/sync/v2/import/common/index.d.ts +1 -0
  218. package/dist/types/sync/v2/import/common/index.d.ts.map +1 -0
  219. package/dist/{src → types}/sync/v2/import/controls/table.d.ts +1 -0
  220. package/dist/types/sync/v2/import/controls/table.d.ts.map +1 -0
  221. package/dist/types/sync/v2/import/getPageType.d.ts +1 -0
  222. package/dist/types/sync/v2/import/getPageType.d.ts.map +1 -0
  223. package/dist/{src → types}/sync/v2/import/index.d.ts +1 -0
  224. package/dist/types/sync/v2/import/index.d.ts.map +1 -0
  225. package/dist/{src → types}/sync/v2/import/pages/analyticalListPage.d.ts +1 -0
  226. package/dist/types/sync/v2/import/pages/analyticalListPage.d.ts.map +1 -0
  227. package/dist/{src → types}/sync/v2/import/pages/listReport.d.ts +1 -0
  228. package/dist/types/sync/v2/import/pages/listReport.d.ts.map +1 -0
  229. package/dist/{src → types}/sync/v2/import/pages/objectPage.d.ts +1 -0
  230. package/dist/types/sync/v2/import/pages/objectPage.d.ts.map +1 -0
  231. package/dist/{src → types}/sync/v2/import/pages/overviewPage.d.ts +1 -0
  232. package/dist/types/sync/v2/import/pages/overviewPage.d.ts.map +1 -0
  233. package/dist/{src → types}/sync/v2/import/utils.d.ts +1 -0
  234. package/dist/types/sync/v2/import/utils.d.ts.map +1 -0
  235. package/dist/{src → types}/sync/v2/types.d.ts +1 -0
  236. package/dist/types/sync/v2/types.d.ts.map +1 -0
  237. package/dist/{src → types}/sync/v4/utils/StableIdHelper.d.ts +1 -0
  238. package/dist/types/sync/v4/utils/StableIdHelper.d.ts.map +1 -0
  239. package/dist/{src → types}/v2.d.ts +1 -0
  240. package/dist/types/v2.d.ts.map +1 -0
  241. package/package.json +25 -28
  242. package/dist/documentation/runDocu-min.js.LICENSE.txt +0 -24
  243. package/dist/index-min.js.LICENSE.txt +0 -26
  244. package/dist/scripts/extractDocu.d.ts +0 -1
  245. package/dist/scripts/extractDocu.js +0 -485
  246. package/dist/scripts/extractDocu.js.map +0 -1
  247. package/dist/scripts/runDocu.d.ts +0 -1
  248. package/dist/scripts/runDocu.js +0 -570
  249. package/dist/scripts/runDocu.js.map +0 -1
  250. package/dist/scripts/spec.d.ts +0 -1
  251. package/dist/scripts/spec.js +0 -114
  252. package/dist/scripts/spec.js.map +0 -1
  253. package/dist/scripts/to-json-schema.d.ts +0 -10
  254. package/dist/scripts/to-json-schema.js +0 -112
  255. package/dist/scripts/to-json-schema.js.map +0 -1
  256. package/dist/specification/v2/index-min.js +0 -1
  257. package/dist/src/api.js +0 -123
  258. package/dist/src/api.js.map +0 -1
  259. package/dist/src/apiTypes.js +0 -3
  260. package/dist/src/apiTypes.js.map +0 -1
  261. package/dist/src/extensionLogger.js +0 -34
  262. package/dist/src/extensionLogger.js.map +0 -1
  263. package/dist/src/i18n/i18n.js +0 -25
  264. package/dist/src/i18n/i18n.js.map +0 -1
  265. package/dist/src/index.js +0 -12
  266. package/dist/src/index.js.map +0 -1
  267. package/dist/src/project.js +0 -151
  268. package/dist/src/project.js.map +0 -1
  269. package/dist/src/specification/common/Application.js +0 -3
  270. package/dist/src/specification/common/Application.js.map +0 -1
  271. package/dist/src/specification/common/i18n.json +0 -1
  272. package/dist/src/specification/common/index.js +0 -10
  273. package/dist/src/specification/common/index.js.map +0 -1
  274. package/dist/src/specification/common/page.js +0 -26
  275. package/dist/src/specification/common/page.js.map +0 -1
  276. package/dist/src/specification/common/types.js +0 -25
  277. package/dist/src/specification/common/types.js.map +0 -1
  278. package/dist/src/specification/common/webapp/manifest/Manifest.js +0 -17
  279. package/dist/src/specification/common/webapp/manifest/Manifest.js.map +0 -1
  280. package/dist/src/specification/common/webapp/manifest/index.js +0 -8
  281. package/dist/src/specification/common/webapp/manifest/index.js.map +0 -1
  282. package/dist/src/specification/common/webapp/manifest/sapOvp.js +0 -9
  283. package/dist/src/specification/common/webapp/manifest/sapOvp.js.map +0 -1
  284. package/dist/src/specification/common/webapp/manifest/sapUi5.js +0 -14
  285. package/dist/src/specification/common/webapp/manifest/sapUi5.js.map +0 -1
  286. package/dist/src/specification/schemaAccess.js +0 -62
  287. package/dist/src/specification/schemaAccess.js.map +0 -1
  288. package/dist/src/specification/v2/ApplicationV2.js +0 -3
  289. package/dist/src/specification/v2/ApplicationV2.js.map +0 -1
  290. package/dist/src/specification/v2/controls/Action.js +0 -15
  291. package/dist/src/specification/v2/controls/Action.js.map +0 -1
  292. package/dist/src/specification/v2/controls/AnalyticalListPageChart.js +0 -36
  293. package/dist/src/specification/v2/controls/AnalyticalListPageChart.js.map +0 -1
  294. package/dist/src/specification/v2/controls/AnalyticalListPageKPI.js +0 -3
  295. package/dist/src/specification/v2/controls/AnalyticalListPageKPI.js.map +0 -1
  296. package/dist/src/specification/v2/controls/Card.js +0 -53
  297. package/dist/src/specification/v2/controls/Card.js.map +0 -1
  298. package/dist/src/specification/v2/controls/Facets.js +0 -3
  299. package/dist/src/specification/v2/controls/Facets.js.map +0 -1
  300. package/dist/src/specification/v2/controls/Field.js +0 -3
  301. package/dist/src/specification/v2/controls/Field.js.map +0 -1
  302. package/dist/src/specification/v2/controls/FilterBar.js +0 -3
  303. package/dist/src/specification/v2/controls/FilterBar.js.map +0 -1
  304. package/dist/src/specification/v2/controls/Footer.js +0 -3
  305. package/dist/src/specification/v2/controls/Footer.js.map +0 -1
  306. package/dist/src/specification/v2/controls/ObjectPageChart.js +0 -3
  307. package/dist/src/specification/v2/controls/ObjectPageChart.js.map +0 -1
  308. package/dist/src/specification/v2/controls/ObjectPageForm.js +0 -3
  309. package/dist/src/specification/v2/controls/ObjectPageForm.js.map +0 -1
  310. package/dist/src/specification/v2/controls/ObjectPageHeader.js +0 -8
  311. package/dist/src/specification/v2/controls/ObjectPageHeader.js.map +0 -1
  312. package/dist/src/specification/v2/controls/ObjectPageLayout.js +0 -3
  313. package/dist/src/specification/v2/controls/ObjectPageLayout.js.map +0 -1
  314. package/dist/src/specification/v2/controls/ObjectPageSection.js +0 -13
  315. package/dist/src/specification/v2/controls/ObjectPageSection.js.map +0 -1
  316. package/dist/src/specification/v2/controls/ObjectPageTable.js +0 -7
  317. package/dist/src/specification/v2/controls/ObjectPageTable.js.map +0 -1
  318. package/dist/src/specification/v2/controls/ObjectPageToolBar.js +0 -3
  319. package/dist/src/specification/v2/controls/ObjectPageToolBar.js.map +0 -1
  320. package/dist/src/specification/v2/controls/Table.js +0 -51
  321. package/dist/src/specification/v2/controls/Table.js.map +0 -1
  322. package/dist/src/specification/v2/controls/ToolBar.js +0 -3
  323. package/dist/src/specification/v2/controls/ToolBar.js.map +0 -1
  324. package/dist/src/specification/v2/controls/index.js +0 -13
  325. package/dist/src/specification/v2/controls/index.js.map +0 -1
  326. package/dist/src/specification/v2/index.js +0 -9
  327. package/dist/src/specification/v2/index.js.map +0 -1
  328. package/dist/src/specification/v2/page.js +0 -3
  329. package/dist/src/specification/v2/page.js.map +0 -1
  330. package/dist/src/specification/v2/pages/AnalyticalListPageConfig.js +0 -3
  331. package/dist/src/specification/v2/pages/AnalyticalListPageConfig.js.map +0 -1
  332. package/dist/src/specification/v2/pages/ListReportConfig.js +0 -3
  333. package/dist/src/specification/v2/pages/ListReportConfig.js.map +0 -1
  334. package/dist/src/specification/v2/pages/ObjectPageConfig.js +0 -3
  335. package/dist/src/specification/v2/pages/ObjectPageConfig.js.map +0 -1
  336. package/dist/src/specification/v2/pages/OverviewPageConfig.js +0 -8
  337. package/dist/src/specification/v2/pages/OverviewPageConfig.js.map +0 -1
  338. package/dist/src/specification/v2/pages/index.js +0 -7
  339. package/dist/src/specification/v2/pages/index.js.map +0 -1
  340. package/dist/src/specification/v2/webapp/index.d.ts +0 -1
  341. package/dist/src/specification/v2/webapp/index.js +0 -7
  342. package/dist/src/specification/v2/webapp/index.js.map +0 -1
  343. package/dist/src/specification/v2/webapp/manifest/index.js +0 -8
  344. package/dist/src/specification/v2/webapp/manifest/index.js.map +0 -1
  345. package/dist/src/specification/v2/webapp/manifest/sapUi.js +0 -3
  346. package/dist/src/specification/v2/webapp/manifest/sapUi.js.map +0 -1
  347. package/dist/src/specification/v2/webapp/manifest/sapUi5.js +0 -9
  348. package/dist/src/specification/v2/webapp/manifest/sapUi5.js.map +0 -1
  349. package/dist/src/specification/v2/webapp/manifest/sapUiPageV2.js +0 -7
  350. package/dist/src/specification/v2/webapp/manifest/sapUiPageV2.js.map +0 -1
  351. package/dist/src/sync/common/appProvider.js +0 -59
  352. package/dist/src/sync/common/appProvider.js.map +0 -1
  353. package/dist/src/sync/common/decoration/control.js +0 -211
  354. package/dist/src/sync/common/decoration/control.js.map +0 -1
  355. package/dist/src/sync/common/decoration/decorators.js +0 -45
  356. package/dist/src/sync/common/decoration/decorators.js.map +0 -1
  357. package/dist/src/sync/common/decoration/factory.js +0 -48
  358. package/dist/src/sync/common/decoration/factory.js.map +0 -1
  359. package/dist/src/sync/common/decoration/flex.js +0 -8
  360. package/dist/src/sync/common/decoration/flex.js.map +0 -1
  361. package/dist/src/sync/common/decoration/index.js +0 -9
  362. package/dist/src/sync/common/decoration/index.js.map +0 -1
  363. package/dist/src/sync/common/flexUtils.js +0 -94
  364. package/dist/src/sync/common/flexUtils.js.map +0 -1
  365. package/dist/src/sync/common/generate/index.js +0 -8
  366. package/dist/src/sync/common/generate/index.js.map +0 -1
  367. package/dist/src/sync/common/generate/objectPage.js +0 -355
  368. package/dist/src/sync/common/generate/objectPage.js.map +0 -1
  369. package/dist/src/sync/common/generate/utils.js +0 -381
  370. package/dist/src/sync/common/generate/utils.js.map +0 -1
  371. package/dist/src/sync/common/i18n.json +0 -21
  372. package/dist/src/sync/common/import/utils.js +0 -92
  373. package/dist/src/sync/common/import/utils.js.map +0 -1
  374. package/dist/src/sync/common/importProject.js +0 -259
  375. package/dist/src/sync/common/importProject.js.map +0 -1
  376. package/dist/src/sync/common/index.js +0 -15
  377. package/dist/src/sync/common/index.js.map +0 -1
  378. package/dist/src/sync/common/types.js +0 -213
  379. package/dist/src/sync/common/types.js.map +0 -1
  380. package/dist/src/sync/common/utils.js +0 -1068
  381. package/dist/src/sync/common/utils.js.map +0 -1
  382. package/dist/src/sync/i18n.js +0 -15
  383. package/dist/src/sync/i18n.js.map +0 -1
  384. package/dist/src/sync/v2/application.js +0 -155
  385. package/dist/src/sync/v2/application.js.map +0 -1
  386. package/dist/src/sync/v2/export/controls/Action.js +0 -127
  387. package/dist/src/sync/v2/export/controls/Action.js.map +0 -1
  388. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +0 -61
  389. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +0 -1
  390. package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js +0 -56
  391. package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js.map +0 -1
  392. package/dist/src/sync/v2/export/controls/Card.js +0 -655
  393. package/dist/src/sync/v2/export/controls/Card.js.map +0 -1
  394. package/dist/src/sync/v2/export/controls/Field.js +0 -32
  395. package/dist/src/sync/v2/export/controls/Field.js.map +0 -1
  396. package/dist/src/sync/v2/export/controls/FilterBar.js +0 -107
  397. package/dist/src/sync/v2/export/controls/FilterBar.js.map +0 -1
  398. package/dist/src/sync/v2/export/controls/FormAction.js +0 -128
  399. package/dist/src/sync/v2/export/controls/FormAction.js.map +0 -1
  400. package/dist/src/sync/v2/export/controls/Fragment.js +0 -580
  401. package/dist/src/sync/v2/export/controls/Fragment.js.map +0 -1
  402. package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js +0 -110
  403. package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js.map +0 -1
  404. package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js +0 -62
  405. package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +0 -1
  406. package/dist/src/sync/v2/export/controls/ObjectPageHeader.js +0 -60
  407. package/dist/src/sync/v2/export/controls/ObjectPageHeader.js.map +0 -1
  408. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js +0 -62
  409. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +0 -1
  410. package/dist/src/sync/v2/export/controls/ObjectPageLayout.js +0 -59
  411. package/dist/src/sync/v2/export/controls/ObjectPageLayout.js.map +0 -1
  412. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +0 -193
  413. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +0 -1
  414. package/dist/src/sync/v2/export/controls/ObjectPageTable.js +0 -278
  415. package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +0 -1
  416. package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js +0 -61
  417. package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +0 -1
  418. package/dist/src/sync/v2/export/controls/Table.js +0 -593
  419. package/dist/src/sync/v2/export/controls/Table.js.map +0 -1
  420. package/dist/src/sync/v2/export/controls/TableColumn.js +0 -166
  421. package/dist/src/sync/v2/export/controls/TableColumn.js.map +0 -1
  422. package/dist/src/sync/v2/export/controls/ToolBar.js +0 -6
  423. package/dist/src/sync/v2/export/controls/ToolBar.js.map +0 -1
  424. package/dist/src/sync/v2/export/controls/index.js +0 -25
  425. package/dist/src/sync/v2/export/controls/index.js.map +0 -1
  426. package/dist/src/sync/v2/export/export.js +0 -682
  427. package/dist/src/sync/v2/export/export.js.map +0 -1
  428. package/dist/src/sync/v2/export/exportPage.js +0 -305
  429. package/dist/src/sync/v2/export/exportPage.js.map +0 -1
  430. package/dist/src/sync/v2/export/factory.js +0 -56
  431. package/dist/src/sync/v2/export/factory.js.map +0 -1
  432. package/dist/src/sync/v2/export/manifest.js +0 -169
  433. package/dist/src/sync/v2/export/manifest.js.map +0 -1
  434. package/dist/src/sync/v2/export/pages/AnalyticalListPage.js +0 -44
  435. package/dist/src/sync/v2/export/pages/AnalyticalListPage.js.map +0 -1
  436. package/dist/src/sync/v2/export/pages/ListReport.js +0 -41
  437. package/dist/src/sync/v2/export/pages/ListReport.js.map +0 -1
  438. package/dist/src/sync/v2/export/pages/ObjectPage.js +0 -74
  439. package/dist/src/sync/v2/export/pages/ObjectPage.js.map +0 -1
  440. package/dist/src/sync/v2/export/pages/OverviewPage.js +0 -118
  441. package/dist/src/sync/v2/export/pages/OverviewPage.js.map +0 -1
  442. package/dist/src/sync/v2/export/pages/index.js +0 -10
  443. package/dist/src/sync/v2/export/pages/index.js.map +0 -1
  444. package/dist/src/sync/v2/export/view-controller-generator.js +0 -141
  445. package/dist/src/sync/v2/export/view-controller-generator.js.map +0 -1
  446. package/dist/src/sync/v2/generate/analyticalListReport.js +0 -84
  447. package/dist/src/sync/v2/generate/analyticalListReport.js.map +0 -1
  448. package/dist/src/sync/v2/generate/generate.js +0 -99
  449. package/dist/src/sync/v2/generate/generate.js.map +0 -1
  450. package/dist/src/sync/v2/generate/index.js +0 -14
  451. package/dist/src/sync/v2/generate/index.js.map +0 -1
  452. package/dist/src/sync/v2/generate/listReport.js +0 -116
  453. package/dist/src/sync/v2/generate/listReport.js.map +0 -1
  454. package/dist/src/sync/v2/generate/objectPage.js +0 -537
  455. package/dist/src/sync/v2/generate/objectPage.js.map +0 -1
  456. package/dist/src/sync/v2/generate/overviewPage.js +0 -70
  457. package/dist/src/sync/v2/generate/overviewPage.js.map +0 -1
  458. package/dist/src/sync/v2/generate/utils.js +0 -526
  459. package/dist/src/sync/v2/generate/utils.js.map +0 -1
  460. package/dist/src/sync/v2/import/app/appProvider.js +0 -145
  461. package/dist/src/sync/v2/import/app/appProvider.js.map +0 -1
  462. package/dist/src/sync/v2/import/app/ovpProvider.js +0 -33
  463. package/dist/src/sync/v2/import/app/ovpProvider.js.map +0 -1
  464. package/dist/src/sync/v2/import/common/index.js +0 -395
  465. package/dist/src/sync/v2/import/common/index.js.map +0 -1
  466. package/dist/src/sync/v2/import/controls/table.js +0 -32
  467. package/dist/src/sync/v2/import/controls/table.js.map +0 -1
  468. package/dist/src/sync/v2/import/getPageType.d.ts +0 -0
  469. package/dist/src/sync/v2/import/getPageType.js +0 -1
  470. package/dist/src/sync/v2/import/getPageType.js.map +0 -1
  471. package/dist/src/sync/v2/import/index.js +0 -11
  472. package/dist/src/sync/v2/import/index.js.map +0 -1
  473. package/dist/src/sync/v2/import/pages/analyticalListPage.js +0 -119
  474. package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +0 -1
  475. package/dist/src/sync/v2/import/pages/listReport.js +0 -143
  476. package/dist/src/sync/v2/import/pages/listReport.js.map +0 -1
  477. package/dist/src/sync/v2/import/pages/objectPage.js +0 -745
  478. package/dist/src/sync/v2/import/pages/objectPage.js.map +0 -1
  479. package/dist/src/sync/v2/import/pages/overviewPage.js +0 -107
  480. package/dist/src/sync/v2/import/pages/overviewPage.js.map +0 -1
  481. package/dist/src/sync/v2/import/utils.js +0 -149
  482. package/dist/src/sync/v2/import/utils.js.map +0 -1
  483. package/dist/src/sync/v2/types.js +0 -36
  484. package/dist/src/sync/v2/types.js.map +0 -1
  485. package/dist/src/sync/v4/utils/StableIdHelper.js +0 -156
  486. package/dist/src/sync/v4/utils/StableIdHelper.js.map +0 -1
  487. package/dist/src/v2.js +0 -8
  488. package/dist/src/v2.js.map +0 -1
  489. package/dist/test/test-data/flexChange/v2/stta.prod.man/index.d.ts +0 -7
  490. package/dist/test/test-projects/index.d.ts +0 -2
  491. package/dist/test/test-utils/utils.d.ts +0 -33
  492. package/dist/test/unit/customSections/exportV2.test.d.ts +0 -1
  493. package/dist/test/unit/customSections/generateFacetsSchemaV2.test.d.ts +0 -1
  494. package/dist/test/unit/customSections/importV2.test.d.ts +0 -1
  495. package/dist/test/unit/export/exportALPV2.test.d.ts +0 -1
  496. package/dist/test/unit/export/exportAppV2.test.d.ts +0 -1
  497. package/dist/test/unit/export/exportLRPV2.test.d.ts +0 -1
  498. package/dist/test/unit/export/exportLRPV2CustomColumns.test.d.ts +0 -1
  499. package/dist/test/unit/export/exportOVPV2.test.d.ts +0 -1
  500. package/dist/test/unit/export/exportObjectPageV2.test.d.ts +0 -1
  501. package/dist/test/unit/export/flexUtils.test.d.ts +0 -1
  502. package/dist/test/unit/export/manifest.test.d.ts +0 -1
  503. package/dist/test/unit/fcl/exportV2.test.d.ts +0 -1
  504. package/dist/test/unit/fcl/importV2.test.d.ts +0 -1
  505. package/dist/test/unit/generateAppSchema/generateAppSchemaALPV2.test.d.ts +0 -1
  506. package/dist/test/unit/generateAppSchema/generateAppSchemaLRV2.test.d.ts +0 -1
  507. package/dist/test/unit/generateAppSchema/generateAppSchemaOPV2.test.d.ts +0 -1
  508. package/dist/test/unit/generateAppSchema/generateAppSchemaOVPV2.test.d.ts +0 -1
  509. package/dist/test/unit/generateGenericSchema/generateGenericSchemaAppV2.test.d.ts +0 -1
  510. package/dist/test/unit/generateGenericSchema/generateGenericSchemaLRV2.test.d.ts +0 -1
  511. package/dist/test/unit/generateGenericSchema/generateGenericSchemaOPV2.test.d.ts +0 -1
  512. package/dist/test/unit/generateGenericSchema/generateI18nV2.test.d.ts +0 -1
  513. package/dist/test/unit/generateGenericSchema/genericSchemas.test.d.ts +0 -1
  514. package/dist/test/unit/import/importALPV2.test.d.ts +0 -1
  515. package/dist/test/unit/import/importAppV2.test.d.ts +0 -1
  516. package/dist/test/unit/import/importLRPV2.test.d.ts +0 -1
  517. package/dist/test/unit/import/importOPV2.test.d.ts +0 -1
  518. package/dist/test/unit/import/importOVPV2.test.d.ts +0 -1
  519. package/dist/test/unit/index.test.d.ts +0 -1
  520. package/dist/test/unit/projects.test.d.ts +0 -1
  521. package/dist/test/unit/schemaAccess.test.d.ts +0 -1
  522. package/dist/test/unit/utils.test.d.ts +0 -1
  523. package/dist/test/unit/view-controller-generator.test.d.ts +0 -1
@@ -1,745 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const v2_1 = require("../../../../v2");
7
- const table_1 = require("../controls/table");
8
- const extensionLogger_1 = require("../../../../extensionLogger");
9
- const utils_1 = require("../utils");
10
- const common_1 = require("../../../common");
11
- const manifest_1 = require("../../export/manifest");
12
- const sapUiPageV2_1 = require("../.../../../../../specification/v2/webapp/manifest/sapUiPageV2");
13
- const i18next_1 = __importDefault(require("i18next"));
14
- const i18n_1 = require("../../../../i18n/i18n");
15
- const common_2 = require("../../../../specification/common");
16
- const factory_1 = require("../../export/factory");
17
- const types_1 = require("../../types");
18
- const common_3 = require("../common");
19
- // Comprises list of flexChanges that do not require a faacet id
20
- const SupportedFlexChangesWithoutFacetId = [common_1.ControlType.Avatar, common_1.ControlType.ObjectPageLayout, common_1.ControlType.DynamicPage];
21
- /**
22
- * Determines Facet ID from single string selector Id
23
- * @param {string} selectorId Selector ID
24
- * @returns {string} FacetID
25
- */
26
- function getSingleSelectorIdPart(selectorIdParts, facetID) {
27
- const lastIdParts = selectorIdParts[0].split('-');
28
- const id = lastIdParts[lastIdParts.length - 1];
29
- if (selectorIdParts[0].indexOf('::action::') >= 0 || selectorIdParts[0].startsWith('action::')) {
30
- // Object Page ToolBar Actions
31
- facetID =
32
- lastIdParts[0].split('::action::')[0] ||
33
- lastIdParts[0].split(`${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}::`)[1].split('::')[0];
34
- facetID = `${common_1.ActionTitlePrefix}${facetID}`;
35
- }
36
- else if (selectorIdParts[0].indexOf("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */) >= 0 ||
37
- selectorIdParts[0].indexOf('UI.LineItem') >= 0 ||
38
- selectorIdParts[0].indexOf('::Table') >= 0) {
39
- facetID = lastIdParts[0].split('::Table')[0].split('::responsiveTable')[0];
40
- }
41
- else {
42
- const idParts = id.split('::');
43
- if (idParts.length > 1) {
44
- facetID = idParts[0];
45
- }
46
- else if (lastIdParts[0].indexOf('::') > -1) {
47
- facetID = lastIdParts[0].split('::')[0];
48
- }
49
- }
50
- return facetID;
51
- }
52
- /**
53
- * Determines Facet ID of flex change
54
- * @param {string} selectorId Control ID of flex change
55
- * @returns {string} FacetID
56
- */
57
- function getFacetID(selectorId) {
58
- let facetID;
59
- const selectorIdParts = selectorId.split(':::');
60
- if (selectorIdParts.length === 1) {
61
- facetID = getSingleSelectorIdPart(selectorIdParts, facetID);
62
- }
63
- else if (selectorId.indexOf('sSmartTableId') >= 0) {
64
- for (const element of selectorIdParts) {
65
- if (element.startsWith('sSmartTableId')) {
66
- facetID = element
67
- .split('sSmartTableId::')[1]
68
- .split('::Table')[0]
69
- .split('/responsiveTable')[0]
70
- .replace(`::${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`, `/@${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`);
71
- break;
72
- }
73
- }
74
- }
75
- else {
76
- facetID = selectorIdParts[0];
77
- }
78
- return facetID;
79
- }
80
- /**
81
- * Prepares the list of flex changes
82
- * @param change - the flex change (UI Adaptation)
83
- * @returns {FlexChangesForTransfer} - list of prepared flex changes
84
- */
85
- function prepareFlexChanges(changes, entitySet, logger) {
86
- const result = {};
87
- const complexIdMatch = /.+DataField.+:::sSmartTableId::.+/;
88
- changes.forEach((changeString) => {
89
- var _a, _b;
90
- try {
91
- const change = common_1.parseChangeString(changeString);
92
- if (change && ((_a = change.controlId) === null || _a === void 0 ? void 0 : _a.includes(sapUiPageV2_1.FE_TEMPLATE_V2_OBJECT_PAGE)) && ((_b = change.controlId) === null || _b === void 0 ? void 0 : _b.includes(entitySet))) {
93
- let selectorId = change.controlId.split('--')[1].replace(/:3a:3a/g, '::');
94
- if (complexIdMatch.exec(selectorId) !== null) {
95
- selectorId = selectorId.split('template:::TableColumn:::')[1];
96
- }
97
- const facetID = getFacetID(selectorId);
98
- selectorId = common_3.convertSelector(selectorId)
99
- .replace(/:3a:3a/g, '::')
100
- .replace(/\/@com.sap.vocabularies/g, '::com.sap.vocabularies');
101
- result[`${selectorId}::${change.content.property}`] = {
102
- controlId: selectorId,
103
- propertyId: change.content.property,
104
- facetId: facetID,
105
- newValue: change.content.newBinding !== undefined ? change.content.newBinding : change.content.newValue,
106
- controlType: change.controlType,
107
- creation: change.creation
108
- };
109
- }
110
- }
111
- catch (error) {
112
- extensionLogger_1.log(logger, {
113
- severity: "error" /* Error */,
114
- message: i18next_1.default.t('FLEXERROR')
115
- }, ...error);
116
- }
117
- });
118
- const sortedList = Object.entries(result).sort((a, b) => a[1].creation - b[1].creation);
119
- return sortedList.reduce((accum, [k, v]) => {
120
- accum[k] = v;
121
- return accum;
122
- }, {});
123
- }
124
- /**
125
- * Returns the type of a given section
126
- * @param schemaSection - current section
127
- * @returns {SectionTypeV2} - type of section, differentiated by level (Sub/Section)
128
- */
129
- const getSectionType = (schemaSection) => {
130
- var _a, _b, _c;
131
- let reference;
132
- if (schemaSection['$ref']) {
133
- reference = schemaSection['$ref'].includes('<') ? schemaSection['$ref'].split('<')[0] : schemaSection['$ref'];
134
- return reference.replace(common_1.DEFINITION_LINK_PREFIX, '');
135
- }
136
- else if ((_b = (_a = schemaSection['properties']) === null || _a === void 0 ? void 0 : _a['subsections']) === null || _b === void 0 ? void 0 : _b['$ref']) {
137
- reference = schemaSection['properties']['subsections']['$ref'];
138
- reference = reference.includes('<') ? reference.split('<')[0] : reference;
139
- return reference.replace(common_1.DEFINITION_LINK_PREFIX, '');
140
- }
141
- else if ((_c = schemaSection['properties']) === null || _c === void 0 ? void 0 : _c['subsections']) {
142
- return types_1.SectionTypeV2.SubSection;
143
- }
144
- };
145
- /**
146
- * Import of flex changes of a table to the config JSON of OP
147
- * @param flexChanges - list of flex changes (pre-processed by prepareFlexChanges)
148
- * @param propertyKey - key of the current property in the app schema
149
- * @param configPart - part of the configuration to be filled
150
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
151
- * @param sectionTitle - title of the section (optional)
152
- * @param sectionId - ID of the given section (optional)
153
- */
154
- function importFlexChangesOfTable(flexChanges, propertyKey, configPart, importParameters, sectionTitle, sectionId) {
155
- let facetIds;
156
- if (sectionTitle) {
157
- facetIds = [sectionTitle.replace(/@/g, '')];
158
- }
159
- else {
160
- facetIds = [sectionId.replace(/@/g, ''), sectionId === null || sectionId === void 0 ? void 0 : sectionId.replace(/::@com.sap.vocabularies/g, v2_1.VOCWITHSLASH)];
161
- }
162
- for (const selector in flexChanges) {
163
- const flexChange = flexChanges[selector];
164
- const propertyIdMatch = flexChange.propertyId === propertyKey;
165
- const isTableColumn = propertyKey === 'columns' && flexChange.controlType === common_1.ControlType.TableColumn;
166
- if ((propertyIdMatch || isTableColumn) && facetIds.indexOf(flexChange === null || flexChange === void 0 ? void 0 : flexChange.facetId) > -1) {
167
- table_1.addFlexForTable(configPart, flexChange, importParameters.jsonSchema);
168
- }
169
- }
170
- }
171
- /**
172
- * RegEx check of the control Id and/or the section Id against the selector of a flex change
173
- * @param schemaDefinition - current section of the app specific schema
174
- * @param flexChange - flex change
175
- * @param controlIdChecker - RegEx for the controlId
176
- * @param selectionIdChecker - RegEx for the selectionId
177
- * @param sectionId - title of the section (optional)
178
- * @param controlId - ID of the given control, for e.g. GroupElement, Action (optional)
179
- * @returns the result of all checks
180
- */
181
- function matchSelector(schemaDefinition, flexChange, controlIdChecker, selectionIdChecker, sectionId, controlId) {
182
- var _a;
183
- let idMatch = false, controlIdMatch = false;
184
- const idElementChecker = (arr, target) => target.every((v) => arr.includes(v));
185
- if (controlId) {
186
- idMatch = controlIdMatch = controlIdChecker.test(flexChange.controlId);
187
- if (sectionId) {
188
- idMatch = controlIdMatch && selectionIdChecker.test(flexChange.controlId);
189
- }
190
- }
191
- else if (sectionId) {
192
- idMatch = selectionIdChecker.test(flexChange.controlId);
193
- }
194
- const controlIdParts = flexChange.controlId.split('::');
195
- return ((flexChange.controlType === common_1.ControlType.SmartGroup && controlIdMatch) ||
196
- (((_a = flexChange.facetId) === null || _a === void 0 ? void 0 : _a.includes(common_1.ActionTitlePrefix)) && !sectionId && idMatch) ||
197
- (sectionId && idElementChecker(controlIdParts, sectionId.split('::')) && idMatch) ||
198
- (schemaDefinition.title && idElementChecker(controlIdParts, schemaDefinition.title.split('::'))) ||
199
- (!flexChange.facetId && SupportedFlexChangesWithoutFacetId.includes(flexChange.controlType)));
200
- }
201
- /**
202
- * Import of (regular) flex changes to the config JSON of OP
203
- * @param schemaDefinition - current section of the app specific schema
204
- * @param configPart - part of the configuration to be filled
205
- * @param flexChanges - list of flex changes (pre-processed by prepareFlexChanges)
206
- * @param propertyKey - key of the current property in the app schema
207
- * @param sectionId - title of the section (optional)
208
- * @param elementId - stable ID part of the given element, for e.g. GroupElement, Action (optional)
209
- */
210
- function importFlexChanges(schemaDefinition, configPart, flexChanges, propertyKey, sectionId, elementId) {
211
- var _a;
212
- const controlIdChecker = new RegExp(`.*${elementId}`);
213
- const selectionIdChecker = new RegExp(`.*${sectionId}`);
214
- for (const selector in flexChanges) {
215
- const flexChange = flexChanges[selector];
216
- //Property match?
217
- if (flexChange.propertyId !== propertyKey) {
218
- continue;
219
- }
220
- //Control type match?
221
- if (flexChange.controlType !== ((_a = schemaDefinition.properties[flexChange.propertyId]) === null || _a === void 0 ? void 0 : _a[v2_1.SchemaTag.controlType])) {
222
- continue;
223
- }
224
- const match = matchSelector(schemaDefinition, flexChange, controlIdChecker, selectionIdChecker, sectionId, elementId);
225
- if (match) {
226
- configPart[propertyKey] = flexChange.newValue;
227
- }
228
- }
229
- }
230
- /**
231
- * Checks for deprecated properties and writes them to the log
232
- * @param manifestSection - given section in the manifest
233
- * @param deprecatedProperties - list of deperecated properties
234
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
235
- * @param manifestPath - manifest path, as calcualted by the sync rule
236
- */
237
- function checkDeprecatedProperties(manifestSection, deprecatedProperties, importParameters, manifestPath) {
238
- if (manifestSection && deprecatedProperties) {
239
- for (const key in manifestSection) {
240
- const deprecated = deprecatedProperties[key];
241
- if (deprecated) {
242
- extensionLogger_1.log(importParameters.logger, {
243
- severity: "warning" /* Warning */,
244
- message: common_1.getTextForDeprecated(key, deprecated),
245
- location: {
246
- path: 'webapp/manifest.json/',
247
- range: manifestPath.split('/')
248
- }
249
- });
250
- delete deprecatedProperties[key];
251
- }
252
- }
253
- }
254
- }
255
- /**
256
- * Imports manifest settings to the object page config
257
- * @param syncRule - sync rule for accessing the reflect-metadata
258
- * @param pageKeys - list of page keys (comprises the one entry describing the given page)
259
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
260
- * @param configPart - part of the configuration to be filled
261
- * @param propertyKey - key of the current property of the schema definition
262
- * @param deprecatedProperties - list od deperecated properties
263
- * @param sectionId - ID of the given section (optional)
264
- * @param sectionTitle - title of the section (optional)
265
- */
266
- function importManifestSetting(syncRule, pageKeys, importParameters, configPart, propertyKey, deprecatedProperties, sectionPart) {
267
- const sectionIdInManifest = (sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.id) ? sectionPart.id.replace(/\/@/g, '::').replace(/@com.sap/g, 'com.sap')
268
- : undefined;
269
- let manifestPath;
270
- let manifestSection;
271
- if (sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.title) {
272
- manifestPath = syncRule.manifest.path(pageKeys, {}, sectionPart.title);
273
- manifestSection = manifest_1.ensureManifestSectionByPathV2(importParameters.manifest, manifestPath);
274
- if (Object.values(manifestSection).length === 0) {
275
- manifestPath = syncRule.manifest.path(pageKeys, {}, sectionIdInManifest);
276
- manifestSection = manifest_1.ensureManifestSectionByPathV2(importParameters.manifest, manifestPath);
277
- }
278
- }
279
- else {
280
- manifestPath = syncRule.manifest.path(pageKeys, {}, sectionIdInManifest);
281
- manifestSection = manifest_1.ensureManifestSectionByPathV2(importParameters.manifest, manifestPath);
282
- }
283
- const importHandler = syncRule.manifest.import;
284
- if (importHandler && typeof importHandler === 'function') {
285
- const value = importHandler(manifestSection, sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.id);
286
- if (value !== undefined) {
287
- configPart[propertyKey] = value;
288
- }
289
- }
290
- else {
291
- const manifestKey = syncRule.manifest.key || propertyKey;
292
- if (manifestKey in manifestSection) {
293
- configPart[propertyKey] = manifestSection[manifestKey];
294
- }
295
- }
296
- // Check for deprecated properties.
297
- checkDeprecatedProperties(manifestSection, deprecatedProperties, importParameters, manifestPath);
298
- return manifestSection;
299
- }
300
- /**
301
- * Transfers settings from manifest and flexChanges to object page config
302
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
303
- * @param configPart - part of the configuration to be filled
304
- * @param schemaDefinition - current section of the app specific schema
305
- * @param configParameters - comprises page keys and flex changes
306
- * @param sectionPart - structure comprising the section information
307
- * @param elementId - stable ID part of the given element (action, column, ...) (optional)
308
- */
309
- function transferSettingsAndFlexChanges(importParameters, configPart, schemaDefinition, configParameters, sectionPart, elementId) {
310
- var _a, _b;
311
- if (!schemaDefinition) {
312
- return;
313
- }
314
- const deprecatedProperties = (configPart === null || configPart === void 0 ? void 0 : configPart.getDeprecated) ? configPart.getDeprecated() : {};
315
- for (const propertyKey in schemaDefinition.properties || schemaDefinition) {
316
- const syncRule = common_1.getReflectMetadata(configPart, propertyKey);
317
- if (propertyKey === 'columns' || (syncRule === null || syncRule === void 0 ? void 0 : syncRule.flex)) {
318
- if (((_a = sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.type) === null || _a === void 0 ? void 0 : _a.startsWith('ObjectPageSectionTableV2')) || ((_b = sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.type) === null || _b === void 0 ? void 0 : _b.startsWith('ObjectPageSubSectionTableV2'))) {
319
- importFlexChangesOfTable(configParameters.flexChanges, propertyKey, configPart, importParameters, sectionPart.title, sectionPart.id);
320
- }
321
- else {
322
- const facetId = (sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.title) || (sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.id);
323
- importFlexChanges(schemaDefinition, configPart, configParameters.flexChanges, propertyKey, facetId, elementId);
324
- }
325
- }
326
- else if (syncRule === null || syncRule === void 0 ? void 0 : syncRule.manifest) {
327
- importManifestSetting(syncRule, configParameters.pageKeys, importParameters, configPart, propertyKey, deprecatedProperties, sectionPart);
328
- }
329
- }
330
- }
331
- /**
332
- *
333
- * @param actionType - type of action
334
- * @param configActionId - id of action in config
335
- * @param {ActionTypeV2|string} importTypeId - type of action that was be initiated
336
- * @returns {string} actionId - to be used for import of flex changes
337
- */
338
- function getActionId(actionType, configActionId, importTypeId, facetId) {
339
- let actionId = common_1.convertActionKeyToStableId(configActionId);
340
- if (actionType === types_1.ActionTypeV2.Form) {
341
- actionId = `action::${actionId}::${facetId}::${importTypeId}`;
342
- }
343
- else if (actionType === types_1.ActionTypeV2.OPFooter) {
344
- actionId = `action::${actionId}::Determining`;
345
- }
346
- else if (actionType === types_1.ActionTypeV2.OPToolBar) {
347
- actionId = actionId.includes('sAction::')
348
- ? `action::${actionId.split('sAction::')[1]}`
349
- : `action::${actionId.replace(':2f', '::')}`;
350
- }
351
- return actionId.replace(/@/g, '');
352
- }
353
- /**
354
- * Fills the action of the configuration
355
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
356
- * @param {object} actionProperties - current properties' list (of action)
357
- * @param {object} configPart - the given part of the object page config
358
- * @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
359
- * @param {ActionTypeV2|string} importTypeId - type of action that should be initiated
360
- */
361
- function fillActions(importParameters, actionProperties, configPart, configParameters, importTypeId, facetId) {
362
- var _a;
363
- configPart[v2_1.PropertyName.actions] = {};
364
- const actionType = importTypeId.split('::').pop();
365
- if (configParameters.flexChanges && Object.keys(configParameters.flexChanges).length > 0) {
366
- const sectionPart = {};
367
- if (facetId) {
368
- sectionPart.id = facetId;
369
- }
370
- for (const actionProperty in actionProperties) {
371
- const configActionId = common_3.convertActionKey(actionProperty);
372
- const actionId = getActionId(actionType, configActionId, importTypeId, facetId);
373
- if (actionId) {
374
- configPart[v2_1.PropertyName.actions][configActionId] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, actionType);
375
- transferSettingsAndFlexChanges(importParameters, configPart[v2_1.PropertyName.actions][configActionId], importParameters.jsonSchema.definitions[actionType], configParameters, sectionPart, actionId);
376
- }
377
- if (((_a = configPart[v2_1.PropertyName.actions]) === null || _a === void 0 ? void 0 : _a[configActionId]) &&
378
- Object.keys(configPart[v2_1.PropertyName.actions][configActionId]).length === 0) {
379
- delete configPart[v2_1.PropertyName.actions][configActionId];
380
- }
381
- }
382
- }
383
- if (Object.keys(configPart[v2_1.PropertyName.actions]).length === 0) {
384
- delete configPart[v2_1.PropertyName.actions];
385
- }
386
- }
387
- /**
388
- * Fills the fields of an object page form
389
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
390
- * @param {sectionPartProperties} sectionPart - current properties' list of form section
391
- * @param fieldProperties - current properties' list (of fields)
392
- * @param configPart - the given part of the object page config
393
- * @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
394
- */
395
- function fillFields(importParameters, sectionPart, fieldProperties, configPart, configParameters) {
396
- let fieldId;
397
- configPart[sectionPart.id]['form']['fields'] = {};
398
- for (const fieldProperty in fieldProperties) {
399
- fieldId = fieldProperty.includes('::')
400
- ? fieldProperty.split('::')[1] + '::GroupElement'
401
- : fieldProperty + '::GroupElement';
402
- configPart[sectionPart.id]['form']['fields'][fieldProperty] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'Field');
403
- transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id]['form']['fields'][fieldProperty], importParameters.jsonSchema.definitions[v2_1.DefinitionName.Field], configParameters, {}, `${sectionPart.id.replace(/@/g, '')}::${fieldId}`);
404
- if (Object.keys(configPart[sectionPart.id]['form']['fields'][fieldProperty]).length === 0) {
405
- delete configPart[sectionPart.id]['form']['fields'][fieldProperty];
406
- }
407
- }
408
- if (Object.keys(configPart[sectionPart.id]['form']['fields']).length === 0) {
409
- delete configPart[sectionPart.id]['form']['fields'];
410
- }
411
- }
412
- /**
413
- * Adjusts the app schema by choosing the right table definition, depending on the table type
414
- * @param tableType - the type of the given table
415
- * @param {SectionPartProperties} sectionPart - current properties' list
416
- * @param schemaDefinitions - definitions' section of the app schema
417
- * @returns the right schema definition for the given table
418
- */
419
- function prepareTableSchema(tableType, sectionPart, schemaDefinitions) {
420
- let tableSchema;
421
- if (tableType === 'TreeTable' || tableType === 'AnalyticalTable' || tableType === 'GridTable') {
422
- tableSchema = schemaDefinitions[`ObjectPage${tableType}<${sectionPart.id}>`];
423
- }
424
- else {
425
- tableSchema = schemaDefinitions[`ObjectPageResponsiveTable<${sectionPart.id}>`];
426
- }
427
- return tableSchema;
428
- }
429
- /**
430
- * Fills the table section of the object page config
431
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
432
- * @param {SectionPartProperties} sectionPart - current properties' list
433
- * @param {Settings} manifestSettings - object page settings section of the manifest
434
- * @param {object} configPart - the given part of the object page config
435
- * @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
436
- */
437
- function fillTableInConfig(importParameters, sectionPart, manifestSettings, configPart, configParameters) {
438
- var _a, _b;
439
- const manifestKey = sectionPart.title || sectionPart.id.replace('@com.sap', 'com.sap');
440
- const manifestSection = manifestSettings && manifestSettings.sections && manifestSettings.sections[manifestKey];
441
- if (manifestSection || configParameters.flexChanges) {
442
- const tableType = ((_a = manifestSection === null || manifestSection === void 0 ? void 0 : manifestSection.tableSettings) === null || _a === void 0 ? void 0 : _a.type) || 'ResponsiveTable';
443
- //Instantiate metadata
444
- const OPtable = configParameters.factory.createInstance(common_2.PageType.ObjectPage, `ObjectPage${tableType}`, {
445
- toolBar: {}
446
- });
447
- configPart[sectionPart.id] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, sectionPart.type, {
448
- table: {}
449
- });
450
- configPart[sectionPart.id][v2_1.PropertyName.table] = OPtable;
451
- const schemaDefinitions = importParameters.jsonSchema.definitions;
452
- const tableSchema = prepareTableSchema(tableType, sectionPart, schemaDefinitions);
453
- //Transfer settings of (sub)section
454
- transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id], sectionPart.schema, configParameters, { title: sectionPart.title });
455
- //Transfer settings of table
456
- transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id][v2_1.PropertyName.table], tableSchema, configParameters, sectionPart);
457
- //Transfer settings of table toolbar actions
458
- const toolBarActions = JSON.parse(JSON.stringify(schemaDefinitions))[`Actions<${sectionPart.id}>`];
459
- if (toolBarActions === null || toolBarActions === void 0 ? void 0 : toolBarActions.properties) {
460
- const facetId = (sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.title) ? sectionPart.title.replace(/@/g, '::').replace(/::com/g, 'com')
461
- : (_b = sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.id) === null || _b === void 0 ? void 0 : _b.replace(/@/g, '::').replace(/::com/g, 'com');
462
- fillActions(importParameters, toolBarActions.properties, configPart[sectionPart.id][v2_1.PropertyName.table]['toolBar'], configParameters, types_1.ActionTypeV2.OPToolBar, facetId);
463
- }
464
- if (Object.keys(configPart[sectionPart.id][v2_1.PropertyName.table]['toolBar']).length === 0) {
465
- delete configPart[sectionPart.id][v2_1.PropertyName.table]['toolBar'];
466
- }
467
- }
468
- }
469
- /**
470
- * Fills custom columns in a V2 object page config JSON
471
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
472
- * @param {string} escapedSectionId - escaped version of the section ID
473
- * @param {string} sectionTitle - title of current section, if available
474
- * @param {object} configPart - the given part of the object page config
475
- * @param {SapUiAppPageV2} v2Page - v2 page from manifest.
476
- */
477
- function fillCustomColumnsInConfig(importParameters, escapedSectionId, configPart, v2Page) {
478
- const customColumnSchemaProp = importParameters.jsonSchema.definitions[escapedSectionId].properties.custom;
479
- const customColumnTarget = customColumnSchemaProp
480
- ? common_1.getTargetFromCustomColumnRef(customColumnSchemaProp.$ref)
481
- : undefined;
482
- if (customColumnTarget) {
483
- const objectPageSectionData = {
484
- key: escapedSectionId.replace('@', ''),
485
- target: customColumnTarget
486
- };
487
- common_3.addFragments(configPart[escapedSectionId], importParameters.manifest, v2Page, common_2.PageType.ObjectPage, importParameters.fragments, objectPageSectionData);
488
- }
489
- }
490
- /**
491
- * Fills the sections and subsections of the object page config (recursive function)
492
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
493
- * @param {sectionPartProperties} sectionPart - current properties' list of chart section
494
- * @param {Settings} manifestSettings - object page settings section of the manifest
495
- * @param {object} configPart - the given part of the object page config
496
- * @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
497
- */
498
- function fillChartSection(importParameters, sectionPart, manifestSettings, configPart, configParameters) {
499
- const manifestKey = sectionPart.id.replace('@com.sap', 'com.sap');
500
- const manifestSection = manifestSettings && manifestSettings.sections && manifestSettings.sections[manifestKey];
501
- configPart[sectionPart.id] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, sectionPart.type, {
502
- chart: {}
503
- });
504
- configPart[sectionPart.id][v2_1.PropertyName.chart] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageChart');
505
- if (manifestSection || configParameters.flexChanges) {
506
- transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id], sectionPart.schema, configParameters, { title: sectionPart.title });
507
- transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id][v2_1.PropertyName.chart], importParameters.jsonSchema.definitions[v2_1.DefinitionName.ObjectPageChart], configParameters, sectionPart);
508
- }
509
- }
510
- /**
511
- * Fills the form section of the object page config
512
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
513
- * @param {sectionPartProperties} sectionPart - current properties' list of form section
514
- * @param {object} configPart - the given part of the object page config
515
- * @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
516
- */
517
- function fillFormSection(importParameters, sectionPart, configPart, configParameters) {
518
- var _a;
519
- const formId = sectionPart.schema['properties']['form']['$ref'].split('SectionForm')[1];
520
- configPart[sectionPart.id] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, sectionPart.type, {
521
- form: {}
522
- });
523
- if (configParameters.flexChanges) {
524
- transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id], sectionPart.schema, configParameters, { title: sectionPart.title });
525
- }
526
- const formActions = importParameters.jsonSchema.definitions[`SectionActions${formId}`];
527
- const facetId = (sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.title) ? sectionPart.title.replace(/@/g, '::').replace(/::com/g, 'com')
528
- : (_a = sectionPart === null || sectionPart === void 0 ? void 0 : sectionPart.id) === null || _a === void 0 ? void 0 : _a.replace(/@/g, '::').replace(/::com/g, 'com');
529
- if (formActions === null || formActions === void 0 ? void 0 : formActions.properties) {
530
- fillActions(importParameters, formActions.properties, configPart[sectionPart.id]['form'], configParameters, types_1.ActionTypeV2.Form, facetId);
531
- }
532
- const formFields = importParameters.jsonSchema.definitions[`SectionFields${formId}`];
533
- if (formFields.properties) {
534
- fillFields(importParameters, sectionPart, formFields.properties, configPart, configParameters);
535
- }
536
- if (Object.keys(configPart[sectionPart.id]['form']).length === 0) {
537
- delete configPart[sectionPart.id]['form'];
538
- }
539
- if (Object.keys(configPart[sectionPart.id]).length === 0) {
540
- delete configPart[sectionPart.id];
541
- }
542
- }
543
- /**
544
- * Fills the subsection of the object page config
545
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
546
- * @param {sectionPartProperties} sectionPart - current properties' list of subsection
547
- * @param {Settings} manifestSettings - object page settings section of the manifest
548
- * @param {object} configPart - the given part of the object page config
549
- * @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
550
- */
551
- function fillSubSection(importParameters, sectionPart, manifestSettings, configPart, configParameters) {
552
- var _a;
553
- configPart[sectionPart.id] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, sectionPart.type, {
554
- subsections: {}
555
- });
556
- if (configParameters.flexChanges) {
557
- transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id], sectionPart.schema, configParameters, sectionPart);
558
- }
559
- let currentSchemaSection;
560
- const schemaProperties = sectionPart.schema.properties;
561
- if ((_a = schemaProperties === null || schemaProperties === void 0 ? void 0 : schemaProperties.subsections) === null || _a === void 0 ? void 0 : _a.properties) {
562
- currentSchemaSection = schemaProperties.subsections.properties;
563
- }
564
- else {
565
- currentSchemaSection = schemaProperties;
566
- }
567
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
568
- fillSectionsInConfig(importParameters, currentSchemaSection, manifestSettings, configPart[sectionPart.id]['subsections'], configParameters);
569
- if (Object.keys(configPart[sectionPart.id]['subsections']).length < 1) {
570
- delete configPart[sectionPart.id]['subsections'];
571
- }
572
- }
573
- /**
574
- * Fills the sections and subsections of the object page config (recursive function)
575
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
576
- * @param {object} sectionProperties - current properties' list (of sections or subsections)
577
- * @param {Settings} manifestSettings - object page settings section of the manifest
578
- * @param {object} configPart - the given part of the object page config
579
- * @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig.
580
- */
581
- function fillSectionsInConfig(importParameters, sectionProperties, manifestSettings, configPart, configParameters) {
582
- var _a;
583
- const appSchemaDefinitions = importParameters.jsonSchema.definitions;
584
- for (const sectionId in sectionProperties) {
585
- const escapedSectionId = sectionId.replace(/\/@/g, '::');
586
- const sectionPart = {
587
- id: escapedSectionId,
588
- type: getSectionType(sectionProperties[sectionId]),
589
- schema: sectionProperties[sectionId],
590
- title: common_1.getSectionTitle(sectionProperties[sectionId], importParameters.jsonSchema)
591
- };
592
- if (sectionPart.schema['$ref'] && sectionPart.type) {
593
- switch (sectionPart.type) {
594
- case types_1.SectionTypeV2.SectionTable:
595
- case types_1.SectionTypeV2.SubSectionTable: {
596
- sectionPart.schema = appSchemaDefinitions[`${sectionPart.type}<${sectionId}>`];
597
- fillTableInConfig(importParameters, sectionPart, manifestSettings, configPart, configParameters);
598
- // Custom column ref
599
- fillCustomColumnsInConfig(importParameters, escapedSectionId, configPart, configParameters.v2Page);
600
- break;
601
- }
602
- case types_1.SectionTypeV2.SectionChart:
603
- case types_1.SectionTypeV2.SubSectionChart: {
604
- // Section without subsections
605
- sectionPart.schema = appSchemaDefinitions[`${sectionPart.type}<${sectionId}>`];
606
- fillChartSection(importParameters, sectionPart, manifestSettings, configPart, configParameters);
607
- break;
608
- }
609
- case types_1.SectionTypeV2.SectionForm:
610
- case types_1.SectionTypeV2.SubSectionForm: {
611
- sectionPart.schema = appSchemaDefinitions[`${sectionPart.type}<${sectionId}>`];
612
- fillFormSection(importParameters, sectionPart, configPart, configParameters);
613
- break;
614
- }
615
- case types_1.SectionTypeV2.Section:
616
- case types_1.SectionTypeV2.SectionAddress:
617
- case types_1.SectionTypeV2.SubSectionAddress:
618
- case types_1.SectionTypeV2.SectionContact:
619
- case types_1.SectionTypeV2.SubSectionContact:
620
- case types_1.SectionTypeV2.SubSection: {
621
- // Section with subsections
622
- sectionPart.schema = appSchemaDefinitions[`${sectionPart.type}<${sectionId}>`];
623
- fillSubSection(importParameters, sectionPart, manifestSettings, configPart, configParameters);
624
- break;
625
- }
626
- }
627
- }
628
- else if ((_a = sectionPart.schema.properties) === null || _a === void 0 ? void 0 : _a['subsections']) {
629
- sectionPart.schema = appSchemaDefinitions[`${sectionPart.type}<${sectionId}>`];
630
- fillSubSection(importParameters, sectionPart, manifestSettings, configPart, configParameters);
631
- }
632
- }
633
- }
634
- /**
635
- * Fill properties of object page confg based on manifest settings
636
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
637
- * @param pageKeys - list of page keys (comprises the one entry describing the given page)
638
- * @param flexChangesForTransfer - list of flex changes (pre-processed by prepareFlexChanges)
639
- * @param v2Page - page definition in manifest.json
640
- * @param {MetadataInstanceInterface} factory - factory, for generating the access to reflect-metadata
641
- * @returns {ObjectPageConfig} - the object page configuration (JSON)
642
- */
643
- function fillConfig(importParameters, configParameters) {
644
- const objectPageConfig = configParameters.factory.createPageInstance(common_2.PageType.ObjectPage);
645
- const manifestSettings = configParameters.v2Page.component.settings;
646
- // Transfer page information
647
- transferSettingsAndFlexChanges(importParameters, objectPageConfig, importParameters.jsonSchema['properties'], configParameters);
648
- // Transfer header information
649
- objectPageConfig.header = configParameters.factory.createInstance(common_2.PageType.ObjectPage, v2_1.DefinitionName.ObjectPageHeader);
650
- const definitions = importParameters.jsonSchema.definitions;
651
- const schemaDefinition = definitions[v2_1.DefinitionName.ObjectPageHeader]
652
- ? definitions[v2_1.DefinitionName.ObjectPageHeader]
653
- : definitions['ObjectPageHeader<GenericActions>'];
654
- transferSettingsAndFlexChanges(importParameters, objectPageConfig.header, schemaDefinition, configParameters);
655
- const headerAction = definitions[v2_1.DefinitionName.HeaderActions];
656
- if (headerAction) {
657
- fillActions(importParameters, headerAction.properties, objectPageConfig.header, configParameters, types_1.ActionTypeV2.Header);
658
- }
659
- objectPageConfig.footer = {};
660
- const footerAction = definitions[v2_1.DefinitionName.FooterActions];
661
- if (footerAction) {
662
- fillActions(importParameters, footerAction.properties, objectPageConfig.footer, configParameters, types_1.ActionTypeV2.OPFooter);
663
- }
664
- // Transfer Layout information
665
- objectPageConfig.layout = configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageLayout');
666
- transferSettingsAndFlexChanges(importParameters, objectPageConfig.layout, definitions[v2_1.DefinitionName.ObjectPageLayout], configParameters);
667
- if (Object.keys(objectPageConfig.layout).length === 0) {
668
- delete objectPageConfig.layout;
669
- }
670
- // Fill sections and subsections
671
- objectPageConfig.sections = {};
672
- const sections = definitions[v2_1.DefinitionName.Sections];
673
- if (sections) {
674
- fillSectionsInConfig(importParameters, sections.properties, manifestSettings, objectPageConfig.sections, configParameters);
675
- }
676
- // Find custom sections
677
- const customSections = utils_1.findCustomSectionExtensions(importParameters.manifest, importParameters.entitySet);
678
- if (Object.keys(customSections).length > 0) {
679
- objectPageConfig.sections.custom = [];
680
- for (const sectionId in customSections) {
681
- const customSection = 'fragmentName' in customSections[sectionId]
682
- ? configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageCustomSectionFragment')
683
- : configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageCustomSectionView');
684
- const customSectionDefinition = definitions['fragmentName' in customSections[sectionId]
685
- ? 'ObjectPageCustomSectionFragment'
686
- : 'ObjectPageCustomSectionView'];
687
- transferSettingsAndFlexChanges(importParameters, customSection, customSectionDefinition, configParameters, { id: sectionId });
688
- objectPageConfig.sections.custom.push(customSection);
689
- }
690
- }
691
- return objectPageConfig;
692
- }
693
- /**
694
- * Creates the configuration (file content) for a V2 object page
695
- * @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
696
- *
697
- * @returns {ObjectPageConfig} - the object page configuration (JSON)
698
- */
699
- function createObjectPageConfigV2(importParameters) {
700
- // Initialize i18next
701
- i18n_1.initI18n();
702
- if (!importParameters.manifest[common_2.ManifestSection.generic]) {
703
- extensionLogger_1.log(importParameters.logger, {
704
- severity: "error" /* Error */,
705
- message: i18next_1.default.t('NOFE'),
706
- location: {
707
- path: v2_1.MANIFESTPATH,
708
- range: [common_2.ManifestSection.generic]
709
- }
710
- });
711
- return;
712
- }
713
- const pageKeys = [];
714
- const v2Pages = importParameters.manifest[common_2.ManifestSection.generic].pages;
715
- if (!v2Pages) {
716
- extensionLogger_1.log(importParameters.logger, {
717
- severity: "error" /* Error */,
718
- message: i18next_1.default.t('NOPAGES', { appId: importParameters.manifest['sap.app']['id'] }),
719
- location: {
720
- path: v2_1.MANIFESTPATH,
721
- range: [common_2.ManifestSection.generic]
722
- }
723
- });
724
- return;
725
- }
726
- const entitySet = importParameters.entitySet;
727
- const v2Page = utils_1.findObjectPageV2(v2Pages, importParameters.entitySet, pageKeys);
728
- if (!v2Page) {
729
- extensionLogger_1.log(importParameters.logger, {
730
- severity: "error" /* Error */,
731
- message: i18next_1.default.t('NOENTITYSET', { entitySet }),
732
- location: {
733
- path: v2_1.MANIFESTPATH,
734
- range: [common_2.ManifestSection.generic]
735
- }
736
- });
737
- return;
738
- }
739
- const flexChangesForTransfer = prepareFlexChanges(importParameters.flex, entitySet);
740
- const factory = new factory_1.MetadataInstanceFactoryV2();
741
- //Fill config.json with manifest settings and flex changes
742
- return fillConfig(importParameters, { pageKeys, flexChanges: flexChangesForTransfer, v2Page, factory });
743
- }
744
- exports.createObjectPageConfigV2 = createObjectPageConfigV2;
745
- //# sourceMappingURL=objectPage.js.map