@sap/ux-specification 1.136.13 → 1.136.15

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 (288) hide show
  1. package/CHANGELOG.md +73 -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 +260 -261
  14. package/dist/index-min.js.map +4 -4
  15. package/dist/schemas/v2/ApplicationV2.json +28 -3
  16. package/dist/schemas/v2/ListReportNewConfig.json +45 -0
  17. package/dist/schemas/v2/ObjectPageConfig.json +11 -5
  18. package/dist/schemas/v4/ApplicationV4.json +18 -12
  19. package/dist/schemas/v4/BuildingBlocksConfig.json +72 -35
  20. package/dist/schemas/v4/ListReportConfig.json +299 -28
  21. package/dist/schemas/v4/ObjectPageConfig.json +409 -130
  22. package/dist/specification/package.json +17 -17
  23. package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
  24. package/dist/specification/scripts/macros/corrections.js +17 -1
  25. package/dist/specification/scripts/macros/corrections.js.map +1 -1
  26. package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
  27. package/dist/specification/scripts/macros/schema.js +10 -1
  28. package/dist/specification/scripts/macros/schema.js.map +1 -1
  29. package/dist/specification/scripts/macros/types.d.ts +1 -0
  30. package/dist/specification/scripts/macros/types.d.ts.map +1 -1
  31. package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
  32. package/dist/specification/scripts/schema/to-json-schema.js +23 -13
  33. package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
  34. package/dist/specification/src/api.d.ts.map +1 -1
  35. package/dist/specification/src/api.js +2 -1
  36. package/dist/specification/src/api.js.map +1 -1
  37. package/dist/specification/src/sync/common/DataFieldStrategy.d.ts +38 -8
  38. package/dist/specification/src/sync/common/DataFieldStrategy.d.ts.map +1 -1
  39. package/dist/specification/src/sync/common/DataFieldStrategy.js +64 -11
  40. package/dist/specification/src/sync/common/DataFieldStrategy.js.map +1 -1
  41. package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.d.ts +0 -4
  42. package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.d.ts.map +1 -1
  43. package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.js +0 -3
  44. package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.js.map +1 -1
  45. package/dist/specification/src/sync/common/appProvider.d.ts +0 -1
  46. package/dist/specification/src/sync/common/appProvider.d.ts.map +1 -1
  47. package/dist/specification/src/sync/common/appProvider.js +0 -1
  48. package/dist/specification/src/sync/common/appProvider.js.map +1 -1
  49. package/dist/specification/src/sync/common/decoration/decorators.d.ts +65 -4
  50. package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
  51. package/dist/specification/src/sync/common/decoration/decorators.js +138 -8
  52. package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
  53. package/dist/specification/src/sync/common/distTagEvaluator.d.ts +10 -3
  54. package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
  55. package/dist/specification/src/sync/common/distTagEvaluator.js +14 -4
  56. package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
  57. package/dist/specification/src/sync/common/generate/objectPage.d.ts +0 -1
  58. package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
  59. package/dist/specification/src/sync/common/generate/objectPage.js +0 -3
  60. package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
  61. package/dist/specification/src/sync/common/generate/utils.d.ts +12 -6
  62. package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
  63. package/dist/specification/src/sync/common/generate/utils.js +33 -22
  64. package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
  65. package/dist/specification/src/sync/common/i18n.json +6 -4
  66. package/dist/specification/src/sync/common/import/utils.d.ts +0 -1
  67. package/dist/specification/src/sync/common/import/utils.d.ts.map +1 -1
  68. package/dist/specification/src/sync/common/import/utils.js +0 -1
  69. package/dist/specification/src/sync/common/import/utils.js.map +1 -1
  70. package/dist/specification/src/sync/common/rules.d.ts.map +1 -1
  71. package/dist/specification/src/sync/common/rules.js +18 -13
  72. package/dist/specification/src/sync/common/rules.js.map +1 -1
  73. package/dist/specification/src/sync/common/utils.d.ts +52 -2
  74. package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
  75. package/dist/specification/src/sync/common/utils.js +176 -5
  76. package/dist/specification/src/sync/common/utils.js.map +1 -1
  77. package/dist/specification/src/sync/v2/application.d.ts +1 -0
  78. package/dist/specification/src/sync/v2/application.d.ts.map +1 -1
  79. package/dist/specification/src/sync/v2/application.js +18 -0
  80. package/dist/specification/src/sync/v2/application.js.map +1 -1
  81. package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
  82. package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
  83. package/dist/specification/src/sync/v2/export/exportPage.js +15 -4
  84. package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
  85. package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
  86. package/dist/specification/src/sync/v2/export/exportPageGeneric.js +8 -15
  87. package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
  88. package/dist/specification/src/sync/v2/export/factory.d.ts +26 -0
  89. package/dist/specification/src/sync/v2/export/factory.d.ts.map +1 -1
  90. package/dist/specification/src/sync/v2/export/factory.js +3 -3
  91. package/dist/specification/src/sync/v2/export/factory.js.map +1 -1
  92. package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts +1 -0
  93. package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts.map +1 -1
  94. package/dist/specification/src/sync/v2/export/pages/ObjectPage.js +11 -0
  95. package/dist/specification/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
  96. package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
  97. package/dist/specification/src/sync/v2/generate/analyticalListReport.js +46 -0
  98. package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
  99. package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
  100. package/dist/specification/src/sync/v2/generate/listReport.js +46 -1
  101. package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
  102. package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
  103. package/dist/specification/src/sync/v2/generate/objectPage.js +63 -13
  104. package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
  105. package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
  106. package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +28 -1
  107. package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
  108. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts +22 -0
  109. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts.map +1 -0
  110. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js +124 -0
  111. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js.map +1 -0
  112. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +1 -0
  113. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
  114. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +4 -0
  115. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
  116. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -0
  117. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
  118. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +1 -0
  119. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
  120. package/dist/specification/src/sync/v2/import/importPage.d.ts.map +1 -1
  121. package/dist/specification/src/sync/v2/import/importPage.js +5 -6
  122. package/dist/specification/src/sync/v2/import/importPage.js.map +1 -1
  123. package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
  124. package/dist/specification/src/sync/v2/import/pages/overviewPage.js +4 -0
  125. package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
  126. package/dist/specification/src/sync/v2/utils.d.ts +17 -1
  127. package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
  128. package/dist/specification/src/sync/v2/utils.js +57 -0
  129. package/dist/specification/src/sync/v2/utils.js.map +1 -1
  130. package/dist/specification/src/sync/v4/application.d.ts +1 -1
  131. package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
  132. package/dist/specification/src/sync/v4/application.js +1 -1
  133. package/dist/specification/src/sync/v4/application.js.map +1 -1
  134. package/dist/specification/src/sync/v4/export/actions.d.ts +39 -0
  135. package/dist/specification/src/sync/v4/export/actions.d.ts.map +1 -0
  136. package/dist/specification/src/sync/v4/export/actions.js +99 -0
  137. package/dist/specification/src/sync/v4/export/actions.js.map +1 -0
  138. package/dist/specification/src/sync/v4/export/controls/Header.d.ts +3 -2
  139. package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
  140. package/dist/specification/src/sync/v4/export/controls/Header.js +14 -2
  141. package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
  142. package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +2 -1
  143. package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
  144. package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +7 -2
  145. package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
  146. package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts +2 -1
  147. package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
  148. package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
  149. package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts +2 -4
  150. package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts.map +1 -1
  151. package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js +2 -21
  152. package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js.map +1 -1
  153. package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts +2 -2
  154. package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts.map +1 -1
  155. package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
  156. package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +14 -3
  157. package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
  158. package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js +52 -9
  159. package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -1
  160. package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +4 -0
  161. package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
  162. package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js +30 -0
  163. package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
  164. package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +15 -3
  165. package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
  166. package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js +53 -10
  167. package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
  168. package/dist/specification/src/sync/v4/export/controls/Table.d.ts +0 -3
  169. package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
  170. package/dist/specification/src/sync/v4/export/controls/Table.js +0 -3
  171. package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
  172. package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts +7 -0
  173. package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
  174. package/dist/specification/src/sync/v4/export/controls/TableColumn.js +60 -0
  175. package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
  176. package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts +9 -2
  177. package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts.map +1 -1
  178. package/dist/specification/src/sync/v4/export/controls/ToolBar.js +39 -1
  179. package/dist/specification/src/sync/v4/export/controls/ToolBar.js.map +1 -1
  180. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +17 -4
  181. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
  182. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +76 -19
  183. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
  184. package/dist/specification/src/sync/v4/export/export.d.ts +7 -0
  185. package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
  186. package/dist/specification/src/sync/v4/export/export.js +100 -11
  187. package/dist/specification/src/sync/v4/export/export.js.map +1 -1
  188. package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts.map +1 -1
  189. package/dist/specification/src/sync/v4/export/pages/ListReport.js +2 -1
  190. package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
  191. package/dist/specification/src/sync/v4/export/types.d.ts +2 -0
  192. package/dist/specification/src/sync/v4/export/types.d.ts.map +1 -1
  193. package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +107 -0
  194. package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +1 -0
  195. package/dist/specification/src/sync/v4/generate/ListReportUtils.js +394 -0
  196. package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +1 -0
  197. package/dist/specification/src/sync/v4/generate/actions.d.ts +35 -0
  198. package/dist/specification/src/sync/v4/generate/actions.d.ts.map +1 -0
  199. package/dist/specification/src/sync/v4/generate/actions.js +112 -0
  200. package/dist/specification/src/sync/v4/generate/actions.js.map +1 -0
  201. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +3 -3
  202. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
  203. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +10 -2
  204. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
  205. package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts +1 -1
  206. package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts.map +1 -1
  207. package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js +3 -2
  208. package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js.map +1 -1
  209. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
  210. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +9 -2
  211. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
  212. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +2 -2
  213. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
  214. package/dist/specification/src/sync/v4/generate/listReport.d.ts +129 -4
  215. package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
  216. package/dist/specification/src/sync/v4/generate/listReport.js +196 -353
  217. package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
  218. package/dist/specification/src/sync/v4/generate/objectPage.d.ts +0 -1
  219. package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  220. package/dist/specification/src/sync/v4/generate/objectPage.js +15 -21
  221. package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
  222. package/dist/specification/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
  223. package/dist/specification/src/sync/v4/import/pages/objectPage.js +16 -3
  224. package/dist/specification/src/sync/v4/import/pages/objectPage.js.map +1 -1
  225. package/dist/specification/src/sync/v4/import/utils.d.ts +0 -1
  226. package/dist/specification/src/sync/v4/import/utils.d.ts.map +1 -1
  227. package/dist/specification/src/sync/v4/import/utils.js +0 -1
  228. package/dist/specification/src/sync/v4/import/utils.js.map +1 -1
  229. package/dist/specification/src/sync/v4/sync-rules/App.d.ts +141 -0
  230. package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -0
  231. package/dist/specification/src/sync/v4/sync-rules/App.js +208 -0
  232. package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -0
  233. package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +193 -0
  234. package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -0
  235. package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +384 -0
  236. package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -0
  237. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +172 -0
  238. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -0
  239. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +410 -0
  240. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -0
  241. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +70 -0
  242. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -0
  243. package/dist/specification/src/sync/v4/sync-rules/Page.js +73 -0
  244. package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -0
  245. package/dist/specification/src/sync/v4/sync-rules/utils.d.ts +9 -0
  246. package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -0
  247. package/dist/specification/src/sync/v4/sync-rules/utils.js +43 -0
  248. package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -0
  249. package/dist/specification/src/sync/v4/utils/utils.d.ts +105 -49
  250. package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
  251. package/dist/specification/src/sync/v4/utils/utils.js +363 -97
  252. package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
  253. package/dist/types/src/apiTypes.d.ts +3 -2
  254. package/dist/types/src/apiTypes.d.ts.map +1 -1
  255. package/dist/types/src/apiTypes.js +1 -0
  256. package/dist/types/src/apiTypes.js.map +1 -1
  257. package/dist/types/src/common/types.d.ts +152 -3
  258. package/dist/types/src/common/types.d.ts.map +1 -1
  259. package/dist/types/src/common/types.js +47 -2
  260. package/dist/types/src/common/types.js.map +1 -1
  261. package/dist/types/src/common/webapp/manifest/Manifest.d.ts +1 -1
  262. package/dist/types/src/common/webapp/manifest/Manifest.d.ts.map +1 -1
  263. package/dist/types/src/v2/application.d.ts +18 -0
  264. package/dist/types/src/v2/application.d.ts.map +1 -1
  265. package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
  266. package/dist/types/src/v2/controls/ObjectPageTable.d.ts +4 -4
  267. package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
  268. package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
  269. package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts +10 -1
  270. package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts.map +1 -1
  271. package/dist/types/src/v4/application.d.ts +6 -6
  272. package/dist/types/src/v4/controls/CustomAction.d.ts +133 -19
  273. package/dist/types/src/v4/controls/CustomAction.d.ts.map +1 -1
  274. package/dist/types/src/v4/controls/CustomAction.js.map +1 -1
  275. package/dist/types/src/v4/controls/ObjectPageForm.d.ts +2 -2
  276. package/dist/types/src/v4/controls/ObjectPageForm.d.ts.map +1 -1
  277. package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +22 -3
  278. package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
  279. package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
  280. package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
  281. package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts +2 -2
  282. package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
  283. package/dist/types/src/v4/controls/ToolBar.d.ts +3 -3
  284. package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
  285. package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +59 -0
  286. package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
  287. package/dist/types/src/v4/webapp/manifest/ManifestSettings.js.map +1 -1
  288. package/package.json +17 -17
