@sap/ux-specification 1.136.11 → 1.136.13

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 (354) hide show
  1. package/CHANGELOG.md +65 -1
  2. package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
  3. package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
  4. package/dist/documentation/v2/v2-ListReport.html +2 -2
  5. package/dist/documentation/v2/v2-ListReportNew.html +2 -2
  6. package/dist/documentation/v2/v2-ObjectPage.html +2 -2
  7. package/dist/documentation/v2/v2-OverviewPage.html +2 -2
  8. package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
  9. package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
  10. package/dist/documentation/v4/v4-FreestylePage.html +2 -2
  11. package/dist/documentation/v4/v4-ListReport.html +2 -2
  12. package/dist/documentation/v4/v4-ObjectPage.html +2 -2
  13. package/dist/index-min.js +247 -247
  14. package/dist/index-min.js.map +4 -4
  15. package/dist/schemas/v2/ApplicationV2.json +18 -9
  16. package/dist/schemas/v2/ListReportNewConfig.json +170 -0
  17. package/dist/schemas/v4/ApplicationV4.json +32 -16
  18. package/dist/schemas/v4/BuildingBlocksConfig.json +196 -588
  19. package/dist/schemas/v4/ListReportConfig.json +0 -41
  20. package/dist/specification/package.json +10 -9
  21. package/dist/specification/scripts/macros/schema.d.ts +7 -0
  22. package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
  23. package/dist/specification/scripts/macros/schema.js +61 -14
  24. package/dist/specification/scripts/macros/schema.js.map +1 -1
  25. package/dist/specification/scripts/macros/types.d.ts +1 -0
  26. package/dist/specification/scripts/macros/types.d.ts.map +1 -1
  27. package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
  28. package/dist/specification/scripts/schema/to-json-schema.js +54 -8
  29. package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
  30. package/dist/specification/src/api.js +2 -2
  31. package/dist/specification/src/ftfs/ftfs.d.ts +1 -1
  32. package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
  33. package/dist/specification/src/ftfs/ftfs.js +38 -5
  34. package/dist/specification/src/ftfs/ftfs.js.map +1 -1
  35. package/dist/specification/src/ftfs/parser/annotations.d.ts +9 -0
  36. package/dist/specification/src/ftfs/parser/annotations.d.ts.map +1 -0
  37. package/dist/specification/src/ftfs/parser/annotations.js +13 -0
  38. package/dist/specification/src/ftfs/parser/annotations.js.map +1 -0
  39. package/dist/specification/src/ftfs/parser/index.d.ts +15 -0
  40. package/dist/specification/src/ftfs/parser/index.d.ts.map +1 -0
  41. package/dist/specification/src/ftfs/parser/index.js +35 -0
  42. package/dist/specification/src/ftfs/parser/index.js.map +1 -0
  43. package/dist/specification/src/ftfs/parser/model/AggregationValidator.d.ts +65 -0
  44. package/dist/specification/src/ftfs/parser/model/AggregationValidator.d.ts.map +1 -0
  45. package/dist/specification/src/ftfs/parser/model/AggregationValidator.js +209 -0
  46. package/dist/specification/src/ftfs/parser/model/AggregationValidator.js.map +1 -0
  47. package/dist/specification/src/ftfs/parser/model/ArrayAggregation.d.ts +49 -0
  48. package/dist/specification/src/ftfs/parser/model/ArrayAggregation.d.ts.map +1 -0
  49. package/dist/specification/src/ftfs/parser/model/ArrayAggregation.js +122 -0
  50. package/dist/specification/src/ftfs/parser/model/ArrayAggregation.js.map +1 -0
  51. package/dist/specification/src/ftfs/parser/model/NodeProperty.d.ts +38 -0
  52. package/dist/specification/src/ftfs/parser/model/NodeProperty.d.ts.map +1 -0
  53. package/dist/specification/src/ftfs/parser/model/NodeProperty.js +25 -0
  54. package/dist/specification/src/ftfs/parser/model/NodeProperty.js.map +1 -0
  55. package/dist/specification/src/ftfs/parser/model/ObjectAggregation.d.ts +339 -0
  56. package/dist/specification/src/ftfs/parser/model/ObjectAggregation.d.ts.map +1 -0
  57. package/dist/specification/src/ftfs/parser/model/ObjectAggregation.js +682 -0
  58. package/dist/specification/src/ftfs/parser/model/ObjectAggregation.js.map +1 -0
  59. package/dist/specification/src/ftfs/parser/model/RootAggregation.d.ts +24 -0
  60. package/dist/specification/src/ftfs/parser/model/RootAggregation.d.ts.map +1 -0
  61. package/dist/specification/src/ftfs/parser/model/RootAggregation.js +57 -0
  62. package/dist/specification/src/ftfs/parser/model/RootAggregation.js.map +1 -0
  63. package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts +224 -0
  64. package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -0
  65. package/dist/specification/src/ftfs/parser/model/TreeModel.js +947 -0
  66. package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -0
  67. package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.d.ts +34 -0
  68. package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.d.ts.map +1 -0
  69. package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.js +94 -0
  70. package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.js.map +1 -0
  71. package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.d.ts +67 -0
  72. package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.d.ts.map +1 -0
  73. package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.js +113 -0
  74. package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.js.map +1 -0
  75. package/dist/specification/src/ftfs/parser/model/actions/index.d.ts +3 -0
  76. package/dist/specification/src/ftfs/parser/model/actions/index.d.ts.map +1 -0
  77. package/dist/specification/src/ftfs/parser/model/actions/index.js +19 -0
  78. package/dist/specification/src/ftfs/parser/model/actions/index.js.map +1 -0
  79. package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectAggregation.d.ts +17 -0
  80. package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectAggregation.d.ts.map +1 -0
  81. package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectAggregation.js +29 -0
  82. package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectAggregation.js.map +1 -0
  83. package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectsAggregation.d.ts +46 -0
  84. package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectsAggregation.d.ts.map +1 -0
  85. package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectsAggregation.js +66 -0
  86. package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectsAggregation.js.map +1 -0
  87. package/dist/specification/src/ftfs/parser/model/additionalObjects/index.d.ts +3 -0
  88. package/dist/specification/src/ftfs/parser/model/additionalObjects/index.d.ts.map +1 -0
  89. package/dist/specification/src/ftfs/parser/model/additionalObjects/index.js +19 -0
  90. package/dist/specification/src/ftfs/parser/model/additionalObjects/index.js.map +1 -0
  91. package/dist/specification/src/ftfs/parser/model/chart/ChartAggregation.d.ts +21 -0
  92. package/dist/specification/src/ftfs/parser/model/chart/ChartAggregation.d.ts.map +1 -0
  93. package/dist/specification/src/ftfs/parser/model/chart/ChartAggregation.js +30 -0
  94. package/dist/specification/src/ftfs/parser/model/chart/ChartAggregation.js.map +1 -0
  95. package/dist/specification/src/ftfs/parser/model/chart/index.d.ts +2 -0
  96. package/dist/specification/src/ftfs/parser/model/chart/index.d.ts.map +1 -0
  97. package/dist/specification/src/ftfs/parser/model/chart/index.js +18 -0
  98. package/dist/specification/src/ftfs/parser/model/chart/index.js.map +1 -0
  99. package/dist/specification/src/ftfs/parser/model/fields/ConnectedFieldsAggregation.d.ts +9 -0
  100. package/dist/specification/src/ftfs/parser/model/fields/ConnectedFieldsAggregation.d.ts.map +1 -0
  101. package/dist/specification/src/ftfs/parser/model/fields/ConnectedFieldsAggregation.js +16 -0
  102. package/dist/specification/src/ftfs/parser/model/fields/ConnectedFieldsAggregation.js.map +1 -0
  103. package/dist/specification/src/ftfs/parser/model/fields/FieldAggregation.d.ts +25 -0
  104. package/dist/specification/src/ftfs/parser/model/fields/FieldAggregation.d.ts.map +1 -0
  105. package/dist/specification/src/ftfs/parser/model/fields/FieldAggregation.js +45 -0
  106. package/dist/specification/src/ftfs/parser/model/fields/FieldAggregation.js.map +1 -0
  107. package/dist/specification/src/ftfs/parser/model/fields/FieldsAggregation.d.ts +22 -0
  108. package/dist/specification/src/ftfs/parser/model/fields/FieldsAggregation.d.ts.map +1 -0
  109. package/dist/specification/src/ftfs/parser/model/fields/FieldsAggregation.js +37 -0
  110. package/dist/specification/src/ftfs/parser/model/fields/FieldsAggregation.js.map +1 -0
  111. package/dist/specification/src/ftfs/parser/model/fields/index.d.ts +4 -0
  112. package/dist/specification/src/ftfs/parser/model/fields/index.d.ts.map +1 -0
  113. package/dist/specification/src/ftfs/parser/model/fields/index.js +20 -0
  114. package/dist/specification/src/ftfs/parser/model/fields/index.js.map +1 -0
  115. package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldAggregation.d.ts +39 -0
  116. package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldAggregation.d.ts.map +1 -0
  117. package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldAggregation.js +97 -0
  118. package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldAggregation.js.map +1 -0
  119. package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldsAggregation.d.ts +36 -0
  120. package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldsAggregation.d.ts.map +1 -0
  121. package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldsAggregation.js +59 -0
  122. package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldsAggregation.js.map +1 -0
  123. package/dist/specification/src/ftfs/parser/model/filter-fields/index.d.ts +3 -0
  124. package/dist/specification/src/ftfs/parser/model/filter-fields/index.d.ts.map +1 -0
  125. package/dist/specification/src/ftfs/parser/model/filter-fields/index.js +19 -0
  126. package/dist/specification/src/ftfs/parser/model/filter-fields/index.js.map +1 -0
  127. package/dist/specification/src/ftfs/parser/model/index.d.ts +19 -0
  128. package/dist/specification/src/ftfs/parser/model/index.d.ts.map +1 -0
  129. package/dist/specification/src/ftfs/parser/model/index.js +35 -0
  130. package/dist/specification/src/ftfs/parser/model/index.js.map +1 -0
  131. package/dist/specification/src/ftfs/parser/model/macros/MacrosRoot.d.ts +29 -0
  132. package/dist/specification/src/ftfs/parser/model/macros/MacrosRoot.d.ts.map +1 -0
  133. package/dist/specification/src/ftfs/parser/model/macros/MacrosRoot.js +50 -0
  134. package/dist/specification/src/ftfs/parser/model/macros/MacrosRoot.js.map +1 -0
  135. package/dist/specification/src/ftfs/parser/model/macros/index.d.ts +2 -0
  136. package/dist/specification/src/ftfs/parser/model/macros/index.d.ts.map +1 -0
  137. package/dist/specification/src/ftfs/parser/model/macros/index.js +18 -0
  138. package/dist/specification/src/ftfs/parser/model/macros/index.js.map +1 -0
  139. package/dist/specification/src/ftfs/parser/model/sections/HeaderSectionsAggregation.d.ts +31 -0
  140. package/dist/specification/src/ftfs/parser/model/sections/HeaderSectionsAggregation.d.ts.map +1 -0
  141. package/dist/specification/src/ftfs/parser/model/sections/HeaderSectionsAggregation.js +82 -0
  142. package/dist/specification/src/ftfs/parser/model/sections/HeaderSectionsAggregation.js.map +1 -0
  143. package/dist/specification/src/ftfs/parser/model/sections/SectionAggregation.d.ts +78 -0
  144. package/dist/specification/src/ftfs/parser/model/sections/SectionAggregation.d.ts.map +1 -0
  145. package/dist/specification/src/ftfs/parser/model/sections/SectionAggregation.js +126 -0
  146. package/dist/specification/src/ftfs/parser/model/sections/SectionAggregation.js.map +1 -0
  147. package/dist/specification/src/ftfs/parser/model/sections/SectionsAggregation.d.ts +135 -0
  148. package/dist/specification/src/ftfs/parser/model/sections/SectionsAggregation.d.ts.map +1 -0
  149. package/dist/specification/src/ftfs/parser/model/sections/SectionsAggregation.js +402 -0
  150. package/dist/specification/src/ftfs/parser/model/sections/SectionsAggregation.js.map +1 -0
  151. package/dist/specification/src/ftfs/parser/model/sections/SectionsObjectAggregation.d.ts +50 -0
  152. package/dist/specification/src/ftfs/parser/model/sections/SectionsObjectAggregation.d.ts.map +1 -0
  153. package/dist/specification/src/ftfs/parser/model/sections/SectionsObjectAggregation.js +120 -0
  154. package/dist/specification/src/ftfs/parser/model/sections/SectionsObjectAggregation.js.map +1 -0
  155. package/dist/specification/src/ftfs/parser/model/sections/SubSectionsAggregation.d.ts +39 -0
  156. package/dist/specification/src/ftfs/parser/model/sections/SubSectionsAggregation.d.ts.map +1 -0
  157. package/dist/specification/src/ftfs/parser/model/sections/SubSectionsAggregation.js +70 -0
  158. package/dist/specification/src/ftfs/parser/model/sections/SubSectionsAggregation.js.map +1 -0
  159. package/dist/specification/src/ftfs/parser/model/sections/index.d.ts +6 -0
  160. package/dist/specification/src/ftfs/parser/model/sections/index.d.ts.map +1 -0
  161. package/dist/specification/src/ftfs/parser/model/sections/index.js +22 -0
  162. package/dist/specification/src/ftfs/parser/model/sections/index.js.map +1 -0
  163. package/dist/specification/src/ftfs/parser/model/table/ColumnAggregation.d.ts +89 -0
  164. package/dist/specification/src/ftfs/parser/model/table/ColumnAggregation.d.ts.map +1 -0
  165. package/dist/specification/src/ftfs/parser/model/table/ColumnAggregation.js +175 -0
  166. package/dist/specification/src/ftfs/parser/model/table/ColumnAggregation.js.map +1 -0
  167. package/dist/specification/src/ftfs/parser/model/table/ColumnsAggregation.d.ts +113 -0
  168. package/dist/specification/src/ftfs/parser/model/table/ColumnsAggregation.d.ts.map +1 -0
  169. package/dist/specification/src/ftfs/parser/model/table/ColumnsAggregation.js +290 -0
  170. package/dist/specification/src/ftfs/parser/model/table/ColumnsAggregation.js.map +1 -0
  171. package/dist/specification/src/ftfs/parser/model/table/TableAggregation.d.ts +13 -0
  172. package/dist/specification/src/ftfs/parser/model/table/TableAggregation.d.ts.map +1 -0
  173. package/dist/specification/src/ftfs/parser/model/table/TableAggregation.js +21 -0
  174. package/dist/specification/src/ftfs/parser/model/table/TableAggregation.js.map +1 -0
  175. package/dist/specification/src/ftfs/parser/model/table/ToolbarAggregation.d.ts +15 -0
  176. package/dist/specification/src/ftfs/parser/model/table/ToolbarAggregation.d.ts.map +1 -0
  177. package/dist/specification/src/ftfs/parser/model/table/ToolbarAggregation.js +22 -0
  178. package/dist/specification/src/ftfs/parser/model/table/ToolbarAggregation.js.map +1 -0
  179. package/dist/specification/src/ftfs/parser/model/table/index.d.ts +5 -0
  180. package/dist/specification/src/ftfs/parser/model/table/index.d.ts.map +1 -0
  181. package/dist/specification/src/ftfs/parser/model/table/index.js +21 -0
  182. package/dist/specification/src/ftfs/parser/model/table/index.js.map +1 -0
  183. package/dist/specification/src/ftfs/parser/model/table/utils.d.ts +12 -0
  184. package/dist/specification/src/ftfs/parser/model/table/utils.d.ts.map +1 -0
  185. package/dist/specification/src/ftfs/parser/model/table/utils.js +44 -0
  186. package/dist/specification/src/ftfs/parser/model/table/utils.js.map +1 -0
  187. package/dist/specification/src/ftfs/parser/model/types/annotations.d.ts +63 -0
  188. package/dist/specification/src/ftfs/parser/model/types/annotations.d.ts.map +1 -0
  189. package/dist/specification/src/ftfs/parser/model/types/annotations.js +29 -0
  190. package/dist/specification/src/ftfs/parser/model/types/annotations.js.map +1 -0
  191. package/dist/specification/src/ftfs/parser/model/types/common.d.ts +13 -0
  192. package/dist/specification/src/ftfs/parser/model/types/common.d.ts.map +1 -0
  193. package/dist/specification/src/ftfs/parser/model/types/common.js +3 -0
  194. package/dist/specification/src/ftfs/parser/model/types/common.js.map +1 -0
  195. package/dist/specification/src/ftfs/parser/model/types/index.d.ts +219 -0
  196. package/dist/specification/src/ftfs/parser/model/types/index.d.ts.map +1 -0
  197. package/dist/specification/src/ftfs/parser/model/types/index.js +156 -0
  198. package/dist/specification/src/ftfs/parser/model/types/index.js.map +1 -0
  199. package/dist/specification/src/ftfs/parser/model/utils/annotations.d.ts +38 -0
  200. package/dist/specification/src/ftfs/parser/model/utils/annotations.d.ts.map +1 -0
  201. package/dist/specification/src/ftfs/parser/model/utils/annotations.js +120 -0
  202. package/dist/specification/src/ftfs/parser/model/utils/annotations.js.map +1 -0
  203. package/dist/specification/src/ftfs/parser/model/utils/i18n.d.ts +33 -0
  204. package/dist/specification/src/ftfs/parser/model/utils/i18n.d.ts.map +1 -0
  205. package/dist/specification/src/ftfs/parser/model/utils/i18n.js +69 -0
  206. package/dist/specification/src/ftfs/parser/model/utils/i18n.js.map +1 -0
  207. package/dist/specification/src/ftfs/parser/model/utils/index.d.ts +6 -0
  208. package/dist/specification/src/ftfs/parser/model/utils/index.d.ts.map +1 -0
  209. package/dist/specification/src/ftfs/parser/model/utils/index.js +22 -0
  210. package/dist/specification/src/ftfs/parser/model/utils/index.js.map +1 -0
  211. package/dist/specification/src/ftfs/parser/model/utils/object.d.ts +25 -0
  212. package/dist/specification/src/ftfs/parser/model/utils/object.d.ts.map +1 -0
  213. package/dist/specification/src/ftfs/parser/model/utils/object.js +68 -0
  214. package/dist/specification/src/ftfs/parser/model/utils/object.js.map +1 -0
  215. package/dist/specification/src/ftfs/parser/model/utils/sort.d.ts +31 -0
  216. package/dist/specification/src/ftfs/parser/model/utils/sort.d.ts.map +1 -0
  217. package/dist/specification/src/ftfs/parser/model/utils/sort.js +18 -0
  218. package/dist/specification/src/ftfs/parser/model/utils/sort.js.map +1 -0
  219. package/dist/specification/src/ftfs/parser/model/utils/utils.d.ts +95 -0
  220. package/dist/specification/src/ftfs/parser/model/utils/utils.d.ts.map +1 -0
  221. package/dist/specification/src/ftfs/parser/model/utils/utils.js +267 -0
  222. package/dist/specification/src/ftfs/parser/model/utils/utils.js.map +1 -0
  223. package/dist/specification/src/ftfs/parser/model/views/ViewAggregation.d.ts +62 -0
  224. package/dist/specification/src/ftfs/parser/model/views/ViewAggregation.d.ts.map +1 -0
  225. package/dist/specification/src/ftfs/parser/model/views/ViewAggregation.js +111 -0
  226. package/dist/specification/src/ftfs/parser/model/views/ViewAggregation.js.map +1 -0
  227. package/dist/specification/src/ftfs/parser/model/views/ViewsAggregation.d.ts +54 -0
  228. package/dist/specification/src/ftfs/parser/model/views/ViewsAggregation.d.ts.map +1 -0
  229. package/dist/specification/src/ftfs/parser/model/views/ViewsAggregation.js +144 -0
  230. package/dist/specification/src/ftfs/parser/model/views/ViewsAggregation.js.map +1 -0
  231. package/dist/specification/src/ftfs/parser/model/views/index.d.ts +3 -0
  232. package/dist/specification/src/ftfs/parser/model/views/index.d.ts.map +1 -0
  233. package/dist/specification/src/ftfs/parser/model/views/index.js +19 -0
  234. package/dist/specification/src/ftfs/parser/model/views/index.js.map +1 -0
  235. package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFilterAggregation.d.ts +11 -0
  236. package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFilterAggregation.d.ts.map +1 -0
  237. package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFilterAggregation.js +18 -0
  238. package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFilterAggregation.js.map +1 -0
  239. package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFiltersAggregation.d.ts +11 -0
  240. package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFiltersAggregation.d.ts.map +1 -0
  241. package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFiltersAggregation.js +18 -0
  242. package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFiltersAggregation.js.map +1 -0
  243. package/dist/specification/src/ftfs/parser/model/visual-filters/index.d.ts +3 -0
  244. package/dist/specification/src/ftfs/parser/model/visual-filters/index.d.ts.map +1 -0
  245. package/dist/specification/src/ftfs/parser/model/visual-filters/index.js +19 -0
  246. package/dist/specification/src/ftfs/parser/model/visual-filters/index.js.map +1 -0
  247. package/dist/specification/src/sync/common/dist_tag.json +9 -5
  248. package/dist/specification/src/sync/common/i18n.json +11 -5
  249. package/dist/specification/src/sync/common/utils.d.ts +25 -0
  250. package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
  251. package/dist/specification/src/sync/common/utils.js +55 -0
  252. package/dist/specification/src/sync/common/utils.js.map +1 -1
  253. package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
  254. package/dist/specification/src/sync/v2/export/exportPageGeneric.js +1 -10
  255. package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
  256. package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
  257. package/dist/specification/src/sync/v2/generate/listReport.js +1 -92
  258. package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
  259. package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts +1 -2
  260. package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts.map +1 -1
  261. package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts +1 -1
  262. package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
  263. package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +6 -18
  264. package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
  265. package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts +48 -0
  266. package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts.map +1 -0
  267. package/dist/specification/src/sync/v2/generate/stableIdUtils.js +180 -0
  268. package/dist/specification/src/sync/v2/generate/stableIdUtils.js.map +1 -0
  269. package/dist/specification/src/sync/v2/generate/utils.d.ts +63 -3
  270. package/dist/specification/src/sync/v2/generate/utils.d.ts.map +1 -1
  271. package/dist/specification/src/sync/v2/generate/utils.js +191 -7
  272. package/dist/specification/src/sync/v2/generate/utils.js.map +1 -1
  273. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Action.d.ts +59 -0
  274. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Action.d.ts.map +1 -1
  275. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Action.js +193 -4
  276. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Action.js.map +1 -1
  277. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +3 -2
  278. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js.map +1 -1
  279. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.d.ts +78 -0
  280. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.d.ts.map +1 -0
  281. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +454 -0
  282. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -0
  283. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +54 -0
  284. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -0
  285. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +148 -0
  286. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -0
  287. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +2 -0
  288. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
  289. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +2 -0
  290. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
  291. package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts +10 -0
  292. package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts.map +1 -1
  293. package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js +90 -7
  294. package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js.map +1 -1
  295. package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
  296. package/dist/specification/src/sync/v2/import/pages/overviewPage.js +28 -13
  297. package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
  298. package/dist/specification/src/sync/v2/utils.d.ts +7 -0
  299. package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
  300. package/dist/specification/src/sync/v2/utils.js +10 -0
  301. package/dist/specification/src/sync/v2/utils.js.map +1 -1
  302. package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
  303. package/dist/specification/src/sync/v4/export/controls/Table.js +20 -23
  304. package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
  305. package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
  306. package/dist/specification/src/sync/v4/export/fpmCustomPage.js +13 -3
  307. package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
  308. package/dist/specification/src/sync/v4/export/manifest.js +1 -1
  309. package/dist/specification/src/sync/v4/export/manifest.js.map +1 -1
  310. package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
  311. package/dist/specification/src/sync/v4/generate/listReport.js +64 -0
  312. package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
  313. package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  314. package/dist/specification/src/sync/v4/generate/objectPage.js +51 -4
  315. package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
  316. package/dist/specification/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
  317. package/dist/specification/src/sync/v4/import/app/appProvider.js +3 -0
  318. package/dist/specification/src/sync/v4/import/app/appProvider.js.map +1 -1
  319. package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
  320. package/dist/specification/src/sync/v4/import/pages/listReport.js +3 -1
  321. package/dist/specification/src/sync/v4/import/pages/listReport.js.map +1 -1
  322. package/dist/specification/src/sync/v4/utils/utils.d.ts +33 -0
  323. package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
  324. package/dist/specification/src/sync/v4/utils/utils.js +95 -0
  325. package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
  326. package/dist/types/src/apiTypes.d.ts +22 -0
  327. package/dist/types/src/apiTypes.d.ts.map +1 -1
  328. package/dist/types/src/apiTypes.js.map +1 -1
  329. package/dist/types/src/common/types.d.ts +1 -0
  330. package/dist/types/src/common/types.d.ts.map +1 -1
  331. package/dist/types/src/common/types.js.map +1 -1
  332. package/dist/types/src/index.d.ts +1 -0
  333. package/dist/types/src/index.d.ts.map +1 -1
  334. package/dist/types/src/index.js +2 -1
  335. package/dist/types/src/index.js.map +1 -1
  336. package/dist/types/src/parser/application.d.ts +22 -0
  337. package/dist/types/src/parser/application.d.ts.map +1 -0
  338. package/dist/types/src/parser/application.js +3 -0
  339. package/dist/types/src/parser/application.js.map +1 -0
  340. package/dist/types/src/parser/index.d.ts +3 -0
  341. package/dist/types/src/parser/index.d.ts.map +1 -0
  342. package/dist/types/src/parser/index.js +18 -0
  343. package/dist/types/src/parser/index.js.map +1 -0
  344. package/dist/types/src/parser/model.d.ts +17 -0
  345. package/dist/types/src/parser/model.d.ts.map +1 -0
  346. package/dist/types/src/parser/model.js +3 -0
  347. package/dist/types/src/parser/model.js.map +1 -0
  348. package/dist/types/src/v4/controls/Table.d.ts +0 -5
  349. package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
  350. package/package.json +10 -9
  351. package/dist/specification/src/ftfs/annotations.d.ts +0 -12
  352. package/dist/specification/src/ftfs/annotations.d.ts.map +0 -1
  353. package/dist/specification/src/ftfs/annotations.js +0 -50
  354. package/dist/specification/src/ftfs/annotations.js.map +0 -1