@@ -0,0 +1,193 @@
1
+ import type { Definition, DefinitionOrBoolean } from 'typescript-json-schema';
2
+ import { SchemaTag } from '@sap/ux-specification-types';
3
+ type TagInfo = {
4
+ name: SchemaTag | '$ref';
5
+ value: unknown;
6
+ };
7
+ /**
8
+ * Central manager for application schema lifecycle and operations.
9
+ * Encapsulates all schema structure knowledge and provides clean APIs for schema manipulation.
10
+ */
11
+ export declare class AppSchema {
12
+ private schema;
13
+ /**
14
+ * Constructor for AppSchema.
15
+ *
16
+ * @param genericSchema - The initial generic schema object
17
+ */
18
+ constructor(genericSchema: object);
19
+ /**
20
+ * Validates a property path array.
21
+ *
22
+ * @param propertyPath - The path to validate
23
+ * @returns true if valid, false otherwise
24
+ */
25
+ private isValidPropertyPath;
26
+ /**
27
+ * Resolves a $ref to its actual definition.
28
+ *
29
+ * @param ref - The $ref string (e.g., "#/definitions/MyDefinition")
30
+ * @returns The resolved definition or undefined
31
+ */
32
+ private resolveRef;
33
+ /**
34
+ * Navigates through an object using a property path and returns the value at that path.
35
+ * Automatically resolves $ref references when encountered.
36
+ *
37
+ * @param root - The root object to navigate from
38
+ * @param propertyPath - Array of keys forming the path
39
+ * @param createIntermediates - Whether to create intermediate objects if they don't exist
40
+ * @param resolveRefs - Whether to resolve $ref references during navigation (default: true)
41
+ * @returns The value at the path, or undefined if not found
42
+ */
43
+ private navigatePropertyPath;
44
+ /**
45
+ * Sets a value at a property path within an object, creating intermediate objects as needed.
46
+ *
47
+ * @param root - The root object to navigate from
48
+ * @param propertyPath - Array of keys forming the path
49
+ * @param value - The value to set
50
+ * @returns true if successful, false otherwise
51
+ */
52
+ private setPropertyPath;
53
+ /**
54
+ * Gets the current schema definition.
55
+ *
56
+ * @returns The schema definition
57
+ */
58
+ getSchema(): Definition;
59
+ /**
60
+ * Gets a specific definition from the schema by name.
61
+ *
62
+ * @param name - The name of the definition
63
+ * @returns The definition or undefined if not found
64
+ */
65
+ getDefinition(name: Definition | string): Definition | undefined;
66
+ /**
67
+ * Sets a definition in the schema.
68
+ *
69
+ * @param name - The name of the definition
70
+ * @param definition - The definition to set
71
+ */
72
+ setDefinition(name: string, definition: Definition): void;
73
+ /**
74
+ * Deletes a definition from the schema.
75
+ *
76
+ * @param name - The name of the definition to delete
77
+ */
78
+ deleteDefinition(name: string): void;
79
+ /**
80
+ * Gets a root level property by path.
81
+ *
82
+ * @param propertyPath - Array of property names forming the path
83
+ * @returns The property definition or undefined
84
+ */
85
+ getRootProperty(propertyPath: string[]): Definition | undefined;
86
+ /**
87
+ * Gets a property in a definition by path.
88
+ *
89
+ * @param definition - The definition object
90
+ * @param propertyPath - Array of property names forming the path
91
+ * @returns The property definition or undefined
92
+ */
93
+ getProperty(definition: Definition, propertyPath?: string[]): Definition | undefined;
94
+ /**
95
+ * Sets a property in a definition using a path.
96
+ *
97
+ * @param definition - The definition name (string) or definition object
98
+ * @param propertyPath - The path to the property (optional)
99
+ * @param value - The value to set
100
+ */
101
+ setProperty(definition: string | Definition, propertyPath: string[] | undefined, value: DefinitionOrBoolean | string): void;
102
+ /**
103
+ * Removes a property in a definition using a path.
104
+ *
105
+ * @param definition - The definition object
106
+ * @param value - The value to set
107
+ */
108
+ removeProperty(definition: Definition, value: string): void;
109
+ /**
110
+ * Sets a schema tag on a definition.
111
+ *
112
+ * @param definitionName - The name of the definition
113
+ * @param tag - The schema tag to set
114
+ * @param value - The value for the tag
115
+ */
116
+ setDefinitionTag(definitionName: string, tag: SchemaTag, value: Definition): void;
117
+ /**
118
+ * Sets a schema tag on a property using a path.
119
+ *
120
+ * @param definitionOrString - The definition or name of the definition that should contain the property
121
+ * @param tagOrProperty - The tag info or property path
122
+ * @param tag - The tag info (if property path is provided)
123
+ */
124
+ setPropertyTag(definitionOrString: Definition | string, tagOrProperty: TagInfo | string[], tag?: TagInfo): void;
125
+ /**
126
+ * Hides a property or definition by setting the hidden tag.
127
+ *
128
+ * @param definition - The definition or name of the definition that should contain the property
129
+ * @param propertyPath - The path to the property (optional)
130
+ */
131
+ hide(definition: string | Definition, propertyPath?: string[]): void;
132
+ /**
133
+ * Creates a reference to a definition.
134
+ *
135
+ * @param definitionName - The name of the definition to reference
136
+ * @returns The $ref string
137
+ */
138
+ private createDefinitionRef;
139
+ /**
140
+ * Sets a property to reference a definition using a path.
141
+ *
142
+ * @param definitionOrString - The definition or name of the definition that should contain the property
143
+ * @param propertyPath - The path to the property
144
+ * @param targetDefinitionName - The name of the definition to reference
145
+ */
146
+ setPropertyRef(definitionOrString: Definition | string, propertyPath: string[], targetDefinitionName: string): void;
147
+ /**
148
+ * Sets a reference for a definition without a path.
149
+ *
150
+ * @param definitionOrString - The definition or name of the definition that should contain the property
151
+ * @param targetDefinitionName - The name of the definition to reference
152
+ */
153
+ setDefinitionRef(definitionOrString: Definition | string, targetDefinitionName: string): void;
154
+ /**
155
+ * Adds an enum to a definition property using a path.
156
+ * If there is only one enum value, adds a 'const' property instead of 'enum'.
157
+ *
158
+ * @param definitionName - The name of the definition
159
+ * @param propertyPath - Array of property names forming the path
160
+ * @param enumValues - Array of enum values to add
161
+ */
162
+ addEnumToSchema(definitionName: string, propertyPath: string[], enumValues: string[]): void;
163
+ /**
164
+ * Clones a definition with a new name.
165
+ *
166
+ * @param sourceName - The name of the source definition to clone
167
+ * @param targetName - The name for the cloned definition
168
+ * @returns The cloned definition or undefined if source doesn't exist
169
+ */
170
+ cloneDefinition(sourceName: string, targetName: string): Definition | undefined;
171
+ /**
172
+ * Updates property indices for ordering.
173
+ *
174
+ * @param order - Array of property names in the desired order
175
+ * @param definitionName - Optional definition name (if not provided, updates root schema properties)
176
+ */
177
+ updatePropertyIndices(order: string[], definitionName?: string): void;
178
+ /**
179
+ * Performs cleanup operations on the schema.
180
+ *
181
+ * @param definitionsToDelete - Array of definition names to delete
182
+ */
183
+ cleanup(definitionsToDelete: string[]): void;
184
+ /**
185
+ * Finalizes and returns the schema.
186
+ * This method can be used as the final step in schema generation.
187
+ *
188
+ * @returns The finalized schema definition
189
+ */
190
+ finalize(): Definition;
191
+ }
192
+ export {};
193
+ //# sourceMappingURL=AppSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppSchema.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v4/sync-rules/AppSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAkB,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGxE,KAAK,OAAO,GAAG;IACX,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,qBAAa,SAAS;IAClB,OAAO,CAAC,MAAM,CAAa;IAE3B;;;;OAIG;gBACS,aAAa,EAAE,MAAM;IAIjC;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAQlB;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IAoD5B;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IAyBvB;;;;OAIG;IACH,SAAS,I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AoB,EAAE,MAAM,GAC7B,IAAI;IAOP;;;;;OAKG;IACH,gBAAgB,CAAC,kBAAkB,EAAE,UAAU,GAAG,MAAM,EAAE,oBAAoB,EAAE,MAAM,GAAG,IAAI;IAO7F;;;;;;;OAOG;IACH,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI;IAoC3F;;;;;;OAMG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAU/E;;;;;OAKG;IACH,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAcrE;;;;OAIG;IACH,OAAO,CAAC,mBAAmB,EAAE,MAAM,EAAE,GAAG,IAAI;IAI5C;;;;;OAKG;IACH,QAAQ,IAAI,UAAU;CAGzB"}
@@ -0,0 +1,384 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppSchema = void 0;
4
+ const ux_specification_types_1 = require("@sap/ux-specification-types");
5
+ const common_1 = require("../../common");
6
+ /**
7
+ * Central manager for application schema lifecycle and operations.
8
+ * Encapsulates all schema structure knowledge and provides clean APIs for schema manipulation.
9
+ */
10
+ class AppSchema {
11
+ /**
12
+ * Constructor for AppSchema.
13
+ *
14
+ * @param genericSchema - The initial generic schema object
15
+ */
16
+ constructor(genericSchema) {
17
+ this.schema = JSON.parse(JSON.stringify(genericSchema));
18
+ }
19
+ /**
20
+ * Validates a property path array.
21
+ *
22
+ * @param propertyPath - The path to validate
23
+ * @returns true if valid, false otherwise
24
+ */
25
+ isValidPropertyPath(propertyPath) {
26
+ return (Array.isArray(propertyPath) &&
27
+ propertyPath.length > 0 &&
28
+ propertyPath.every((key) => typeof key === 'string' && key.length > 0));
29
+ }
30
+ /**
31
+ * Resolves a $ref to its actual definition.
32
+ *
33
+ * @param ref - The $ref string (e.g., "#/definitions/MyDefinition")
34
+ * @returns The resolved definition or undefined
35
+ */
36
+ resolveRef(ref) {
37
+ if (typeof ref !== 'string' || !ref.startsWith(common_1.DEFINITION_LINK_PREFIX)) {
38
+ return undefined;
39
+ }
40
+ const definitionName = ref.substring(common_1.DEFINITION_LINK_PREFIX.length);
41
+ return this.getDefinition(definitionName);
42
+ }
43
+ /**
44
+ * Navigates through an object using a property path and returns the value at that path.
45
+ * Automatically resolves $ref references when encountered.
46
+ *
47
+ * @param root - The root object to navigate from
48
+ * @param propertyPath - Array of keys forming the path
49
+ * @param createIntermediates - Whether to create intermediate objects if they don't exist
50
+ * @param resolveRefs - Whether to resolve $ref references during navigation (default: true)
51
+ * @returns The value at the path, or undefined if not found
52
+ */
53
+ navigatePropertyPath(root, propertyPath, createIntermediates = false, resolveRefs = true) {
54
+ if (!root || !this.isValidPropertyPath(propertyPath)) {
55
+ return undefined;
56
+ }
57
+ let current = root;
58
+ for (let i = 0; i < propertyPath.length; i++) {
59
+ const key = propertyPath[i];
60
+ const isLastKey = i === propertyPath.length - 1;
61
+ if (current[key] === undefined || current[key] === null) {
62
+ if (createIntermediates) {
63
+ current[key] = {};
64
+ }
65
+ else {
66
+ return undefined;
67
+ }
68
+ }
69
+ // Check if the current value has a $ref and resolve it
70
+ // When we resolve a $ref, we navigate into the resolved definition
71
+ // without modifying the original object
72
+ // Don't resolve on the last key to allow reading properties that contain $ref
73
+ // Only resolve if $ref is the ONLY property (pure reference)
74
+ if (!createIntermediates && resolveRefs && !isLastKey && current[key]?.$ref) {
75
+ const keys = Object.keys(current[key]);
76
+ const isPureRef = keys.length === 1 && keys[0] === '$ref';
77
+ if (isPureRef) {
78
+ const resolved = this.resolveRef(current[key].$ref);
79
+ if (resolved) {
80
+ // Navigate into the resolved definition without mutating original
81
+ current = resolved;
82
+ continue;
83
+ }
84
+ }
85
+ }
86
+ if (typeof current[key] !== 'object') {
87
+ return createIntermediates ? undefined : current[key];
88
+ }
89
+ current = current[key];
90
+ }
91
+ return current;
92
+ }
93
+ /**
94
+ * Sets a value at a property path within an object, creating intermediate objects as needed.
95
+ *
96
+ * @param root - The root object to navigate from
97
+ * @param propertyPath - Array of keys forming the path
98
+ * @param value - The value to set
99
+ * @returns true if successful, false otherwise
100
+ */
101
+ setPropertyPath(root, propertyPath, value) {
102
+ if (!root || !this.isValidPropertyPath(propertyPath)) {
103
+ return false;
104
+ }
105
+ let current = root;
106
+ for (let i = 0; i < propertyPath.length - 1; i++) {
107
+ const key = propertyPath[i];
108
+ if (!current[key] || typeof current[key] !== 'object') {
109
+ current[key] = {};
110
+ }
111
+ current = current[key];
112
+ }
113
+ const finalKey = propertyPath[propertyPath.length - 1];
114
+ current[finalKey] = value;
115
+ return true;
116
+ }
117
+ /**
118
+ * Gets the current schema definition.
119
+ *
120
+ * @returns The schema definition
121
+ */
122
+ getSchema() {
123
+ return this.schema;
124
+ }
125
+ /**
126
+ * Gets a specific definition from the schema by name.
127
+ *
128
+ * @param name - The name of the definition
129
+ * @returns The definition or undefined if not found
130
+ */
131
+ getDefinition(name) {
132
+ if (typeof name !== 'string') {
133
+ return name;
134
+ }
135
+ return this.schema.definitions?.[name];
136
+ }
137
+ /**
138
+ * Sets a definition in the schema.
139
+ *
140
+ * @param name - The name of the definition
141
+ * @param definition - The definition to set
142
+ */
143
+ setDefinition(name, definition) {
144
+ if (!this.schema.definitions) {
145
+ this.schema.definitions = {};
146
+ }
147
+ this.schema.definitions[name] = definition;
148
+ }
149
+ /**
150
+ * Deletes a definition from the schema.
151
+ *
152
+ * @param name - The name of the definition to delete
153
+ */
154
+ deleteDefinition(name) {
155
+ if (this.schema.definitions?.[name]) {
156
+ delete this.schema.definitions[name];
157
+ }
158
+ }
159
+ /**
160
+ * Gets a root level property by path.
161
+ *
162
+ * @param propertyPath - Array of property names forming the path
163
+ * @returns The property definition or undefined
164
+ */
165
+ getRootProperty(propertyPath) {
166
+ if (!this.schema.properties || !this.isValidPropertyPath(propertyPath)) {
167
+ return undefined;
168
+ }
169
+ return this.navigatePropertyPath(this.schema.properties, propertyPath);
170
+ }
171
+ /**
172
+ * Gets a property in a definition by path.
173
+ *
174
+ * @param definition - The definition object
175
+ * @param propertyPath - Array of property names forming the path
176
+ * @returns The property definition or undefined
177
+ */
178
+ getProperty(definition, propertyPath) {
179
+ // If no property path is provided, return the entire definition
180
+ if (!propertyPath) {
181
+ return definition;
182
+ }
183
+ // If property path is invalid, return undefined
184
+ if (!this.isValidPropertyPath(propertyPath)) {
185
+ return undefined;
186
+ }
187
+ return this.navigatePropertyPath(definition, propertyPath);
188
+ }
189
+ /**
190
+ * Sets a property in a definition using a path.
191
+ *
192
+ * @param definition - The definition name (string) or definition object
193
+ * @param propertyPath - The path to the property (optional)
194
+ * @param value - The value to set
195
+ */
196
+ setProperty(definition, propertyPath, value) {
197
+ if (typeof definition === 'string') {
198
+ definition = this.getDefinition(definition);
199
+ }
200
+ this.setPropertyPath(definition, propertyPath, value);
201
+ }
202
+ /**
203
+ * Removes a property in a definition using a path.
204
+ *
205
+ * @param definition - The definition object
206
+ * @param value - The value to set
207
+ */
208
+ removeProperty(definition, value) {
209
+ if (!definition) {
210
+ return;
211
+ }
212
+ delete definition[value];
213
+ }
214
+ /**
215
+ * Sets a schema tag on a definition.
216
+ *
217
+ * @param definitionName - The name of the definition
218
+ * @param tag - The schema tag to set
219
+ * @param value - The value for the tag
220
+ */
221
+ setDefinitionTag(definitionName, tag, value) {
222
+ const definition = this.getDefinition(definitionName);
223
+ if (definition) {
224
+ definition[tag] = value;
225
+ }
226
+ }
227
+ /**
228
+ * Sets a schema tag on a property using a path.
229
+ *
230
+ * @param definitionOrString - The definition or name of the definition that should contain the property
231
+ * @param tagOrProperty - The tag info or property path
232
+ * @param tag - The tag info (if property path is provided)
233
+ */
234
+ setPropertyTag(definitionOrString, tagOrProperty, tag) {
235
+ const definition = this.getDefinition(definitionOrString);
236
+ let property = definition;
237
+ if (tag && tagOrProperty instanceof Array) {
238
+ // called with propertyPath
239
+ property = this.getProperty(definition, tagOrProperty);
240
+ }
241
+ const tagInfo = tag ? tag : tagOrProperty;
242
+ if (property && typeof property === 'object') {
243
+ property[tagInfo.name] = tagInfo.value;
244
+ }
245
+ }
246
+ /**
247
+ * Hides a property or definition by setting the hidden tag.
248
+ *
249
+ * @param definition - The definition or name of the definition that should contain the property
250
+ * @param propertyPath - The path to the property (optional)
251
+ */
252
+ hide(definition, propertyPath) {
253
+ this.setPropertyTag(definition, propertyPath, { name: ux_specification_types_1.SchemaTag.hidden, value: true });
254
+ }
255
+ /**
256
+ * Creates a reference to a definition.
257
+ *
258
+ * @param definitionName - The name of the definition to reference
259
+ * @returns The $ref string
260
+ */
261
+ createDefinitionRef(definitionName) {
262
+ return `${common_1.DEFINITION_LINK_PREFIX}${definitionName}`;
263
+ }
264
+ /**
265
+ * Sets a property to reference a definition using a path.
266
+ *
267
+ * @param definitionOrString - The definition or name of the definition that should contain the property
268
+ * @param propertyPath - The path to the property
269
+ * @param targetDefinitionName - The name of the definition to reference
270
+ */
271
+ setPropertyRef(definitionOrString, propertyPath, targetDefinitionName) {
272
+ this.setPropertyTag(definitionOrString, propertyPath, {
273
+ name: '$ref',
274
+ value: this.createDefinitionRef(targetDefinitionName)
275
+ });
276
+ }
277
+ /**
278
+ * Sets a reference for a definition without a path.
279
+ *
280
+ * @param definitionOrString - The definition or name of the definition that should contain the property
281
+ * @param targetDefinitionName - The name of the definition to reference
282
+ */
283
+ setDefinitionRef(definitionOrString, targetDefinitionName) {
284
+ this.setPropertyTag(definitionOrString, {
285
+ name: '$ref',
286
+ value: this.createDefinitionRef(targetDefinitionName)
287
+ });
288
+ }
289
+ /**
290
+ * Adds an enum to a definition property using a path.
291
+ * If there is only one enum value, adds a 'const' property instead of 'enum'.
292
+ *
293
+ * @param definitionName - The name of the definition
294
+ * @param propertyPath - Array of property names forming the path
295
+ * @param enumValues - Array of enum values to add
296
+ */
297
+ addEnumToSchema(definitionName, propertyPath, enumValues) {
298
+ const definition = this.getDefinition(definitionName);
299
+ if (!definition || !this.isValidPropertyPath(propertyPath) || enumValues.length === 0) {
300
+ return;
301
+ }
302
+ // Determine whether to use 'const' (single value) or 'enum' (multiple values)
303
+ const propertyName = enumValues.length === 1 ? 'const' : 'enum';
304
+ const propertyValue = enumValues.length === 1 ? enumValues[0] : enumValues;
305
+ // If the path ends with 'enum', set the value directly at that path
306
+ // Otherwise, navigate to the property and add enum/const to it
307
+ if (propertyPath[propertyPath.length - 1] === 'enum') {
308
+ // Path ends with 'enum', set it directly
309
+ let current = definition;
310
+ for (let i = 0; i < propertyPath.length - 1; i++) {
311
+ const key = propertyPath[i];
312
+ if (!current[key]) {
313
+ current[key] = {};
314
+ }
315
+ current = current[key];
316
+ }
317
+ current[propertyName] = propertyValue;
318
+ }
319
+ else {
320
+ // Path doesn't end with 'enum', navigate to the property and add enum/const to it
321
+ let current = definition;
322
+ for (const key of propertyPath) {
323
+ if (!current[key]) {
324
+ current[key] = {};
325
+ }
326
+ current = current[key];
327
+ }
328
+ current[propertyName] = propertyValue;
329
+ }
330
+ }
331
+ /**
332
+ * Clones a definition with a new name.
333
+ *
334
+ * @param sourceName - The name of the source definition to clone
335
+ * @param targetName - The name for the cloned definition
336
+ * @returns The cloned definition or undefined if source doesn't exist
337
+ */
338
+ cloneDefinition(sourceName, targetName) {
339
+ const source = this.getDefinition(sourceName);
340
+ if (source) {
341
+ const clone = structuredClone(source);
342
+ this.setDefinition(targetName, clone);
343
+ return clone;
344
+ }
345
+ return undefined;
346
+ }
347
+ /**
348
+ * Updates property indices for ordering.
349
+ *
350
+ * @param order - Array of property names in the desired order
351
+ * @param definitionName - Optional definition name (if not provided, updates root schema properties)
352
+ */
353
+ updatePropertyIndices(order, definitionName) {
354
+ const definition = definitionName ? this.getDefinition(definitionName) : this.getSchema();
355
+ if (!definition?.properties) {
356
+ return;
357
+ }
358
+ order.forEach((propertyName, index) => {
359
+ const property = definition.properties[propertyName];
360
+ if (property && typeof property === 'object') {
361
+ property[ux_specification_types_1.SchemaTag.propertyIndex] = index;
362
+ }
363
+ });
364
+ }
365
+ /**
366
+ * Performs cleanup operations on the schema.
367
+ *
368
+ * @param definitionsToDelete - Array of definition names to delete
369
+ */
370
+ cleanup(definitionsToDelete) {
371
+ definitionsToDelete.forEach((name) => this.deleteDefinition(name));
372
+ }
373
+ /**
374
+ * Finalizes and returns the schema.
375
+ * This method can be used as the final step in schema generation.
376
+ *
377
+ * @returns The finalized schema definition
378
+ */
379
+ finalize() {
380
+ return this.schema;
381
+ }
382
+ }
383
+ exports.AppSchema = AppSchema;
384
+ //# sourceMappingURL=AppSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppSchema.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/sync-rules/AppSchema.ts"],"names":[],"mappings":";;;AACA,wEAAwE;AACxE,yCAAsD;AAOtD;;;GAGG;AACH,MAAa,SAAS;IAGlB;;;;OAIG;IACH,YAAY,aAAqB;QAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAe,CAAC;IAC1E,CAAC;IAED;;;;;OAKG;IACK,mBAAmB,CAAC,YAAkC;QAC1D,OAAO,CACH,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;YAC3B,YAAY,CAAC,MAAM,GAAG,CAAC;YACvB,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CACzE,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACK,UAAU,CAAC,GAAW;QAC1B,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,+BAAsB,CAAC,EAAE,CAAC;YACrE,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,MAAM,cAAc,GAAG,GAAG,CAAC,SAAS,CAAC,+BAAsB,CAAC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