@@ -0,0 +1,947 @@
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.TreeModel = void 0;
7
+ const node_path_1 = require("node:path");
8
+ const ux_specification_types_1 = require("@sap/ux-specification-types");
9
+ const ObjectAggregation_1 = require("./ObjectAggregation");
10
+ const SectionsAggregation_1 = require("./sections/SectionsAggregation");
11
+ const table_1 = require("./table");
12
+ const ArrayAggregation_1 = require("./ArrayAggregation");
13
+ const AggregationValidator_1 = require("./AggregationValidator");
14
+ const types_1 = require("./types");
15
+ const fields_1 = require("./fields");
16
+ const utils_1 = require("./utils");
17
+ const actions_1 = require("./actions");
18
+ const i18next_1 = __importDefault(require("i18next"));
19
+ const filter_fields_1 = require("./filter-fields");
20
+ const visual_filters_1 = require("./visual-filters");
21
+ const sections_1 = require("./sections");
22
+ const ToolbarAggregation_1 = require("./table/ToolbarAggregation");
23
+ const RootAggregation_1 = require("./RootAggregation");
24
+ const ChartAggregation_1 = require("./chart/ChartAggregation");
25
+ const views_1 = require("./views");
26
+ const MacrosRoot_1 = require("./macros/MacrosRoot");
27
+ const additionalObjects_1 = require("./additionalObjects");
28
+ const SectionsObjectAggregation_1 = require("./sections/SectionsObjectAggregation");
29
+ const annotations_1 = require("../annotations");
30
+ const JSON_SCHEMA_TYPE_ARRAY = 'array';
31
+ const JSON_SCHEMA_TYPE_OBJECT = 'object';
32
+ const MACROS_TABLE_DEFINITION_NAME = 'sap.fe.macros.Table';
33
+ const TABLE_PATHS = [
34
+ ['table', 'quickVariantSelection', 'variants'],
35
+ ['table', 'quickVariantSelectionX', 'variants']
36
+ ];
37
+ const isTableNode = (name, path, parentAggregation) => {
38
+ let parent = parentAggregation;
39
+ const loops = name.split('/').length - 1;
40
+ let i = 0;
41
+ while (i < loops) {
42
+ parent = parent?.parent;
43
+ i++;
44
+ }
45
+ return path.endsWith(`table/${name}`) || (parent instanceof views_1.ViewAggregation && path.endsWith(`/${name}`));
46
+ };
47
+ const isCustomSectionAction = (path, parentAggregation, schema) => {
48
+ const additionalProperties = schema?.additionalProperties;
49
+ const hasCustomSectionActionRef = additionalProperties?.$ref?.includes('CustomSectionActionOP');
50
+ return (!!hasCustomSectionActionRef && !!parentAggregation?.name && path.endsWith(`${parentAggregation.name}/actions`));
51
+ };
52
+ /**
53
+ * Method checks if passed aggregation instance of passed macros control name.
54
+ *
55
+ * @param controlName SAPUI5 macros control name.
56
+ * @param aggregation Aggregation object.
57
+ * @returns Is passed aggregation instance of passed SAPUI5 control.
58
+ */
59
+ const isInstanceOfUI5Control = (controlName, aggregation) => {
60
+ return aggregation?.schema?.metadata?.controlName === controlName;
61
+ };
62
+ /**
63
+ * Method checks if passed schema is instance of passed macros control name.
64
+ *
65
+ * @param controlName SAPUI5 macros control name.
66
+ * @param schema Schema node to check.
67
+ * @returns Is passed aggregation instance of passed SAPUI5 control.
68
+ */
69
+ const isSchemaOfUI5Control = (controlName, schema) => {
70
+ return schema?.metadata?.controlName === controlName;
71
+ };
72
+ const isSupportedUI5Aggregation = (controlName, schema) => {
73
+ const additionalProperties = schema?.additionalProperties;
74
+ return (schema?.metadata?.type === 'Aggregation' &&
75
+ typeof additionalProperties === 'object' &&
76
+ additionalProperties.$ref === `#/definitions/${controlName}`);
77
+ };
78
+ // Array of type specific aggregation resolution depending on path and context
79
+ const AGGREGATIONS_CONDITIONS = [
80
+ {
81
+ aggregation: SectionsObjectAggregation_1.SectionsObjectAggregation,
82
+ fn: (path, parentAggregation, schema) => {
83
+ const additionalProperties = schema?.additionalProperties;
84
+ const hasCustomSectionsRef = additionalProperties?.$ref?.includes('ObjectPageCustomSectionFragment');
85
+ return path === 'sections' && !!hasCustomSectionsRef;
86
+ }
87
+ },
88
+ {
89
+ aggregation: SectionsAggregation_1.SectionsAggregation,
90
+ fn: (path) => path === 'sections'
91
+ },
92
+ {
93
+ aggregation: table_1.ColumnsAggregation,
94
+ fn: (path, parentAggregation, schema) => isTableNode('columns', path, parentAggregation) ||
95
+ (isSupportedUI5Aggregation('sap.fe.macros.table.Column', schema) &&
96
+ isInstanceOfUI5Control(MACROS_TABLE_DEFINITION_NAME, parentAggregation))
97
+ },
98
+ {
99
+ aggregation: ToolbarAggregation_1.ToolbarAggregation,
100
+ fn: (path, parentAggregation) => isTableNode('toolBar', path, parentAggregation)
101
+ },
102
+ {
103
+ aggregation: fields_1.FieldsAggregation,
104
+ fn: (path) => path.endsWith('form/fields')
105
+ },
106
+ {
107
+ aggregation: additionalObjects_1.AdditionalObjectsAggregation,
108
+ fn: (path) => path.endsWith('actions/RelatedApps/additionalSemanticObjects')
109
+ },
110
+ {
111
+ aggregation: fields_1.ConnectedFieldsAggregation,
112
+ fn: (path, parentAggregation, schema) => schema?.dataType === 'ConnectedFields'
113
+ },
114
+ {
115
+ aggregation: actions_1.ActionsAggregation,
116
+ fn: (path, parentAggregation, schema) => isCustomSectionAction(path, parentAggregation, schema) ||
117
+ ['form/actions', 'header/actions', 'footer/actions'].some((entry) => path.endsWith(entry)) ||
118
+ isTableNode('toolBar/actions', path, parentAggregation) ||
119
+ (isSupportedUI5Aggregation('sap.fe.macros.table.Action', schema) &&
120
+ isInstanceOfUI5Control(MACROS_TABLE_DEFINITION_NAME, parentAggregation))
121
+ },
122
+ {
123
+ aggregation: filter_fields_1.FilterFieldsAggregation,
124
+ fn: (path, parentAggregation) => path.endsWith('filterBar/selectionFields') ||
125
+ (path.endsWith('/filterFields') && isInstanceOfUI5Control('sap.fe.macros.FilterBar', parentAggregation))
126
+ },
127
+ {
128
+ aggregation: visual_filters_1.VisualFiltersAggregation,
129
+ fn: (path) => path.endsWith('filterBar/visualFilters')
130
+ },
131
+ {
132
+ aggregation: table_1.TableAggregation,
133
+ fn: (path, parentAggregation, schema) => path === 'table' ||
134
+ (path.endsWith('/table') && parentAggregation instanceof sections_1.SectionAggregation) ||
135
+ isSchemaOfUI5Control(MACROS_TABLE_DEFINITION_NAME, schema)
136
+ },
137
+ {
138
+ aggregation: sections_1.HeaderSectionsAggregation,
139
+ fn: (path) => path.endsWith('header/sections')
140
+ },
141
+ {
142
+ aggregation: RootAggregation_1.RootAggregation,
143
+ fn: (path) => path === ''
144
+ },
145
+ {
146
+ aggregation: ChartAggregation_1.ChartAggregation,
147
+ fn: (path) => path === 'chart'
148
+ },
149
+ {
150
+ aggregation: views_1.ViewsAggregation,
151
+ fn: (path) => path.endsWith('table/views')
152
+ },
153
+ {
154
+ aggregation: sections_1.SubSectionsAggregation,
155
+ fn: (path, parentAggregation) => path.endsWith('/subsections') && parentAggregation instanceof sections_1.SectionAggregation
156
+ }
157
+ ];
158
+ // Schema properties which should be taken from deeper level as priority
159
+ // It is for case when one node have multiple $ref levels and multiple same 'property' keys persists,
160
+ // then default behavior is that most top properties have higher priority, but for some cases we need take it from deeper level.
161
+ const SCHEMA_DEEP_LEVEL_PROPS = ['annotationPath'];
162
+ /**
163
+ * Page/application schema parsing model.
164
+ * `TreeModel` is responsible for:
165
+ * - Holding metadata about a page (type, schema, annotations, etc.).
166
+ * - Storing both current (`data`) and original (`originalData`) page definitions.
167
+ * - Managing the root aggregation tree (`root`) for further parsing and validation.
168
+ * - Supporting schema traversal, validation, and exclusion rules.
169
+ */
170
+ class TreeModel {
171
+ /**
172
+ * Creates an instance of TreeModel.
173
+ *
174
+ * @param name Page name.
175
+ * @param page Page configuration object(generated from specification).
176
+ * @param schema Page configuration schema(generated from specification).
177
+ * @param annotations Page annotations.
178
+ * @param pageType Page type.
179
+ */
180
+ constructor(name, page, schema, annotations, pageType) {
181
+ this.root = this.prepareAggregation();
182
+ // Definitions - used to look up when going through recursion
183
+ this.definitions = {};
184
+ // List of properties to exclude from traversing
185
+ this.excludeProperties = ['$schema'];
186
+ this.validator = new AggregationValidator_1.AggregationValidator();
187
+ this.pendingNodes = [];
188
+ // Separated and ordered schema parse methods
189
+ this.schemaParsers = [
190
+ // Prehandle schema - check for "const" property and create "enum" if it is missing in schema
191
+ (params) => {
192
+ // Apply single enum in case if there is "const" defined - it should enable handling for dropdown/combobox
193
+ if (params.currentNode.const && !params.currentNode.enum) {
194
+ params.currentNode.enum = [params.currentNode.const];
195
+ }
196
+ return true;
197
+ },
198
+ // Validate schema node
199
+ (params) => {
200
+ const { currentNode } = params;
201
+ if (currentNode.hidden) {
202
+ return false;
203
+ }
204
+ return true;
205
+ },
206
+ // Create property or aggregation objects
207
+ (params) => {
208
+ const { currentNode, name } = params;
209
+ if (name === undefined) {
210
+ // Aggregation or property should not be created but continue parse schema
211
+ return true;
212
+ }
213
+ if (this.isAggregation(currentNode)) {
214
+ params.path = params.path.concat([
215
+ params.aggregation.type === types_1.AggregationType.Array ? Number.parseInt(name, 10) : name
216
+ ]);
217
+ const displayName = currentNode.displayName || name;
218
+ const type = currentNode.type === JSON_SCHEMA_TYPE_OBJECT ? types_1.AggregationType.Object : types_1.AggregationType.Array;
219
+ params.aggregation = params.aggregation.addAggregation(displayName, params.aggregation.aggregations[displayName] ||
220
+ this.prepareAggregation(params.path, currentNode, params.aggregation, type), params.path);
221
+ if (params.aggregation.type === types_1.AggregationType.Array) {
222
+ // Creation form schema data
223
+ params.aggregation.schema = currentNode;
224
+ this.updateFormSchema(params.aggregation);
225
+ this.copySchemaProperties(params.aggregation, currentNode, name);
226
+ // Do not continue parsing - arrays will be handled when data will be presented
227
+ return false;
228
+ }
229
+ }
230
+ else if (this.isProperty(currentNode)) {
231
+ this.updatePropertyFromSchema(name, params.aggregation, currentNode);
232
+ }
233
+ return true;
234
+ },
235
+ // Add annotation node if one exists
236
+ (params) => {
237
+ const { aggregation, currentNode } = params;
238
+ let currentAnnotationNode = params.currentAnnotationNode;
239
+ if (aggregation instanceof MacrosRoot_1.MacrosRootAggregation) {
240
+ currentAnnotationNode = this.originalData.annotations.nodes.find((node) => {
241
+ return 'nodeType' in node && node.nodeType === 'macros';
242
+ });
243
+ aggregation.annotationNodeId = currentAnnotationNode?.nodeId;
244
+ }
245
+ if (currentNode.metadata?.internalId && !currentAnnotationNode) {
246
+ let availableNodes = this.originalData.annotations.nodes;
247
+ availableNodes = availableNodes.filter((node) => {
248
+ return 'nodeType' in node && node.nodeType === 'macros';
249
+ });
250
+ currentAnnotationNode = params.currentAnnotationNode = this.getContextForMacrosNode(currentNode.metadata.internalId, availableNodes);
251
+ }
252
+ // Add annotation if one exists
253
+ if (!currentNode.$ref && currentNode.annotationPath) {
254
+ // $ref nodes are processed later, so we need to skip them
255
+ let annotationNodes = [];
256
+ if (currentAnnotationNode && !(0, annotations_1.isTooComplex)(currentAnnotationNode)) {
257
+ annotationNodes = currentAnnotationNode.subnodes;
258
+ }
259
+ const matchedNode = (0, utils_1.getMatchingNode)(currentNode.annotationPath, this.originalData.annotations.nodes, annotationNodes, currentAnnotationNode?.annotationPath, aggregation.order);
260
+ if (matchedNode) {
261
+ params.currentAnnotationNode = matchedNode;
262
+ aggregation.annotationNodeId = matchedNode.nodeId;
263
+ }
264
+ }
265
+ return true;
266
+ },
267
+ // Handle schema references with recursion
268
+ (params) => {
269
+ for (const entry of Array.from(this.schemaReferenceParsers)) {
270
+ if (entry[1](params)) {
271
+ break;
272
+ }
273
+ }
274
+ return true;
275
+ },
276
+ // Handle some simple properties from schema definition - we need copy them as they can be defined in multiple places inside of schema object like:
277
+ (params) => {
278
+ const { aggregation, currentNode, name } = params;
279
+ this.copySchemaProperties(aggregation, currentNode, name);
280
+ return true;
281
+ },
282
+ // Handle additional properties
283
+ (params) => {
284
+ const { aggregation, currentNode, currentAnnotationNode, name, path, context } = params;
285
+ if (typeof currentNode.additionalProperties === 'object') {
286
+ // Probably there would be other cases
287
+ aggregation.additionalProperties = this.prepareAggregation();
288
+ this.parseSchema(aggregation.additionalProperties, currentNode.additionalProperties, currentAnnotationNode, name, path, context);
289
+ if (this.isSchemaAtomic(currentNode.additionalProperties)) {
290
+ this.updateFormSchema(aggregation, name);
291
+ }
292
+ }
293
+ return true;
294
+ },
295
+ // Handle "patternProperties"
296
+ (params) => {
297
+ const { aggregation, currentNode, currentAnnotationNode, name, path, context } = params;
298
+ if (typeof currentNode.patternProperties === 'object') {
299
+ // Adapted to current schema, but in thery it could be more complex scenario
300
+ aggregation.pattern = Object.keys(currentNode.patternProperties)[0];
301
+ currentNode.additionalProperties = currentNode.patternProperties[aggregation.pattern];
302
+ // Probably there would be other cases
303
+ aggregation.additionalProperties = this.prepareAggregation();
304
+ this.parseSchema(aggregation.additionalProperties, currentNode.patternProperties[aggregation.pattern], currentAnnotationNode, name, path, context);
305
+ // Creation form schema data
306
+ this.updateFormSchema(aggregation, name);
307
+ }
308
+ return true;
309
+ },
310
+ // Handle "required" properties
311
+ (params) => {
312
+ const { aggregation, currentNode } = params;
313
+ if (currentNode.required && Array.isArray(currentNode.required)) {
314
+ for (const name of currentNode.required) {
315
+ const property = aggregation.properties[name];
316
+ if (property) {
317
+ property.required = true;
318
+ }
319
+ }
320
+ }
321
+ return true;
322
+ },
323
+ // Handle union types
324
+ (params) => {
325
+ const { aggregation, currentNode, name } = params;
326
+ if (currentNode.displayName && name && currentNode.type === 'object') {
327
+ aggregation.addUnionName(currentNode.displayName, name);
328
+ }
329
+ return true;
330
+ },
331
+ // Handle "metadata" properties - currently used for building blocks
332
+ (params) => {
333
+ const { name = '', aggregation, currentNode, context } = params;
334
+ const { metadata } = currentNode;
335
+ const property = aggregation.properties[name];
336
+ if (context.filePath && metadata) {
337
+ const { position } = metadata;
338
+ const locations = [];
339
+ if (position) {
340
+ locations.push({
341
+ fileUri: (0, node_path_1.join)(ux_specification_types_1.DirName.Webapp, context.filePath),
342
+ range: {
343
+ start: {
344
+ line: position.startLine - 1,
345
+ character: position.startColumn - 1
346
+ },
347
+ end: {
348
+ line: position.endLine - 1,
349
+ character: position.endColumn
350
+ }
351
+ },
352
+ relative: true,
353
+ type: ux_specification_types_1.ArtifactType.XMLProperty
354
+ });
355
+ }
356
+ if (property) {
357
+ property.locations = locations;
358
+ }
359
+ else if (aggregation.name === name) {
360
+ aggregation.locations = locations;
361
+ }
362
+ }
363
+ return true;
364
+ },
365
+ // Handle addable tables
366
+ (params) => {
367
+ const { path, name = '', aggregation } = params;
368
+ if (path && TABLE_PATHS.some((targetPath) => (0, utils_1.isArrayEndsWith)(path, targetPath))) {
369
+ // Creation form schema data
370
+ this.updateFormSchema(aggregation, name);
371
+ }
372
+ return true;
373
+ }
374
+ ];
375
+ // Map to handle reference properties of single schema definition
376
+ // Currently supported - '$ref', 'anyOf', 'properties', 'items'
377
+ this.schemaReferenceParsers = new Map([
378
+ [
379
+ '$ref',
380
+ (params) => {
381
+ const { aggregation, currentNode, currentAnnotationNode, name, path, context } = params;
382
+ if (!currentNode.$ref) {
383
+ return false;
384
+ }
385
+ const data = this.definitions[currentNode.$ref] ? { ...this.definitions[currentNode.$ref] } : {};
386
+ for (const key of Object.keys(currentNode)) {
387
+ const isDeepLevelProp = SCHEMA_DEEP_LEVEL_PROPS.includes(key);
388
+ if (key !== '$ref' && !(isDeepLevelProp && data[key])) {
389
+ data[key] = currentNode[key];
390
+ }
391
+ }
392
+ this.parseSchema(aggregation, data, currentAnnotationNode, name, path, context);
393
+ return true;
394
+ }
395
+ ],
396
+ [
397
+ 'anyOf',
398
+ (params) => {
399
+ const { aggregation, currentNode, currentAnnotationNode, name, path, context } = params;
400
+ if (!currentNode.anyOf) {
401
+ return false;
402
+ }
403
+ for (const anyProperty of currentNode.anyOf) {
404
+ this.parseSchema(aggregation, anyProperty, currentAnnotationNode, name, path, context);
405
+ }
406
+ // Create properties variations for 'anyOf'
407
+ // Any of as array or object
408
+ if (Object.keys(currentNode.anyOf).length > 1 ||
409
+ (Array.isArray(currentNode.anyOf) && currentNode.anyOf.length > 1)) {
410
+ this.createAnyOfPropertiesVariations(currentNode.anyOf, params);
411
+ }
412
+ return true;
413
+ }
414
+ ],
415
+ [
416
+ 'properties',
417
+ (params) => {
418
+ const { aggregation, currentNode, currentAnnotationNode, path, context } = params;
419
+ if (!currentNode.properties) {
420
+ return false;
421
+ }
422
+ const propertyNames = Object.keys(currentNode.properties).filter((prop) => !this.excludeProperties.includes(prop));
423
+ const properties = currentNode.properties;
424
+ const hasPropertyIndex = propertyNames.some((propertyName) => currentNode.properties && currentNode.properties[propertyName]?.['propertyIndex'] !== undefined);
425
+ if (properties && propertyNames.length && hasPropertyIndex) {
426
+ // Sort properties - if schema have mark
427
+ propertyNames.sort(this.propertySorter.bind(this, properties));
428
+ }
429
+ for (const property of propertyNames) {
430
+ this.parseSchema(aggregation, currentNode.properties[property], currentAnnotationNode, property, path, context);
431
+ }
432
+ return true;
433
+ }
434
+ ],
435
+ [
436
+ 'items',
437
+ (params) => {
438
+ const { aggregation, currentNode, currentAnnotationNode, path, context } = params;
439
+ if (!currentNode.items) {
440
+ return false;
441
+ }
442
+ if (Array.isArray(currentNode.items)) {
443
+ // Maybe something different, when we will have more examples - currently adapted for available scenarios
444
+ // It can be enhanced with additional logic, but wait for more real examples
445
+ for (let i = 0; i < currentNode.items.length; i++) {
446
+ this.parseSchema(aggregation, currentNode.items[i], currentAnnotationNode, i.toString(), path, context);
447
+ }
448
+ }
449
+ else {
450
+ this.parseSchema(aggregation, currentNode.items, currentAnnotationNode, undefined, path, context);
451
+ }
452
+ return true;
453
+ }
454
+ ]
455
+ ]);
456
+ this.name = name;
457
+ this.pageType = pageType;
458
+ this.data = page;
459
+ this.originalData = {
460
+ page: structuredClone(this.data),
461
+ annotations,
462
+ schema
463
+ };
464
+ this.schema = JSON.parse(schema);
465
+ this.init(annotations);
466
+ }
467
+ /**
468
+ * Initialize model data - parse schema and current page object values.
469
+ *
470
+ * @param annotations Page annotations.
471
+ */
472
+ init(annotations) {
473
+ // Store definitions with full path
474
+ if (this.schema.definitions) {
475
+ for (const name in this.schema.definitions) {
476
+ this.definitions[`#/definitions/${name}`] = this.schema.definitions[name];
477
+ }
478
+ }
479
+ // Populate tree
480
+ const schema = JSON.parse(this.originalData.schema);
481
+ this.root = this.prepareAggregation(undefined, {
482
+ properties: schema.properties
483
+ });
484
+ this.parseSchema(this.root, schema, { subnodes: annotations.nodes }, undefined, [], {
485
+ filePath: this.data.$filePath
486
+ });
487
+ // Populate additional/customized aggregations/sections
488
+ this.readAdvancedPropertiesData(this.root, this.data);
489
+ const parser = {
490
+ definitions: this.schema.definitions,
491
+ parse: this.parseSchema.bind(this),
492
+ annotations
493
+ };
494
+ // Populate values
495
+ this.root.updatePropertiesValues(this.data, this.data, this.pageType, [], annotations, parser);
496
+ // Validate data
497
+ this.validator.validate(this.root, this.data);
498
+ // Update view nodes
499
+ this.updateViewNodes(this.root);
500
+ this.pendingNodes = [];
501
+ // Post model initialization
502
+ this.afterInit(annotations);
503
+ }
504
+ /**
505
+ * Updates or creates an property in ObjectAggregation based on a JSON Schema node.
506
+ *
507
+ * @param name - The property name being updated.
508
+ * @param aggregation - The aggregation object that holds property definitions.
509
+ * @param currentNode - The JSON Schema node describing the property.
510
+ */
511
+ updatePropertyFromSchema(name, aggregation, currentNode) {
512
+ if (!(name in aggregation.properties)) {
513
+ // Simple property
514
+ aggregation.properties[name] = aggregation.addProperty(name, currentNode);
515
+ aggregation.properties[name].freeText = this.isFreeText(currentNode);
516
+ }
517
+ else if (currentNode.enum) {
518
+ // Enum property - merge values from various variations
519
+ let enumEntries = aggregation.properties[name].schema.enum;
520
+ // Merge enum entries
521
+ enumEntries = enumEntries ? enumEntries.concat(currentNode.enum) : currentNode.enum;
522
+ // Unique enum entries
523
+ aggregation.properties[name].schema.enum = enumEntries
524
+ ? enumEntries.filter((item, pos) => enumEntries && enumEntries.indexOf(item) === pos)
525
+ : [];
526
+ }
527
+ }
528
+ /**
529
+ * Method returns context of passed macros node ID used in getMatchingNode.
530
+ *
531
+ * @param currentMacrosNodeId Current macros node id.
532
+ * @param annotationNodes All annotation nodes.
533
+ * @returns Matched node context.
534
+ */
535
+ getContextForMacrosNode(currentMacrosNodeId, annotationNodes) {
536
+ for (const i in annotationNodes) {
537
+ const contextNode = annotationNodes[i];
538
+ const subNodes = 'subnodes' in contextNode ? contextNode.subnodes : [];
539
+ for (const j in subNodes) {
540
+ if (subNodes[j].macroNodeId === currentMacrosNodeId) {
541
+ return contextNode;
542
+ }
543
+ }
544
+ }
545
+ return undefined;
546
+ }
547
+ /**
548
+ * Method creates properties variants by handling array "anyOf" schema property.
549
+ *
550
+ * @param anyOf Array value of "anyOf" schema property.
551
+ * @param params Schema parse params.
552
+ */
553
+ createAnyOfPropertiesVariations(anyOf, params) {
554
+ const { aggregation, currentAnnotationNode, name, path, context } = params;
555
+ for (const anyProperty of anyOf) {
556
+ let tempAggregation = this.prepareAggregation();
557
+ this.parseSchema(tempAggregation, anyProperty, currentAnnotationNode, name, path, context);
558
+ let displayName = name;
559
+ if (name && !tempAggregation.aggregations[name]) {
560
+ const aggregationKeys = Object.keys(tempAggregation.aggregations);
561
+ displayName = aggregationKeys.length > 0 ? aggregationKeys[0] : name;
562
+ }
563
+ let anyAggregation = aggregation;
564
+ if (displayName) {
565
+ anyAggregation = aggregation.aggregations[displayName];
566
+ tempAggregation = tempAggregation.aggregations[displayName];
567
+ }
568
+ if (tempAggregation && anyAggregation) {
569
+ anyAggregation.variants.push({
570
+ aggregations: tempAggregation.aggregations,
571
+ properties: tempAggregation.properties
572
+ });
573
+ }
574
+ }
575
+ // Check for free text
576
+ if (name && aggregation.properties[name]) {
577
+ aggregation.properties[name].freeText = this.isFreeText(anyOf);
578
+ }
579
+ }
580
+ /**
581
+ * Method uses recursion to parse schema and populate model with aggregations and properties for tree structure.
582
+ *
583
+ * @param aggregation Current aggregation.
584
+ * @param currentNode Current schema node.
585
+ * @param currentAnnotationNode Current annotation node.
586
+ * @param name Name of aggregation.
587
+ * @param path Array containing path to current aggregation.
588
+ * @param context Object containing Parser context.
589
+ */
590
+ parseSchema(aggregation, currentNode, currentAnnotationNode, name, path, context) {
591
+ const params = {
592
+ aggregation,
593
+ currentNode,
594
+ currentAnnotationNode,
595
+ name,
596
+ path,
597
+ context
598
+ };
599
+ for (const parse of this.schemaParsers) {
600
+ const continueParsing = parse.call(this, params);
601
+ if (!continueParsing) {
602
+ break;
603
+ }
604
+ }
605
+ }
606
+ /**
607
+ * Handle and copy some simple properties from schema definition - we need copy them as they can be defined in multiple places inside of schema object like:
608
+ * 1. Outside of reference. Example - "name": { "$ref": "....", "description": "..." }
609
+ * 2. Inside of reference.
610
+ *
611
+ * @param aggregation Current aggregation.
612
+ * @param currentNode Current schema node.
613
+ * @param name Name of aggregation.
614
+ */
615
+ copySchemaProperties(aggregation, currentNode, name) {
616
+ if (name) {
617
+ if (aggregation.properties[name]) {
618
+ this.storeInnerProperties(aggregation.properties[name], [
619
+ 'pattern',
620
+ 'description',
621
+ 'i18nClassification',
622
+ 'artifactType',
623
+ 'minimum',
624
+ 'displayName',
625
+ 'messages'
626
+ ], currentNode);
627
+ }
628
+ else {
629
+ const targetAggregation = aggregation.aggregations[name] || aggregation;
630
+ this.storeInnerProperties(targetAggregation, ['description', 'isViewNode', 'artifactType', 'messages'], currentNode);
631
+ }
632
+ }
633
+ }
634
+ /**
635
+ * Method checs is json schema node should be used for property.
636
+ *
637
+ * @param schema Schema node to check.
638
+ * @returns Schema node should be used for property.
639
+ */
640
+ isProperty(schema) {
641
+ return !schema.$ref && schema.type !== 'object' && schema.type !== 'array' && !schema.anyOf;
642
+ }
643
+ /**
644
+ * Method checs is json schema node should be used for aggregation.
645
+ *
646
+ * @param schema Schema node to check.
647
+ * @returns Schema node should be used for aggregation.
648
+ */
649
+ isAggregation(schema) {
650
+ return (schema.type === JSON_SCHEMA_TYPE_OBJECT || schema.type === JSON_SCHEMA_TYPE_ARRAY) && !schema.$ref;
651
+ }
652
+ /**
653
+ * Handles dynamic `additionalProperties` (or `additionalItems`) for an aggregation.
654
+ * If `data` contains keys that are not part of the aggregation's defined
655
+ * properties or child aggregations, this method tries to resolve them
656
+ * against the schema's `additionalProperties` definition and creates
657
+ * corresponding child aggregations dynamically.
658
+ *
659
+ * @param aggregation - Current aggregation node being processed.
660
+ * @param data - Page data object containing potential additional properties.
661
+ */
662
+ handleAdditionalProperties(aggregation, data) {
663
+ const knownKeys = [...Object.keys(aggregation.properties), ...Object.keys(aggregation.aggregations)];
664
+ for (const name of Object.keys(data)) {
665
+ if (!knownKeys.includes(name) && aggregation.additionalProperties) {
666
+ const additionalProps = aggregation.schema
667
+ ? aggregation.schema.additionalProperties || aggregation.schema.additionalItems
668
+ : undefined;
669
+ if (typeof additionalProps === 'object') {
670
+ this.parseSchema(aggregation, additionalProps, undefined, name, aggregation.path, {});
671
+ const child = aggregation.aggregations[name];
672
+ if (child?.isViewNode && child.description) {
673
+ // For dynamic aggregations, fallback to object key instead of static description
674
+ delete child.description;
675
+ }
676
+ }
677
+ }
678
+ }
679
+ }
680
+ /**
681
+ * Method uses recursion to populate aggregations/properties of aggregation by looping through 'additionalProperties' from schema.
682
+ *
683
+ * @param aggregation ObjectAggregation which would be populated.
684
+ * @param data Page data - object contains latest page values.
685
+ */
686
+ readAdvancedPropertiesData(aggregation, data) {
687
+ // Handle dynamic additional properties
688
+ this.handleAdditionalProperties(aggregation, data);
689
+ // Array handling
690
+ if (aggregation && aggregation.type === types_1.AggregationType.Array && aggregation.schema) {
691
+ const currentNode = aggregation.schema;
692
+ const item = this.getSchemaArrayItem(currentNode);
693
+ if (item && Array.isArray(data)) {
694
+ for (let i = 0; i < data.length; i++) {
695
+ this.parseSchema(aggregation, item, undefined, i.toString(), aggregation.path, {});
696
+ }
697
+ }
698
+ }
699
+ // Go through standard aggregation with recursion
700
+ for (const rootName in aggregation.aggregations) {
701
+ const names = aggregation.aggregations[rootName].union?.originalNames || [rootName];
702
+ for (const name of names) {
703
+ if (typeof data === 'object' && name in data) {
704
+ this.readAdvancedPropertiesData(aggregation.aggregations[rootName], data[name]);
705
+ }
706
+ }
707
+ }
708
+ }
709
+ /**
710
+ * Method uses recursion to populate 'aggregation' with values from page object.
711
+ *
712
+ * @param aggregation ObjectAggregation which would be populated.
713
+ * @param data Page data - object contains latest page values.
714
+ */
715
+ readPropertiesData(aggregation, data) {
716
+ const propertyKeys = Object.keys(aggregation.properties);
717
+ for (const name in data) {
718
+ if (propertyKeys.includes(name)) {
719
+ aggregation.properties[name].value = data[name];
720
+ }
721
+ }
722
+ // Go with recursion
723
+ for (const name in aggregation.aggregations) {
724
+ if (name in data) {
725
+ this.readPropertiesData(aggregation.aggregations[name], data[name]);
726
+ }
727
+ }
728
+ }
729
+ /**
730
+ * Method prepares simple aggregation object.
731
+ *
732
+ * @param path Path for aggregation.
733
+ * @param schema Schema segment for new aggregation.
734
+ * @param parentAggregation Parent aggregation.
735
+ * @param type Aggregation type.
736
+ * @returns Predefined aggregation object.
737
+ */
738
+ prepareAggregation(path, schema, parentAggregation, type = types_1.AggregationType.Object) {
739
+ const fullPath = (path || []).join('/');
740
+ // Check paths for non generic aggregations
741
+ for (const aggregationCondition of AGGREGATIONS_CONDITIONS) {
742
+ if (aggregationCondition.fn(fullPath, parentAggregation, schema)) {
743
+ return new aggregationCondition.aggregation(undefined, schema);
744
+ }
745
+ }
746
+ // Use parent aggregation to create child
747
+ let aggregation;
748
+ if (parentAggregation?.childClass) {
749
+ aggregation = new parentAggregation.childClass(undefined, schema);
750
+ }
751
+ else {
752
+ // Default generic aggregation
753
+ const aggregationClass = type === types_1.AggregationType.Object ? ObjectAggregation_1.ObjectAggregation : ArrayAggregation_1.ArrayAggregation;
754
+ aggregation = new aggregationClass(undefined, schema);
755
+ }
756
+ // Check additional properties
757
+ if (path && TABLE_PATHS.some((targetPath) => (0, utils_1.isArrayEndsWith)(path, targetPath))) {
758
+ aggregation.isTable = true;
759
+ }
760
+ return aggregation;
761
+ }
762
+ /**
763
+ * Method to check if free text entry should be enabled for property.
764
+ *
765
+ * @param schema Schema node to check.
766
+ * @returns Free text entry allowed.
767
+ */
768
+ isFreeText(schema) {
769
+ const validate = (node) => {
770
+ return node.type === 'string' && !node.enum;
771
+ };
772
+ return Array.isArray(schema) ? schema.some(validate) : validate(schema);
773
+ }
774
+ /**
775
+ * Generic method receives array of properties and copies received properties from 'currentNode' into target 'obj'.
776
+ *
777
+ * @param targetObj Target object for store.
778
+ * @param props Properties name to copy from 'currentNode' into 'targetObj'.
779
+ * @param currentNode JSON Schema node.
780
+ */
781
+ storeInnerProperties(targetObj, props, currentNode) {
782
+ for (const property of props) {
783
+ if (currentNode[property] !== undefined || (property === 'i18nClassification' && property in currentNode)) {
784
+ if (!this.isCorrectSchemaProperty(property, currentNode[property])) {
785
+ // schema property is not correct - throw error and do not store value, because it can give unpredictable behavior
786
+ this.logger.error(i18next_1.default.t('SCHEMA_PARSING_ERROR_UNEXPECTED_VALUE', {
787
+ name: property,
788
+ value: JSON.stringify(currentNode[property])
789
+ }));
790
+ return;
791
+ }
792
+ targetObj[property] = currentNode[property];
793
+ }
794
+ }
795
+ }
796
+ /**
797
+ * Method returns schema item definition for array schema resolution.
798
+ *
799
+ * @param currentNode Current schema node.
800
+ * @returns Array's schema definition or undefined if it does not exist.
801
+ */
802
+ getSchemaArrayItem(currentNode) {
803
+ const item = !Array.isArray(currentNode.items) ? currentNode.items : currentNode.additionalItems;
804
+ return typeof item === 'object' ? item : undefined;
805
+ }
806
+ /**
807
+ * Method updates 'formSchema' property for array aggregation.
808
+ *
809
+ * @param aggregation Aggregation to handle.
810
+ */
811
+ updateArrayFormSchema(aggregation) {
812
+ // Creation form currently supported by arrays
813
+ const item = this.getSchemaArrayItem(aggregation.schema || {});
814
+ if (typeof item === 'object') {
815
+ const formSchema = this.prepareAggregation();
816
+ aggregation.isAtomic = !!item.type;
817
+ this.parseSchema(formSchema, item, undefined, aggregation.isAtomic ? '' : undefined, aggregation.path, {});
818
+ if (Object.keys(formSchema.properties).length) {
819
+ aggregation.formSchema = formSchema;
820
+ }
821
+ }
822
+ if (!aggregation.formSchema || !Object.keys(aggregation.formSchema.properties).length) {
823
+ // Array is not appendable
824
+ aggregation.schemaCreationForms = [];
825
+ }
826
+ }
827
+ /**
828
+ * Method updates aggregation 'formSchema' property with schema object which will represent creation form.
829
+ *
830
+ * @param aggregation Aggregation to handle.
831
+ * @param name Aggregation name in 'additionalProperties'.
832
+ */
833
+ updateFormSchema(aggregation, name) {
834
+ if (aggregation instanceof ArrayAggregation_1.ArrayAggregation) {
835
+ this.updateArrayFormSchema(aggregation);
836
+ }
837
+ else if (name && aggregation.additionalProperties?.aggregations[name]) {
838
+ const formSchema = this.prepareAggregation();
839
+ this.parseSchema(formSchema, aggregation.additionalProperties.aggregations[name].schema || {}, undefined, undefined, aggregation.path, {});
840
+ if (Object.keys(formSchema.properties).length) {
841
+ aggregation.formSchema = formSchema;
842
+ }
843
+ }
844
+ else if (typeof aggregation.schema?.additionalProperties === 'object' &&
845
+ this.isSchemaAtomic(aggregation.schema?.additionalProperties)) {
846
+ aggregation.isAtomic = true;
847
+ aggregation.isTable = true;
848
+ const formSchema = this.prepareAggregation();
849
+ this.parseSchema(formSchema, aggregation.schema.additionalProperties, undefined, '', aggregation.path, {});
850
+ if (Object.keys(formSchema.properties).length) {
851
+ aggregation.formSchema = formSchema;
852
+ }
853
+ }
854
+ }
855
+ /**
856
+ * Method goes with recursion and marks all visible nodes for outline.
857
+ *
858
+ * @param aggregation Aggregation object.
859
+ * @returns Returns visbility of aggregation.
860
+ */
861
+ updateViewNodes(aggregation) {
862
+ for (const name in aggregation.aggregations) {
863
+ const childAggregation = aggregation.aggregations[name];
864
+ const isViewNode = this.updateViewNodes(childAggregation);
865
+ if (isViewNode && !aggregation.isViewNode) {
866
+ aggregation.isViewNode = true;
867
+ }
868
+ }
869
+ return aggregation.isViewNode || false;
870
+ }
871
+ /**
872
+ * Method validates property from JSON schema.
873
+ * That method helps to avoid issues, when we are receiving incorrect schema.
874
+ *
875
+ * @param name Schema property name.
876
+ * @param value Value of schema property.
877
+ * @returns Is schema property valid.
878
+ */
879
+ isCorrectSchemaProperty(name, value) {
880
+ let valid = true;
881
+ switch (name) {
882
+ case 'description':
883
+ case 'pattern':
884
+ case 'i18nClassification': {
885
+ // Optional string - otherwise unexpected value
886
+ valid = value === undefined || typeof value === 'string';
887
+ break;
888
+ }
889
+ case 'isViewNode': {
890
+ // Optional boolean - otherwise unexpected value
891
+ valid = value === undefined || typeof value === 'boolean';
892
+ break;
893
+ }
894
+ }
895
+ return valid;
896
+ }
897
+ /**
898
+ * Method to sort schema properties.
899
+ * Spec provides custom property 'propertyIndex', which should be used for sorting.
900
+ *
901
+ * @param properties Object with properties.
902
+ * @param name1 First property name.
903
+ * @param name2 Second property name.
904
+ * @returns Sort result.
905
+ */
906
+ propertySorter(properties, name1, name2) {
907
+ const order1 = properties[name1].propertyIndex !== undefined ? properties[name1].propertyIndex : 0;
908
+ const order2 = properties[name2].propertyIndex !== undefined ? properties[name2].propertyIndex : 0;
909
+ if (order1 === order2) {
910
+ return 0;
911
+ }
912
+ return order1 > order2 ? 1 : -1;
913
+ }
914
+ /**
915
+ * Method handles post initialization.
916
+ * Currently it is used for FPM custom pages to add additional root 'macros' node.
917
+ *
918
+ * @param annotations Page annotations.
919
+ */
920
+ afterInit(annotations) {
921
+ if (this.pageType === ux_specification_types_1.PageType.FPMCustomPage) {
922
+ const macros = new MacrosRoot_1.MacrosRootAggregation(undefined, undefined);
923
+ // set file path
924
+ if (typeof this.data.$filePath === 'string') {
925
+ macros.setFilePath(this.data.$filePath);
926
+ macros.annotationNodeId = annotations.nodes[0]?.nodeId;
927
+ }
928
+ macros.aggregations = this.root.aggregations;
929
+ this.root.aggregations = {
930
+ macros
931
+ };
932
+ }
933
+ }
934
+ /**
935
+ * Method checks if passed schema is atomic type.
936
+ * Atomic means that schema expects simple value as "string", "number" or "boolean".
937
+ *
938
+ * @param schema Schema to check.
939
+ * @returns True if passed schema should be considered as atomic.
940
+ */
941
+ isSchemaAtomic(schema) {
942
+ const atomicTypes = ['string', 'number', 'boolean'];
943
+ return typeof schema === 'object' && typeof schema.type === 'string' && atomicTypes.includes(schema.type);
944
+ }
945
+ }
946
+ exports.TreeModel = TreeModel;
947
+ //# sourceMappingURL=TreeModel.js.map